From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC9B1C48BEA for ; Mon, 24 Jun 2019 19:02:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7873620665 for ; Mon, 24 Jun 2019 19:02:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=samba.org header.i=@samba.org header.b="iNYrUYfg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728956AbfFXTCn (ORCPT ); Mon, 24 Jun 2019 15:02:43 -0400 Received: from hr2.samba.org ([144.76.82.148]:47524 "EHLO hr2.samba.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727912AbfFXTCn (ORCPT ); Mon, 24 Jun 2019 15:02:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=samba.org; s=42627210; h=Message-ID:Cc:To:From:Date; bh=sXmv0rmoVJ0UFhnTzdQARYWS7+Af9W+ln3++XJeZKAs=; b=iNYrUYfgQAIWFuayPUnKySmHiw YneD7/bY4dVAGsbyNkk8Fn85qG8PTJgo3YYcDdKxkzlTYA8ZzG7p0cM54IsKvNIbG/LdFaKe7oukk YEFJx7mrMdFmW/Tar4sdcTklsurJo16/wVZzChdC986WjCgbhukwGYyRRa6J5DJMObpw=; Received: from [127.0.0.2] (localhost [127.0.0.1]) by hr2.samba.org with esmtpsa (TLS1.2:ECDHE_ECDSA_CHACHA20_POLY1305:256) (Exim) id 1hfUEi-0001Rc-KK; Mon, 24 Jun 2019 19:02:41 +0000 Date: Mon, 24 Jun 2019 12:02:37 -0700 From: Jeremy Allison To: ronnie sahlberg Cc: Steve French , linux-fsdevel , CIFS , samba-technical Subject: Re: xfstest 531 and unlink of open file Message-ID: <20190624190237.GD3690@jeremy-ThinkPad-X1> Reply-To: Jeremy Allison References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org 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 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).