Skip to content

Abort cmd support#37

Open
vikjadhav wants to merge 32 commits intofujita:masterfrom
CacheboxInc:abort_cmd_support
Open

Abort cmd support#37
vikjadhav wants to merge 32 commits intofujita:masterfrom
CacheboxInc:abort_cmd_support

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 <rohan.puri@primaryio.com>
Signed-off-by: Rohan Puri <rohan.puri@primaryio.com>
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 <rohan.puri@primaryio.com>
Also added fio config file.

Signed-off-by: Rohan Puri <rohan.puri@primaryio.com>
Signed-off-by: Rohan Puri <rohan.puri@primaryio.com>
* 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 <rohan.puri@primaryio.com>
Signed-off-by: Prasad Joshi <Prasad.Joshi@primaryio.com>
Signed-off-by: Rohan Puri <rohan.puri@primaryio.com>
tgt integrated with ha-lib

tgt exports 2 REST APIs target_create & lun_create


Signed-off-by: Rohan Puri <rohan.puri@primaryio.com>
Signed-off-by: Rohan Puri <rohan.puri@primaryio.com>
Signed-off-by: Rohan Puri <rohan.puri@primaryio.com>
added mutex to start ha thread just once.

Signed-off-by: Rohan Puri <rohan.puri@primaryio.com>
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 <rohan.puri@primaryio.com>
Signed-off-by: Rohan Puri <rohan.puri@primaryio.com>
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 <rohan.puri@primaryio.com>
Signed-off-by: Shrirang Phansalkar <shrirang.phansalkar@primaryio.com>
Signed-off-by: Shrirang Phansalkar <shrirang.phansalkar@primaryio.com>
* DP-1151: REST API 'new_stord'

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

Signed-off-by: Shrihari Rathod <shrihari.rathod@primaryio.com>

* Use correct arg type

Signed-off-by: Shrihari Rathod <shrihari.rathod@primaryio.com>

* Adding review changes

Signed-off-by: Shrihari Rathod <shrihari.rathod@primaryio.com>
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 <shrihari.rathod@primaryio.com>

* Adding API lun_delete

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

Signed-off-by: Shrihari Rathod <shrihari.rathod@primaryio.com>
* 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 <shrihari.rathod@primaryio.com>

* 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 <shrihari.rathod@primaryio.com>

* Update tgtd.c

* Resolve warnings

Signed-off-by: Shrihari Rathod <shrihari.rathod@primaryio.com>

* Incorporating review comments

Signed-off-by: Shrihari Rathod <shrihari.rathod@primaryio.com>

* Reverting error path changes

 Changes still not stable further investigation required.

Signed-off-by: Shrihari Rathod <shrihari.rathod@primaryio.com>
* Concurrent REST call handling

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

Signed-off-by: Shrihari Rathod <shrihari.rathod@primaryio.com>

* Blocking instead of failing rest calls

Signed-off-by: Shrihari Rathod <shrihari.rathod@primaryio.com>

* Reducing scope of mutex

Reviewed by: Sumit Kumar
Signed-off-by: Shrihari Rathod <shrihari.rathod@primaryio.com>
Redesign stord client code

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

Signed-off-by: Prasad Joshi <Prasad.Joshi@primaryio.com>
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 <Prasad.Joshi@primaryio.com>
* 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 <shrihari.rathod@primaryio.com>
(cherry picked from commit a83ec53)

* Increasing REST queue size to 40

Approved by: Sumit Kumar
Signed-off-by: Shrihari Rathod <shrihari.rathod@primaryio.com>
…thrift client

Signed-off-by: Vikram Jadhav <vikram.jadhav@primaryio.com>
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