summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_file.h
diff options
context:
space:
mode:
authorNicholas Bellinger2012-05-31 01:25:41 +0200
committerNicholas Bellinger2012-06-03 08:47:20 +0200
commita4dff3043c231d57f982af635c9d2192ee40e5ae (patch)
tree929866a22366a1f98601b946049eaa3bb6a0b748 /drivers/target/target_core_file.h
parentsbp-target: rename a variable to avoid name clash (diff)
downloadkernel-qcow2-linux-a4dff3043c231d57f982af635c9d2192ee40e5ae.tar.gz
kernel-qcow2-linux-a4dff3043c231d57f982af635c9d2192ee40e5ae.tar.xz
kernel-qcow2-linux-a4dff3043c231d57f982af635c9d2192ee40e5ae.zip
target/file: Use O_DSYNC by default for FILEIO backends
Convert to use O_DSYNC for all cases at FILEIO backend creation time to avoid the extra syncing of pure timestamp updates with legacy O_SYNC during default operation as recommended by hch. Continue to do this independently of Write Cache Enable (WCE) bit, as WCE=0 is currently the default for all backend devices and enabled by user on per device basis via attrib/emulate_write_cache. This patch drops the now unnecessary fd_buffered_io= token usage that was originally signalling when to explictly disable O_SYNC at backend creation time for buffered I/O operation. This can end up being dangerous for a number of reasons during physical node failure, so go ahead and drop this option for now when O_DSYNC is used as the default. Also allow explict FUA WRITEs -> vfs_fsync_range() call to function in fd_execute_cmd() independently of WCE bit setting. Reported-by: Christoph Hellwig <hch@lst.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> 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, 0 insertions, 1 deletions
diff --git a/drivers/target/target_core_file.h b/drivers/target/target_core_file.h
index fbd59ef7d8be..70ce7fd7111d 100644
--- a/drivers/target/target_core_file.h
+++ b/drivers/target/target_core_file.h
@@ -14,7 +14,6 @@
#define FBDF_HAS_PATH 0x01
#define FBDF_HAS_SIZE 0x02
-#define FDBD_USE_BUFFERED_IO 0x04
struct fd_dev {
u32 fbd_flags;