aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-barrier.c
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2008-08-09 11:42:20 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 02:56:02 -0400
commite17fc0a1ccf88f6d4dcb363729f3141b0958c325 (patch)
tree0a7c2dc1c3159c2af14d87c67ca83e158b2c78b5 /block/blk-barrier.c
parentd30a2605be9d5132d95944916e8f578fcfe4f976 (diff)
Allow elevators to sort/merge discard requests
But blkdev_issue_discard() still emits requests which are interpreted as soft barriers, because naïve callers might otherwise issue subsequent writes to those same sectors, which might cross on the queue (if they're reallocated quickly enough). Callers still _can_ issue non-barrier discard requests, but they have to take care of queue ordering for themselves. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-barrier.c')
-rw-r--r--block/blk-barrier.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-barrier.c b/block/blk-barrier.c
index e5448131d4f1..988b63479b2f 100644
--- a/block/blk-barrier.c
+++ b/block/blk-barrier.c
@@ -372,7 +372,7 @@ int blkdev_issue_discard(struct block_device *bdev, sector_t sector,
372 nr_sects = 0; 372 nr_sects = 0;
373 } 373 }
374 bio_get(bio); 374 bio_get(bio);
375 submit_bio(WRITE_DISCARD, bio); 375 submit_bio(DISCARD_BARRIER, bio);
376 376
377 /* Check if it failed immediately */ 377 /* Check if it failed immediately */
378 if (bio_flagged(bio, BIO_EOPNOTSUPP)) 378 if (bio_flagged(bio, BIO_EOPNOTSUPP))