Re: [PATCH] target/file: Drop O_SYNC in favor of implict vfs_fsync_range for writes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, May 30, 2012 at 11:57:43PM +0000, Nicholas A. Bellinger wrote:
> From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
> 
> This patch converts fd_execute_cmd() code to drop O_SYNC usage
> (the original default) in favor of always preforming an implict
> SCSI forced unit access (FUA) operation using vfs_fsync_range()
> based on LBA + SectorCount after each completed FILEIO backend write.
> 
> This conversion was inspired by Linus's thoughts on O_SYNC usage in
> the thread: http://www.spinics.net/lists/linux-fsdevel/msg55681.html
> 
>   "O_SYNC is the absolutely anti-thesis of that kind of "multiple levels
>    of overlapping IO". Because it requires that the IO is _done_ by the
>    time you start more, which is against the whole point."
> 
> This patch also drops the now unnecessary fd_buffered_io= token usage
> at createvirtdev time.  Tested with lio-core code using fio writeverify
> to local tcm_loop + FILEIO <-> scsi_debug backed LUNs.

If you look at the implementation O_SYNC really just means an implicit
vfs_fsync_range after each write, thus I can't see how this patch makes any
difference.

For target use with WCE=0 semantics you could at least switch to O_DSYNC, though.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Photos]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux