All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: dhowells@redhat.com, Al Viro <viro@zeniv.linux.org.uk>,
	Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux-Fsdevel <linux-fsdevel@vger.kernel.org>,
	"linux-unionfs@vger.kernel.org" <linux-unionfs@vger.kernel.org>
Subject: Re: Can ovl_drop_write() be called earlier in ovl_dentry_open()
Date: Mon, 01 Jun 2015 16:53:49 +0100	[thread overview]
Message-ID: <17015.1433174029@warthog.procyon.org.uk> (raw)
In-Reply-To: <CAJfpegsaZvTuSu3WBO8jABA1bA4VJuNEK30dCdNQGrZe68CqSg@mail.gmail.com>

Miklos Szeredi <miklos@szeredi.hu> wrote:

> >> Hmm,  that could result in a race where remount r/o of upper fs comes
> >> in between copy-up and vfs_open() so copy-up succeeds but the actual
> >> open fails.  It's harmless, though, and not  very likely.  So I guess
> >> your patch is OK.
> >
> > That race is there anyway if there's no copy up, right?
> 
> No.  The race I'm talking about is that with your patch it's possible
> that the file will be copied up, but open will return -EROFS.

Ah, I see what you're getting at.

> Without your patch, that is not possible since holding write counter
> for the mnt over both the copy-up and the open ensures that the
> filesystem cannot become read-only in the middle.
> 
> So your patch changes behavior, but the new behavior is acceptable,
> because there's no major change in semantics (it should only be
> detectable by the increased disk usage in the rare case of the failed
> open).

Okay.

David

      parent reply	other threads:[~2015-06-01 15:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-01 13:52 David Howells
2015-06-01 14:21 ` [PATCH] overlay: Call ovl_drop_write() " David Howells
2015-06-01 14:22 ` Can ovl_drop_write() be called " Miklos Szeredi
2015-06-01 15:45 ` David Howells
2015-06-01 15:51   ` Miklos Szeredi
2015-06-01 15:53   ` David Howells [this message]

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=17015.1433174029@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=viro@zeniv.linux.org.uk \
    --subject='Re: Can ovl_drop_write() be called earlier in ovl_dentry_open()' \
    /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

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.