[BLOCK] update IDE to use new blk_ordered for barriers

Update IDE to use new blk_ordered.  This change makes the
following behavior changes.

* Partial completion of the barrier request is handled as
  failure of the whole ordered sequence.  No more partial
  completion for barrier requests.

* Any failure of pre or post flush request results in failure
  of the whole ordered sequence.

So, successfully completed ordered sequence guarantees that
all requests prior to the barrier made to physical medium and,
then, the while barrier request made to the physical medium.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
This commit is contained in:
Tejun Heo
2006-01-06 09:57:31 +01:00
committed by Jens Axboe
parent 9a3dccc425
commit 3e087b5754
2 changed files with 54 additions and 88 deletions

View File

@@ -119,10 +119,7 @@ int ide_end_request (ide_drive_t *drive, int uptodate, int nr_sectors)
if (!nr_sectors)
nr_sectors = rq->hard_cur_sectors;
if (blk_complete_barrier_rq_locked(drive->queue, rq, nr_sectors))
ret = rq->nr_sectors != 0;
else
ret = __ide_end_request(drive, rq, uptodate, nr_sectors);
ret = __ide_end_request(drive, rq, uptodate, nr_sectors);
spin_unlock_irqrestore(&ide_lock, flags);
return ret;