[PATCH 42/42] block, drivers, fs: rename REQ_FLUSH to REQ_PREFLUSH

2016-04-15 Thread mchristi
From: Mike Christie 

To avoid confusion between REQ_OP_FLUSH, which is handled by
request_fn drivers, and upper layers requesting the block layer
perform a flush sequence along with possibly a WRITE, this patch
renames REQ_FLUSH to REQ_PREFLUSH.

Signed-off-by: Mike Christie 
Reviewed-by: Christoph Hellwig 
Reviewed-by: Hannes Reinecke 
---
 Documentation/block/writeback_cache_control.txt | 22 +++---
 Documentation/device-mapper/log-writes.txt  | 10 +-
 block/blk-core.c| 12 ++--
 block/blk-flush.c   | 16 
 block/blk-mq.c  |  4 ++--
 drivers/block/drbd/drbd_actlog.c|  4 ++--
 drivers/block/drbd/drbd_main.c  |  2 +-
 drivers/block/drbd/drbd_protocol.h  |  2 +-
 drivers/block/drbd/drbd_receiver.c  |  2 +-
 drivers/block/drbd/drbd_req.c   |  2 +-
 drivers/md/bcache/journal.c |  2 +-
 drivers/md/bcache/request.c |  8 
 drivers/md/dm-cache-target.c| 12 ++--
 drivers/md/dm-crypt.c   |  7 ---
 drivers/md/dm-era-target.c  |  4 ++--
 drivers/md/dm-io.c  |  2 +-
 drivers/md/dm-log-writes.c  |  2 +-
 drivers/md/dm-raid1.c   |  5 +++--
 drivers/md/dm-region-hash.c |  4 ++--
 drivers/md/dm-snap.c|  6 +++---
 drivers/md/dm-stripe.c  |  2 +-
 drivers/md/dm-thin.c|  8 
 drivers/md/dm.c | 12 ++--
 drivers/md/linear.c |  2 +-
 drivers/md/md.c |  2 +-
 drivers/md/md.h |  2 +-
 drivers/md/multipath.c  |  2 +-
 drivers/md/raid0.c  |  2 +-
 drivers/md/raid1.c  |  3 ++-
 drivers/md/raid10.c |  2 +-
 drivers/md/raid5-cache.c|  2 +-
 drivers/md/raid5.c  |  2 +-
 fs/btrfs/check-integrity.c  |  8 
 fs/jbd2/journal.c   |  2 +-
 fs/xfs/xfs_buf.c|  2 +-
 include/linux/blk_types.h   |  8 
 include/linux/fs.h  |  4 ++--
 include/trace/events/f2fs.h |  2 +-
 kernel/trace/blktrace.c |  5 +++--
 39 files changed, 102 insertions(+), 98 deletions(-)

diff --git a/Documentation/block/writeback_cache_control.txt 
b/Documentation/block/writeback_cache_control.txt
index da70bda..8a6bdad 100644
--- a/Documentation/block/writeback_cache_control.txt
+++ b/Documentation/block/writeback_cache_control.txt
@@ -20,11 +20,11 @@ a forced cache flush, and the Force Unit Access (FUA) flag 
for requests.
 Explicit cache flushes
 --
 
-The REQ_FLUSH flag can be OR ed into the r/w flags of a bio submitted from
+The REQ_PREFLUSH flag can be OR ed into the r/w flags of a bio submitted from
 the filesystem and will make sure the volatile cache of the storage device
 has been flushed before the actual I/O operation is started.  This explicitly
 guarantees that previously completed write requests are on non-volatile
-storage before the flagged bio starts. In addition the REQ_FLUSH flag can be
+storage before the flagged bio starts. In addition the REQ_PREFLUSH flag can be
 set on an otherwise empty bio structure, which causes only an explicit cache
 flush without any dependent I/O.  It is recommend to use
 the blkdev_issue_flush() helper for a pure cache flush.
@@ -41,21 +41,21 @@ signaled after the data has been committed to non-volatile 
storage.
 Implementation details for filesystems
 --
 
-Filesystems can simply set the REQ_FLUSH and REQ_FUA bits and do not have to
+Filesystems can simply set the REQ_PREFLUSH and REQ_FUA bits and do not have to
 worry if the underlying devices need any explicit cache flushing and how
-the Forced Unit Access is implemented.  The REQ_FLUSH and REQ_FUA flags
+the Forced Unit Access is implemented.  The REQ_PREFLUSH and REQ_FUA flags
 may both be set on a single bio.
 
 
 Implementation details for make_request_fn based block drivers
 --
 
-These drivers will always see the REQ_FLUSH and REQ_FUA bits as they sit
+These drivers will always see the REQ_PREFLUSH and REQ_FUA bits as they sit
 directly below the submit_bio interface.  For remapping drivers the REQ_FUA
 bits need to be propagated to underlying devices, and a global flush needs
-to be implemented for bios 

