diff options
author | Jens Axboe <axboe@suse.de> | 2006-08-10 02:44:47 -0400 |
---|---|---|
committer | Jens Axboe <axboe@nelson.home.kernel.dk> | 2006-09-30 14:23:37 -0400 |
commit | 4aff5e2333c9a1609662f2091f55c3f6fffdad36 (patch) | |
tree | b73d8c2b7c1bdc03d3313c108da7dfc95ee95525 /drivers/block/nbd.c | |
parent | 77ed74da26f50fa28471571ee7a2251b77526d84 (diff) |
[PATCH] Split struct request ->flags into two parts
Right now ->flags is a bit of a mess: some are request types, and
others are just modifiers. Clean this up by splitting it into
->cmd_type and ->cmd_flags. This allows introduction of generic
Linux block message types, useful for sending generic Linux commands
to block devices.
Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'drivers/block/nbd.c')
-rw-r--r-- | drivers/block/nbd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index bdbade9a5cf5..9d1035e8d9d8 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c | |||
@@ -407,10 +407,10 @@ static void do_nbd_request(request_queue_t * q) | |||
407 | struct nbd_device *lo; | 407 | struct nbd_device *lo; |
408 | 408 | ||
409 | blkdev_dequeue_request(req); | 409 | blkdev_dequeue_request(req); |
410 | dprintk(DBG_BLKDEV, "%s: request %p: dequeued (flags=%lx)\n", | 410 | dprintk(DBG_BLKDEV, "%s: request %p: dequeued (flags=%x)\n", |
411 | req->rq_disk->disk_name, req, req->flags); | 411 | req->rq_disk->disk_name, req, req->cmd_type); |
412 | 412 | ||
413 | if (!(req->flags & REQ_CMD)) | 413 | if (!blk_fs_request(req)) |
414 | goto error_out; | 414 | goto error_out; |
415 | 415 | ||
416 | lo = req->rq_disk->private_data; | 416 | lo = req->rq_disk->private_data; |
@@ -489,7 +489,7 @@ static int nbd_ioctl(struct inode *inode, struct file *file, | |||
489 | switch (cmd) { | 489 | switch (cmd) { |
490 | case NBD_DISCONNECT: | 490 | case NBD_DISCONNECT: |
491 | printk(KERN_INFO "%s: NBD_DISCONNECT\n", lo->disk->disk_name); | 491 | printk(KERN_INFO "%s: NBD_DISCONNECT\n", lo->disk->disk_name); |
492 | sreq.flags = REQ_SPECIAL; | 492 | sreq.cmd_type = REQ_TYPE_SPECIAL; |
493 | nbd_cmd(&sreq) = NBD_CMD_DISC; | 493 | nbd_cmd(&sreq) = NBD_CMD_DISC; |
494 | /* | 494 | /* |
495 | * Set these to sane values in case server implementation | 495 | * Set these to sane values in case server implementation |