From: Dave Chinner <david@fromorbit.com>
To: "Fu, Rodney" <rfu@panasas.com>
Cc: Matthew Wilcox <willy@infradead.org>, "hch@lst.de" <hch@lst.de>,
"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: Provision for filesystem specific open flags
Date: Mon, 13 Nov 2017 11:48:55 +1100 [thread overview]
Message-ID: <20171113004855.GV4094@dastard> (raw)
In-Reply-To: <BN3PR0801MB22576444104088CEDD24DE7DAB540@BN3PR0801MB2257.namprd08.prod.outlook.com>
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@fromorbit.com
next prev parent reply other threads:[~2017-11-13 0:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-10 16:49 Provision for filesystem specific open flags Fu, Rodney
2017-11-10 17:23 ` hch
2017-11-10 17:39 ` Fu, Rodney
2017-11-10 19:29 ` Matthew Wilcox
2017-11-10 21:04 ` Fu, Rodney
2017-11-11 0:37 ` Matthew Wilcox
2017-11-13 15:16 ` Fu, Rodney
2017-11-20 13:38 ` Jeff Layton
2017-11-13 0:48 ` Dave Chinner [this message]
2017-11-13 17:02 ` Fu, Rodney
2017-11-13 21:58 ` Dave Chinner
2017-11-14 17:35 ` Fu, Rodney
[not found] ` <BN3PR0801MB2257BBAA9D7CA6CEDCA04DECAB280-1I06WyKSH1RpbkYrVjfdjVJr2SjL+wq6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-11-20 13:53 ` Jeff Layton
2017-11-20 13:53 ` Jeff Layton
2017-12-04 5:29 ` NeilBrown
2017-12-05 21:36 ` Andreas Dilger
2017-11-13 17:45 ` Bernd Schubert
2017-11-13 20:19 ` Fu, Rodney
[not found] ` <BN3PR0801MB2257378E7F3596E0E61C1F89AB2B0-1I06WyKSH1RpbkYrVjfdjVJr2SjL+wq6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-11-20 14:03 ` Florian Weimer
2017-11-20 14:03 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171113004855.GV4094@dastard \
--to=david@fromorbit.com \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=rfu@panasas.com \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.