diff options
| author | Dolev Raviv <draviv@codeaurora.org> | 2015-07-01 12:52:25 +0300 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:01:36 -0700 |
| commit | 59049166893ae5d883db1cd2706114a40391c0df (patch) | |
| tree | edff13a54113fc160df32018a33f437c87dad42e /include/linux/blkdev.h | |
| parent | 7472ef2e312ebc37de6a3194868773ed0f4dae8a (diff) | |
block: blk-flush: Add support for Barrier flag
A barrier request is used to control ordering of write requests without
clearing the device's cache. LLD support for barrier is optional. If LLD
doesn't support barrier, flush will be issued instead to insure logical
correctness.
To maintain this fallback flush s/w path and flags are appended.
This patch implements the necessary requests marking in order to support
the barrier feature in the block layer.
This patch implements two major changes required for the barrier support.
(1) A new flush execution-policy is added to support "ordered" requests
and a fallback , in case barrier is not supported by LLD.
(2) If there is a flush pending in the flush-queue, the received barrier
is ignored, in order not to miss a demand for an actual flush.
Change-Id: I6072d759e5c3bd983105852d81732e949da3d448
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
Diffstat (limited to 'include/linux/blkdev.h')
| -rw-r--r-- | include/linux/blkdev.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index c70e3588a48c..0adfa9e76f64 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1118,6 +1118,7 @@ static inline struct request *blk_map_queue_find_tag(struct blk_queue_tag *bqt, #define BLKDEV_DISCARD_SECURE 0x01 /* secure discard */ extern int blkdev_issue_flush(struct block_device *, gfp_t, sector_t *); +extern int blkdev_issue_barrier(struct block_device *, gfp_t, sector_t *); extern int blkdev_issue_discard(struct block_device *bdev, sector_t sector, sector_t nr_sects, gfp_t gfp_mask, unsigned long flags); extern int blkdev_issue_write_same(struct block_device *bdev, sector_t sector, |