[PATCH 42/42] block, drivers, fs: rename REQ_FLUSH to REQ_PREFLUSH

2016-04-15 Thread mchristi
From: Mike Christie 

To avoid confusion between REQ_OP_FLUSH, which is handled by
request_fn drivers, and upper layers requesting the block layer
perform a flush sequence along with possibly a WRITE, this patch
renames REQ_FLUSH to REQ_PREFLUSH.

Signed-off-by: Mike Christie 
Reviewed-by: Christoph Hellwig 
Reviewed-by: Hannes Reinecke 
---
 Documentation/block/writeback_cache_control.txt | 22 +++---
 Documentation/device-mapper/log-writes.txt  | 10 +-
 block/blk-core.c| 12 ++--
 block/blk-flush.c   | 16 
 block/blk-mq.c  |  4 ++--
 drivers/block/drbd/drbd_actlog.c|  4 ++--
 drivers/block/drbd/drbd_main.c  |  2 +-
 drivers/block/drbd/drbd_protocol.h  |  2 +-
 drivers/block/drbd/drbd_receiver.c  |  2 +-
 drivers/block/drbd/drbd_req.c   |  2 +-
 drivers/md/bcache/journal.c |  2 +-
 drivers/md/bcache/request.c |  8 
 drivers/md/dm-cache-target.c| 12 ++--
 drivers/md/dm-crypt.c   |  7 ---
 drivers/md/dm-era-target.c  |  4 ++--
 drivers/md/dm-io.c  |  2 +-
 drivers/md/dm-log-writes.c  |  2 +-
 drivers/md/dm-raid1.c   |  5 +++--
 drivers/md/dm-region-hash.c |  4 ++--
 drivers/md/dm-snap.c|  6 +++---
 drivers/md/dm-stripe.c  |  2 +-
 drivers/md/dm-thin.c|  8 
 drivers/md/dm.c | 12 ++--
 drivers/md/linear.c |  2 +-
 drivers/md/md.c |  2 +-
 drivers/md/md.h |  2 +-
 drivers/md/multipath.c  |  2 +-
 drivers/md/raid0.c  |  2 +-
 drivers/md/raid1.c  |  3 ++-
 drivers/md/raid10.c |  2 +-
 drivers/md/raid5-cache.c|  2 +-
 drivers/md/raid5.c  |  2 +-
 fs/btrfs/check-integrity.c  |  8 
 fs/jbd2/journal.c   |  2 +-
 fs/xfs/xfs_buf.c|  2 +-
 include/linux/blk_types.h   |  8 
 include/linux/fs.h  |  4 ++--
 include/trace/events/f2fs.h |  2 +-
 kernel/trace/blktrace.c |  5 +++--
 39 files changed, 102 insertions(+), 98 deletions(-)

diff --git a/Documentation/block/writeback_cache_control.txt 
b/Documentation/block/writeback_cache_control.txt
index da70bda..8a6bdad 100644
--- a/Documentation/block/writeback_cache_control.txt
+++ b/Documentation/block/writeback_cache_control.txt
@@ -20,11 +20,11 @@ a forced cache flush, and the Force Unit Access (FUA) flag 
for requests.
 Explicit cache flushes
 --
 
-The REQ_FLUSH flag can be OR ed into the r/w flags of a bio submitted from
+The REQ_PREFLUSH flag can be OR ed into the r/w flags of a bio submitted from
 the filesystem and will make sure the volatile cache of the storage device
 has been flushed before the actual I/O operation is started.  This explicitly
 guarantees that previously completed write requests are on non-volatile
-storage before the flagged bio starts. In addition the REQ_FLUSH flag can be
+storage before the flagged bio starts. In addition the REQ_PREFLUSH flag can be
 set on an otherwise empty bio structure, which causes only an explicit cache
 flush without any dependent I/O.  It is recommend to use
 the blkdev_issue_flush() helper for a pure cache flush.
@@ -41,21 +41,21 @@ signaled after the data has been committed to non-volatile 
storage.
 Implementation details for filesystems
 --
 
-Filesystems can simply set the REQ_FLUSH and REQ_FUA bits and do not have to
+Filesystems can simply set the REQ_PREFLUSH and REQ_FUA bits and do not have to
 worry if the underlying devices need any explicit cache flushing and how
-the Forced Unit Access is implemented.  The REQ_FLUSH and REQ_FUA flags
+the Forced Unit Access is implemented.  The REQ_PREFLUSH and REQ_FUA flags
 may both be set on a single bio.
 
 
 Implementation details for make_request_fn based block drivers
 --
 
-These drivers will always see the REQ_FLUSH and REQ_FUA bits as they sit
+These drivers will always see the REQ_PREFLUSH and REQ_FUA bits as they sit
 directly below the submit_bio interface.  For remapping drivers the REQ_FUA
 bits need to be propagated to underlying devices, and a global flush needs
-to be implemented for bios 

[PATCH 42/42] block, drivers, fs: rename REQ_FLUSH to REQ_PREFLUSH

2016-04-13 Thread mchristi
From: Mike Christie 

To avoid confusion between REQ_OP_FLUSH, which is handled by
request_fn drivers, and upper layers requesting the block layer
perform a flush sequence along with possibly a WRITE, this patch
renames REQ_FLUSH to REQ_PREFLUSH.

Signed-off-by: Mike Christie 
Reviewed-by: Christoph Hellwig 
---
 Documentation/block/writeback_cache_control.txt | 22 +++---
 Documentation/device-mapper/log-writes.txt  | 10 +-
 block/blk-core.c| 12 ++--
 block/blk-flush.c   | 16 
 block/blk-mq.c  |  4 ++--
 drivers/block/drbd/drbd_actlog.c|  4 ++--
 drivers/block/drbd/drbd_main.c  |  2 +-
 drivers/block/drbd/drbd_protocol.h  |  2 +-
 drivers/block/drbd/drbd_receiver.c  |  2 +-
 drivers/block/drbd/drbd_req.c   |  2 +-
 drivers/md/bcache/journal.c |  2 +-
 drivers/md/bcache/request.c |  8 
 drivers/md/dm-cache-target.c| 12 ++--
 drivers/md/dm-crypt.c   |  7 ---
 drivers/md/dm-era-target.c  |  4 ++--
 drivers/md/dm-io.c  |  2 +-
 drivers/md/dm-log-writes.c  |  2 +-
 drivers/md/dm-raid1.c   |  5 +++--
 drivers/md/dm-region-hash.c |  4 ++--
 drivers/md/dm-snap.c|  6 +++---
 drivers/md/dm-stripe.c  |  2 +-
 drivers/md/dm-thin.c|  8 
 drivers/md/dm.c | 12 ++--
 drivers/md/linear.c |  2 +-
 drivers/md/md.c |  2 +-
 drivers/md/md.h |  2 +-
 drivers/md/multipath.c  |  2 +-
 drivers/md/raid0.c  |  2 +-
 drivers/md/raid1.c  |  3 ++-
 drivers/md/raid10.c |  2 +-
 drivers/md/raid5-cache.c|  2 +-
 drivers/md/raid5.c  |  2 +-
 fs/btrfs/check-integrity.c  |  8 
 fs/jbd2/journal.c   |  2 +-
 fs/xfs/xfs_buf.c|  2 +-
 include/linux/blk_types.h   |  8 
 include/linux/fs.h  |  4 ++--
 include/trace/events/f2fs.h |  2 +-
 kernel/trace/blktrace.c |  5 +++--
 39 files changed, 102 insertions(+), 98 deletions(-)

diff --git a/Documentation/block/writeback_cache_control.txt 
b/Documentation/block/writeback_cache_control.txt
index da70bda..8a6bdad 100644
--- a/Documentation/block/writeback_cache_control.txt
+++ b/Documentation/block/writeback_cache_control.txt
@@ -20,11 +20,11 @@ a forced cache flush, and the Force Unit Access (FUA) flag 
for requests.
 Explicit cache flushes
 --
 
-The REQ_FLUSH flag can be OR ed into the r/w flags of a bio submitted from
+The REQ_PREFLUSH flag can be OR ed into the r/w flags of a bio submitted from
 the filesystem and will make sure the volatile cache of the storage device
 has been flushed before the actual I/O operation is started.  This explicitly
 guarantees that previously completed write requests are on non-volatile
-storage before the flagged bio starts. In addition the REQ_FLUSH flag can be
+storage before the flagged bio starts. In addition the REQ_PREFLUSH flag can be
 set on an otherwise empty bio structure, which causes only an explicit cache
 flush without any dependent I/O.  It is recommend to use
 the blkdev_issue_flush() helper for a pure cache flush.
@@ -41,21 +41,21 @@ signaled after the data has been committed to non-volatile 
storage.
 Implementation details for filesystems
 --
 
-Filesystems can simply set the REQ_FLUSH and REQ_FUA bits and do not have to
+Filesystems can simply set the REQ_PREFLUSH and REQ_FUA bits and do not have to
 worry if the underlying devices need any explicit cache flushing and how
-the Forced Unit Access is implemented.  The REQ_FLUSH and REQ_FUA flags
+the Forced Unit Access is implemented.  The REQ_PREFLUSH and REQ_FUA flags
 may both be set on a single bio.
 
 
 Implementation details for make_request_fn based block drivers
 --
 
-These drivers will always see the REQ_FLUSH and REQ_FUA bits as they sit
+These drivers will always see the REQ_PREFLUSH and REQ_FUA bits as they sit
 directly below the submit_bio interface.  For remapping drivers the REQ_FUA
 bits need to be propagated to underlying devices, and a global flush needs
-to be implemented for bios with the REQ_FLUSH bit set.  For real device