Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249120
b: refs/heads/master
c: 76abfaa
h: refs/heads/master
v: v3
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Apr 25, 2011
1 parent 34cdaec commit 8b05933
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8f8e57ab9ad30b90e0ce8afbbf39434d978b7bb4
refs/heads/master: 76abfaa351966763dac075678c446b0b8c59654d
45 changes: 22 additions & 23 deletions trunk/drivers/staging/hv/blkvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1140,10 +1140,31 @@ static int blkvsc_do_request(struct block_device_context *blkdev,
return pending;
}

static int blkvsc_do_pending_reqs(struct block_device_context *blkdev)
{
struct blkvsc_request *pend_req, *tmp;
int ret = 0;

/* Flush the pending list first */
list_for_each_entry_safe(pend_req, tmp, &blkdev->pending_list,
pend_entry) {
DPRINT_DBG(BLKVSC_DRV, "working off pending_list - %p\n",
pend_req);

ret = blkvsc_submit_request(pend_req,
blkvsc_request_completion);
if (ret != 0)
break;
else
list_del(&pend_req->pend_entry);
}

return ret;
}

/* Static decl */
static int blkvsc_probe(struct device *dev);
static void blkvsc_request(struct request_queue *queue);
static int blkvsc_do_pending_reqs(struct block_device_context *blkdev);

static int blkvsc_ringbuffer_size = BLKVSC_RING_BUFFER_SIZE;
module_param(blkvsc_ringbuffer_size, int, S_IRUGO);
Expand Down Expand Up @@ -1470,28 +1491,6 @@ static void blkvsc_request_completion(struct hv_storvsc_request *request)
spin_unlock_irqrestore(&blkdev->lock, flags);
}

static int blkvsc_do_pending_reqs(struct block_device_context *blkdev)
{
struct blkvsc_request *pend_req, *tmp;
int ret = 0;

/* Flush the pending list first */
list_for_each_entry_safe(pend_req, tmp, &blkdev->pending_list,
pend_entry) {
DPRINT_DBG(BLKVSC_DRV, "working off pending_list - %p\n",
pend_req);

ret = blkvsc_submit_request(pend_req,
blkvsc_request_completion);
if (ret != 0)
break;
else
list_del(&pend_req->pend_entry);
}

return ret;
}

static void blkvsc_request(struct request_queue *queue)
{
struct block_device_context *blkdev = NULL;
Expand Down

0 comments on commit 8b05933

Please sign in to comment.