summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_file.h
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2012-09-29 17:15:37 -0700
committerNicholas Bellinger <nab@linux-iscsi.org>2012-10-02 13:15:21 -0700
commitb32f4c7ed85c5cee2a21a55c9f59ebc9d57a2463 (patch)
tree547896c5f54e03ba8635ae22b35f4d534b2272fe /drivers/target/target_core_file.h
parentf25590f39d543272f7ae7b00d533359c8d7ff331 (diff)
downloadlinux-stable-b32f4c7ed85c5cee2a21a55c9f59ebc9d57a2463.tar.gz
linux-stable-b32f4c7ed85c5cee2a21a55c9f59ebc9d57a2463.tar.bz2
linux-stable-b32f4c7ed85c5cee2a21a55c9f59ebc9d57a2463.zip
target/file: Re-enable optional fd_buffered_io=1 operation
This patch re-adds the ability to optionally run in buffered FILEIO mode (eg: w/o O_DSYNC) for device backends in order to once again use the Linux buffered cache as a write-back storage mechanism. This logic was originally dropped with mainline v3.5-rc commit: commit a4dff3043c231d57f982af635c9d2192ee40e5ae Author: Nicholas Bellinger <nab@linux-iscsi.org> Date: Wed May 30 16:25:41 2012 -0700 target/file: Use O_DSYNC by default for FILEIO backends This difference with this patch is that fd_create_virtdevice() now forces the explicit setting of emulate_write_cache=1 when buffered FILEIO operation has been enabled. (v2: Switch to FDBD_HAS_BUFFERED_IO_WCE + add more detailed comment as requested by hch) Reported-by: Ferry <iscsitmp@bananateam.nl> Cc: Christoph Hellwig <hch@lst.de> Cc: <stable@vger.kernel.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_file.h')
-rw-r--r--drivers/target/target_core_file.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/target/target_core_file.h b/drivers/target/target_core_file.h
index 70ce7fd7111d..876ae53ef5b8 100644
--- a/drivers/target/target_core_file.h
+++ b/drivers/target/target_core_file.h
@@ -14,6 +14,7 @@
#define FBDF_HAS_PATH 0x01
#define FBDF_HAS_SIZE 0x02
+#define FDBD_HAS_BUFFERED_IO_WCE 0x04
struct fd_dev {
u32 fbd_flags;