mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
d30a2605be
commit
e17fc0a1cc
8 changed files with 42 additions and 23 deletions
|
|
@ -161,7 +161,7 @@ static int blk_ioctl_discard(struct block_device *bdev, uint64_t start,
|
|||
bio->bi_size = len << 9;
|
||||
len = 0;
|
||||
}
|
||||
submit_bio(WRITE_DISCARD, bio);
|
||||
submit_bio(DISCARD_NOBARRIER, bio);
|
||||
|
||||
wait_for_completion(&wait);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue