linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeremy Allison <jra@samba.org>
To: ronnie sahlberg <ronniesahlberg@gmail.com>
Cc: Steve French <smfrench@gmail.com>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	CIFS <linux-cifs@vger.kernel.org>,
	samba-technical <samba-technical@lists.samba.org>
Subject: Re: xfstest 531 and unlink of open file
Date: Mon, 24 Jun 2019 12:02:37 -0700	[thread overview]
Message-ID: <20190624190237.GD3690@jeremy-ThinkPad-X1> (raw)
In-Reply-To: <CAN05THTqP+_uSEPq2FqBEnV8FeuutaHASznH6iBDS=C0hCD=kQ@mail.gmail.com>

On Mon, Jun 24, 2019 at 01:44:53PM +1000, ronnie sahlberg via samba-technical wrote:
> On Mon, Jun 24, 2019 at 1:23 PM Steve French <smfrench@gmail.com> wrote:
> >
> > Xioli created a fairly simple unlink test failure reproducer loosely
> > related to xfstest 531 (see
> > https://bugzilla.kernel.org/show_bug.cgi?id=203271) which unlinks an
> > open file then tries to create a file with the same name before
> > closing the first file (which fails over SMB3/SMB3.11 mounts with
> > STATUS_DELETE_PENDING).
> >
> > Presumably we could work around this by a "silly-rename" trick.
> > During delete we set delete on close for the file, then close it but
> > presumably we could check first if the file is open by another local
> > process and if so try to rename it?
> >
> > Ideas?
> 
> The test is to check "can you unlink and recreate a file while someone
> (else) is holding it open?"
> 
> I don't think you can rename() a file while other folks have it open :-(
> This is likely a place where NTFS is too different from Posix that we
> can't get full 100% posix semantics.

Yeah, this is one of the places you need SMB3+ POSIX extensions
(and even there we fail it if a Windows open exists on the same
handle).

      reply	other threads:[~2019-06-24 19:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24  3:22 xfstest 531 and unlink of open file Steve French
2019-06-24  3:44 ` ronnie sahlberg
2019-06-24 19:02   ` Jeremy Allison [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=20190624190237.GD3690@jeremy-ThinkPad-X1 \
    --to=jra@samba.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=samba-technical@lists.samba.org \
    --cc=smfrench@gmail.com \
    /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).