Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208251
b: refs/heads/master
c: 98d8c8f
h: refs/heads/master
i:
  208249: 42a4881
  208247: 1fce9cd
v: v3
  • Loading branch information
FUJITA Tomonori authored and Jens Axboe committed Aug 7, 2010
1 parent c5fc35d commit 2f7db06
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 20 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: 7f9815f09dc201f2205981c11fadcf82a9e3cc42
refs/heads/master: 98d8c8f40ed72d997e50bc107a5cc1a6cee19e76
25 changes: 6 additions & 19 deletions trunk/drivers/block/ps3disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,12 @@ static void ps3disk_do_request(struct ps3_storage_device *dev,
dev_dbg(&dev->sbd.core, "%s:%u\n", __func__, __LINE__);

while ((req = blk_fetch_request(q))) {
if (req->cmd_type == REQ_TYPE_FS) {
if (ps3disk_submit_request_sg(dev, req))
break;
} else if (req->cmd_type == REQ_TYPE_LINUX_BLOCK &&
req->cmd[0] == REQ_LB_OP_FLUSH) {
if (req->cmd_flags & REQ_FLUSH) {
if (ps3disk_submit_flush_request(dev, req))
break;
} else if (req->cmd_type == REQ_TYPE_FS) {
if (ps3disk_submit_request_sg(dev, req))
break;
} else {
blk_dump_rq_flags(req, DEVICE_NAME " bad request");
__blk_end_request_all(req, -EIO);
Expand Down Expand Up @@ -257,8 +256,7 @@ static irqreturn_t ps3disk_interrupt(int irq, void *data)
return IRQ_HANDLED;
}

if (req->cmd_type == REQ_TYPE_LINUX_BLOCK &&
req->cmd[0] == REQ_LB_OP_FLUSH) {
if (req->cmd_flags & REQ_FLUSH) {
read = 0;
op = "flush";
} else {
Expand Down Expand Up @@ -398,16 +396,6 @@ static int ps3disk_identify(struct ps3_storage_device *dev)
return 0;
}

static void ps3disk_prepare_flush(struct request_queue *q, struct request *req)
{
struct ps3_storage_device *dev = q->queuedata;

dev_dbg(&dev->sbd.core, "%s:%u\n", __func__, __LINE__);

req->cmd_type = REQ_TYPE_LINUX_BLOCK;
req->cmd[0] = REQ_LB_OP_FLUSH;
}

static unsigned long ps3disk_mask;

static DEFINE_MUTEX(ps3disk_mask_mutex);
Expand Down Expand Up @@ -480,8 +468,7 @@ static int __devinit ps3disk_probe(struct ps3_system_bus_device *_dev)
blk_queue_dma_alignment(queue, dev->blk_size-1);
blk_queue_logical_block_size(queue, dev->blk_size);

blk_queue_ordered(queue, QUEUE_ORDERED_DRAIN_FLUSH,
ps3disk_prepare_flush);
blk_queue_ordered(queue, QUEUE_ORDERED_DRAIN_FLUSH, NULL);

blk_queue_max_segments(queue, -1);
blk_queue_max_segment_size(queue, dev->bounce_size);
Expand Down

0 comments on commit 2f7db06

Please sign in to comment.