linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: cluster-devel@redhat.com, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, jlayton@redhat.com,
	"J. Bruce Fields" <bfields@fieldses.org>
Subject: Re: GFS2: Add atomic_open support
Date: Fri, 07 Jun 2013 11:54:29 +0100	[thread overview]
Message-ID: <1370602469.2768.25.camel@menhir> (raw)
In-Reply-To: <20130606175312.GG13110@ZenIV.linux.org.uk>

Hi,

On Thu, 2013-06-06 at 18:53 +0100, Al Viro wrote:
> On Thu, Jun 06, 2013 at 03:50:12PM +0100, Steven Whitehouse wrote:
> > 
> > The following patch implements atomic_open for GFS2. This is mostly
> > straightforward, however there is one corner case which I've had to
> > deal with, beyond what would normally be expected for a local
> > filesystem.
> 
> Broken - what will happen if you hit a symlink, for starters?  On everything
> handled locally you should just return finish_no_open(file, dentry) and
> let the caller deal with that; the only cases that might make sense to
> handle in ->atomic_open() are regular files and directories.  For gfs2 it
> should be just regular files.  While we are at it, do you even need
> ->private_data for gfs2 directories?

I'm brewing up another version of the patch at the moment, which I will
post shortly. I don't understand why GFS2 specifically would not want to
do this with both files and directories? Why would it be different to
other filesystems in that respect?

We do need private data for gfs2 directories because that is required
for flock which should work equally well on directories as on regular
files. Potentially we might allocate it later, on the first call to
flock for example, but it has been done at open time so that we don't
have to test for it on every flock call. Also I was hoping to put some
info in there to assist with directory readahead at some stage too,

Steve.

  reply	other threads:[~2013-06-07 10:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06 14:50 GFS2: Add atomic_open support Steven Whitehouse
2013-06-06 17:53 ` Al Viro
2013-06-07 10:54   ` Steven Whitehouse [this message]
2013-06-11 14:04   ` Steven Whitehouse

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=1370602469.2768.25.camel@menhir \
    --to=swhiteho@redhat.com \
    --cc=bfields@fieldses.org \
    --cc=cluster-devel@redhat.com \
    --cc=jlayton@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).