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]

 



Hi Andy,

On Fri, 2012-08-03 at 14:24 -0700, Andy Grover wrote:
> [trimming CCs]
> [resurrecting old thread]
> 

Apologies for the slightly delayed response here..

> On 05/31/2012 01:25 AM, Nicholas A. Bellinger wrote:
> > [PATCH-v2] 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 signaling when to explicitly 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.
> 
> rtslib lets you specify buffered or unbuffered when creating backstores,
> and would set fd_buffered_io=1. Should it just set
> attrib/emulate_write_cache=1 now that fd_buffered_io=1 is gone?
> 

So I've been thinking about this more, and am now considering to re-add
an optional buffered FILEIO mode for people who understand what the
risks are here wrt to data integrity + H/A failover, but still want the
performance benefits of buffer cache for single node FILEIO backends w/
FUA WRITE + SYNCHRONIZE_CACHE.

The one small bit that I'd like to also add is to force the setting of
emulate_write_cache=1 (and cannot be disabled) when buffered FILEIO mode
has been explicitly enabled by user.

> Or to ask another way: overall, how should this option be presented to
> the user? It seems rather important, and applies to both fileio and iblock.
> 

So IBLOCK is different here because submit_bio() does not do any type of
caching, unless your actual backend is doing it of course..

However, you'll typically still want to always set emulate_write_cache=1
here, otherwise SCSI clients (esp .32 based Linux distro ones) tend to
perform much, much worse for almost every workload once they determine
that write cache is disabled.

--nab

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux