Re: Provision for filesystem specific open flags

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

 



On Fri, Nov 10, 2017 at 09:04:31PM +0000, Fu, Rodney wrote:
> > No.  If you want new flags bits, make a public proposal.  Maybe some other
> > filesystem would also benefit from them.
> 
> Ah, I see what you mean now, thanks.
> 
> I would like to propose O_CONCURRENT_WRITE as a new open flag.  It is
> currently used in the Panasas filesystem (panfs) and defined with value:
> 
> #define O_CONCURRENT_WRITE 020000000000
> 
> This flag has been provided by panfs to HPC users via the mpich package for
> well over a decade.  See:
> 
> https://github.com/pmodels/mpich/blob/master/src/mpi/romio/adio/ad_panfs/ad_panfs_open6.c#L344
> 
> O_CONCURRENT_WRITE indicates to the filesystem that the application doing the
> open is participating in a coordinated distributed manner with other such
> applications, possibly running on different hosts.  This allows the panfs
> filesystem to delegate some of the cache coherency responsibilities to the
> application, improving performance.

O_DIRECT already delegates responsibility for cache coherency to
userspace applications and it allows for concurrent writes to a
single file. Why do we need a new flag for this?

> The reason this flag is used on open as opposed to having a post-open ioctl or
> fcntl SETFL is to allow panfs to catch and reject opens by applications that
> attempt to access files that have already been opened by applications that have
> set O_CONCURRENT_WRITE.

Sounds kinda like how we already use O_EXCL on block devices.
Perhaps something like:

#define O_CONCURRENT_WRITE  (O_DIRECT | O_EXCL)

To tell open to reject mixed mode access to the file on open?

-Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux