Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abort cmd support #37

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open

Conversation

vikjadhav
Copy link

No description provided.

rohan-puri and others added 30 commits February 14, 2018 12:30
Following are the changes,
1. Added new bst "hyc".
2. Started REST server from tgtd.
3. tgtd now linking with libRestServer & libStorageLayer.
4. All setup cmds are mentioned in setup_cmds.txt file.

This is tested with fio on the target exported LUN, libStorageLayer was configured with
RamCache & SuccessHandlers.

Signed-off-by: Rohan Puri <[email protected]>
1. vmid : 1
2. vmdkid : 1
3. target id : 1
4. LUN id : 1
5. device is memory based file which is command line argument.
6. needs to be run from tgt/usr dir.

Run it like the form,
../basic_setup.sh  /var/tmp/iscsi-disk1 ~/config.fio

config.fio is an fio config file which should be represent in home dir.

Signed-off-by: Rohan Puri <[email protected]>
Also added fio config file.

Signed-off-by: Rohan Puri <[email protected]>
* Remove the restserver & storageLib initializations
These are removed because the storage daemon would
handle them.

* Remove the linking to restserver and storagelib

* Remove call to restserver api.

* tgt is now linked to all required c++ libs

folly, fbthrift, hyc libs, etc.
hyc client apis now replaces the earlier lib api calls.
though they are just passing compilation. Proper integration
needs to be done.

* Call HycStorInitialize()

* Moved eventfd_read() inside loop

Signed-off-by: Rohan Puri <[email protected]>
Signed-off-by: Prasad Joshi <[email protected]>
tgt integrated with ha-lib

tgt exports 2 REST APIs target_create & lun_create


Signed-off-by: Rohan Puri <[email protected]>
added mutex to start ha thread just once.

Signed-off-by: Rohan Puri <[email protected]>
With this flag ha-lib build fails, I have filed issue for this, tracked,
https://github.com/CacheboxInc/ha-lib/issues/15

Once this above ha-lib issue is fixed, this change can be reverted.
Needed for now to compile tgt with ha-lib.

Signed-off-by: Rohan Puri <[email protected]>
Return NOT supported for WRITESAME scsi command until we support it completely
now DevPath is changed to DevName.
dev_name is a sparse file name, which needs to be created for
corresponding LUN.

Also, new config LunSize is added, which mentions whats the size(in Gb)
of sparse file to be created which tgtd is running.

Signed-off-by: Rohan Puri <[email protected]>
Signed-off-by: Shrirang Phansalkar <[email protected]>
Signed-off-by: Shrirang Phansalkar <[email protected]>
* DP-1151: REST API 'new_stord'

 Adding a new REST API to register a new stord instance with
 tgt.

Signed-off-by: Shrihari Rathod <[email protected]>

* Use correct arg type

Signed-off-by: Shrihari Rathod <[email protected]>

* Adding review changes

Signed-off-by: Shrihari Rathod <[email protected]>
Merging branch as new build is required.
Will do a post merge review.

* Adding REST API 'target_delete' for TGT

  - Added REST API for target_delete.
  - This api deletes complete target i.e all LUN's associated
    with target.

Signed-off-by: Shrihari Rathod <[email protected]>

* Adding API lun_delete

  - Implemented 'lun_delete' API to delete individual LUN
    if required.

Signed-off-by: Shrihari Rathod <[email protected]>
* Adding retry for target delete

 - Some cmds can be pending at StorD side.
   TGT force does not take into consideration aborting such IO's.

 - Completion of such IO's needs to be done.
   So adding retry at TGT for deleting target.

Signed-off-by: Shrihari Rathod <[email protected]>

* reqid error handling in cleaner way

* Adding other cleanup calls during target delete

 - 'unbind' and 'conn --op delete' functions were missing
   in current target delete implementation. Adding them.

Signed-off-by: Shrihari Rathod <[email protected]>

* Update tgtd.c

* Resolve warnings

Signed-off-by: Shrihari Rathod <[email protected]>

* Incorporating review comments

Signed-off-by: Shrihari Rathod <[email protected]>

* Reverting error path changes

 Changes still not stable further investigation required.

Signed-off-by: Shrihari Rathod <[email protected]>
* Concurrent REST call handling

 Initial commit.
 For now allowing only one rest call at a time.

Signed-off-by: Shrihari Rathod <[email protected]>

* Blocking instead of failing rest calls

Signed-off-by: Shrihari Rathod <[email protected]>

* Reducing scope of mutex

Reviewed by: Sumit Kumar
Signed-off-by: Shrihari Rathod <[email protected]>
Redesign stord client code

Intgration with new Hyc code
avoid epoll_wait() and epoll_ctl() calls

Signed-off-by: Prasad Joshi <[email protected]>
In eventfd handler, we query the list of all struct scsi_cmds which are
complete. For each complete scsi_cmd, we call target_cmd_io_done()
function. target_cmd_io_done() add scsi_cmd into a completion list, and
then adds EPOLLOUT epoll event. In EPOLLOUT event handler, TGTD sends
scsi_cmd response back.

We avoid EPOLLOUT, by sending the scsi_cmd responses in eventfd.

Signed-off-by: Prasad Joshi <[email protected]>
* Creating a queue of REST calls

  Serializing REST calls and allowing a max no of 20 calls
  to be added in queue.

Signed-off-by: Shrihari Rathod <[email protected]>
(cherry picked from commit a83ec53)

* Increasing REST queue size to 40

Approved by: Sumit Kumar
Signed-off-by: Shrihari Rathod <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants