aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_file.h
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2012-05-30 16:25:41 -0700
committerBen Hutchings <ben@decadent.org.uk>2012-06-10 14:42:08 +0100
commit2492cd118dc5221953054e58f3fd81927b8beda9 (patch)
tree10420b3e14cbcc0a55b24c20e5f5c8ca89af600d /drivers/target/target_core_file.h
parent7d094819d85c415f785e4680e48d7cef3fa51f71 (diff)
downloadkernel_samsung_smdk4412-2492cd118dc5221953054e58f3fd81927b8beda9.zip
kernel_samsung_smdk4412-2492cd118dc5221953054e58f3fd81927b8beda9.tar.gz
kernel_samsung_smdk4412-2492cd118dc5221953054e58f3fd81927b8beda9.tar.bz2
target/file: Use O_DSYNC by default for FILEIO backends
commit a4dff3043c231d57f982af635c9d2192ee40e5ae upstream. 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> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> [bwh: Backported to 3.2: - We have fd_do_task() and not fd_execute_cmd() - Various fields are in struct se_task rather than struct se_cmd - fd_create_virtdevice() flags initialisation hasn't been cleaned up]
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 59e6e73..53ece69 100644
--- a/drivers/target/target_core_file.h
+++ b/drivers/target/target_core_file.h
@@ -18,7 +18,6 @@ struct fd_request {
#define FBDF_HAS_PATH 0x01
#define FBDF_HAS_SIZE 0x02
-#define FDBD_USE_BUFFERED_IO 0x04
struct fd_dev {
u32 fbd_flags;