Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4619488yba; Tue, 30 Apr 2019 01:15:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMxoBeAA0oJw4o/Buiw92k0Xg/i09ePp3wOAGPR2wLBwgUeUkHzdSWh4sA7sVbMaDNE5cl X-Received: by 2002:a17:902:9a0c:: with SMTP id v12mr68657471plp.184.1556612102888; Tue, 30 Apr 2019 01:15:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556612102; cv=none; d=google.com; s=arc-20160816; b=tuQ7kTnF3f7WB/xyhfgz5kmjwIMI8FZU62oxeay0rC7fXEXQdwQ24nsodNk01hnNgC 81Y4SrrF0JWMV8UrdsBtDLZKsUKLABx2n+44vddRhiAm/aRfx/fxtG8Lc4dgbemL+3G5 XqL0pnWXibr5D00sGfgM9cG7t7EafrU/m5PwQeiUbu5NgjSpaDWnMsSYIaEJLkj5b7vT 7Zdj7crUBtlbYwjIn9p5L2arrLW9VdDk1jklD43P3DOFK3kqaq2AHBI/g3sB1SFV+Grv lHZavZTFOOUCgLHsoAHivp0wD3aLRfjm3jftFYCdtEoi2URVqx8lNWyuSoF/DdRKOdL+ bisw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :dkim-signature; bh=T88YzDCfdRRpRnlKh43Qlc+b4mJ+OnfqC7S9nbpXuZ4=; b=FpLivlIyT3lsk7uvELBgfsYw6tBebI2OwXdHC4+0yLSAK4Egsy66096hbM9WMgW9Yb 3zq+86hlbG+KL7LWUH7yKvsTnocYBC/iCgE4+1Qh4X7+H949Gzs+ivW/kbgZi4kyJ2eZ XENf3mf/wT5Rf5JGqcYrceiTfHI1ts5XX7c6azetukSHsGsIfdA0Guc6j6UWdx+wxGum gmYVfsWfYLe/8t76tVGxBsIE3S3Hj5B2WFSWQmjghRdFn6Bjio7ES1QgchmCE6OiQmAG Fc8Uue4Lqqj2sqtg6h4vmZOPULI18n1wJFWKAwvy43TwTXs7TBD3boAqLyrSzugoUryL 5Nww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samba.org header.s=42627210 header.b=vRiWb9BV; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=samba.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i9si33499024pgq.23.2019.04.30.01.14.41; Tue, 30 Apr 2019 01:15:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samba.org header.s=42627210 header.b=vRiWb9BV; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=samba.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726202AbfD3IMi (ORCPT + 99 others); Tue, 30 Apr 2019 04:12:38 -0400 Received: from hr2.samba.org ([144.76.82.148]:31680 "EHLO hr2.samba.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725790AbfD3IMi (ORCPT ); Tue, 30 Apr 2019 04:12:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=samba.org; s=42627210; h=Date:Message-ID:From:Cc:To; bh=T88YzDCfdRRpRnlKh43Qlc+b4mJ+OnfqC7S9nbpXuZ4=; b=vRiWb9BVLTIgVJWYF6dRmg4j1O OuaXFf1xgG0vm7zCykhRGQq+Wnk3wqEGX3Z6jKjOkxlxf/slageYACYHNUztf2tPU0RN0nUx11etp xn/V34kkhZQYMz70PCshtVFwhHyfoTADViapzv2xUWTpOQG+MJ8NgxEbMSa289jy+b+E=; Received: from [127.0.0.2] (localhost [127.0.0.1]) by hr2.samba.org with esmtpsa (TLS1.3:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim) id 1hLNsR-00080O-Bz; Tue, 30 Apr 2019 08:12:35 +0000 Subject: Re: Better interop for NFS/SMB file share mode/reservation To: Amir Goldstein , Pavel Shilovskiy Cc: "linux-nfs@vger.kernel.org" , "Volker.Lendecke@sernet.de" , Jeff Layton , "samba-technical@lists.samba.org" , Trond Myklebust , "linux-fsdevel@vger.kernel.org" References: <20190426145006.GD25827@fieldses.org> <8504a05f2b0462986b3a323aec83a5b97aae0a03.camel@kernel.org> <1d5265510116ece75d6eb7af6314e6709e551c6e.camel@hammerspace.com> <95bc6ace0f46a1b1a38de9b536ce74faaa460182.camel@hammerspace.com> From: Uri Simchoni Openpgp: preference=signencrypt Autocrypt: addr=uri@samba.org; prefer-encrypt=mutual; keydata= xsBNBFby8yABCAC5Yy67UKYFYlEH1qV/Wby+XhjMSYIwM7kAR7cyATzWzy+LHrYEV9HfcdbE 8uIXsZJYHVrwzbK5GMV6Y+q4IEVYCkyQOTk+hDc10UqDHm6lvbKIeg7PlNtypA024bgGSzur BUenprtt3MxyBgreiPPa+UPbn5g+A2VC8Ud2wYv0x2IkMMCHa0tLkSDoQpuIFSP7q4YEvdn9 E9dF6rtQYhTO3e9cQe8Faao4ujdaf8ymnIJXuVthubK1Ibg1rllnnlnCMT7/OVvaRACXSZeF 9/7WTIswAQ0LooWY+Lhz4tLCYrxz5UclzphQAu/mDMZkIwfoyR2Btvnj35vpHgXyRl9HABEB AAHNHFVyaSBTaW1jaG9uaSA8dXJpQHNhbWJhLm9yZz7CwJUEEwECAD8CGwMGCwkIBwMCBhUI AgkKCwQWAgMBAh4BAheAFiEEhnx9/eK+MtZ4dAL4Fx15pugHO7kF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C4Tks4s/pZjBC SIMU2TPqEyeztkZaVBSWHFNNCsBKIJ+35T5uJnhXjcgKeXlxjk7WbMHZWm8RaYFqIA== Message-ID: <677e86ee-59b9-0826-481f-955074d164ed@samba.org> Date: Tue, 30 Apr 2019 11:12:28 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On 4/30/19 3:31 AM, Amir Goldstein via samba-technical wrote: >> >> About O_DENYDELETE: I don't understand how we may reach a good interop story without a proper implementation of this flag. Windows apps may set it and Samba needs to respect it. If an NFS client removes such an opened file, what will Samba tell the Windows client? >> > > Samba will tell the Windows client: > "Sorry, my administrator has decided to trade off interop with nfs on > share modes, > with DENY_DELETE functionality, so I cannot grant you DENY_DELETE that you > requested." > Not sure if that is workable. Samba developers need to chime in. > > Thanks, > Amir. > On Windows you don't ask for DENY_DELETE, you get it by default unless you ask to *allow* deletion. If you fopen() a file, even for reading-only, the MSVC standard C library would open it with delete denied because it does not explicitly request to allow it. My guess is that runtimes of other high-level languages behave that way too on Windows. That means pretty much everything would stop working. Thanks, Uri.