Enable single requests to be submitted to the ring

When a SRB has been prepared, its constituent requests are appended
to a request queue. Requests are submitted to the ring from this request
queue, allowing a SRB to be partially submitted due to limited free
slots on the ring.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Remove unneeded include

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Tidy up code with Granter/Notifier/BlockRing accessors

Signed-off-by: Owen Smith <owen.smith@citrix.com>
No need to lock when accessing private front ring.
Move lock to insertion pathway only.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Reduce calls to BlockRingPush and NotifierSend during PdoSubmitPrepared
Remove ListContains assertions

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Tidy up REQUEST preparation code,
Move scatter gather access to SGList* functions
Move mapping memory to seperate function
Reduce unneccessary local variable usage

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Split XENVBD_REQUEST into unioned parts by BLKIF_OP_*

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Refactor to improve code clarity

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Add handler for SCSIOP_UNMAP, translating to BLKIF_OP_DISCARD
Note: Storport will not generate SCSIOP_UNMAPs, a filter will be
      required to convert IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES
	  into SCSIOP_UNMAPs

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Wrap lookaside list access to an inline structure
Allows tight coupling of event, count and lookaside list access

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Manage SrbStatus better.
Set to PENDING (once) before any actions occur, and only set to success when
completing the SRB. SrbStatus is set to a fail code if any Requests fail.
The fail code can be overwritten with a different fail code, but not with a
success code.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Merge pull request #10 from OwenSmith/use-request-queue

Use request queue