From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Steve French" Subject: Re: [linux-cifs-client] Re: mount options for selectively disabling parts of CIFS Unix Extensions Date: Tue, 17 Jul 2007 17:09:58 -0500 Message-ID: <524f69650707171509w33bedb19o98dafd49b57f8c18@mail.gmail.com> References: <524f69650707161540n4f4e785ai6c6039d3240456f9@mail.gmail.com> <524f69650707161611r4e29273cn751ffce503bd2d49@mail.gmail.com> <20070717075714.78af7b69.jlayton@redhat.com> <1184698169.19637.19.camel@heimdal.trondhjem.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Jeff Layton" , linux-cifs-client@lists.samba.org, samba-technical@lists.samba.org, linux-fsdevel@vger.kernel.org To: "Trond Myklebust" Return-path: Received: from py-out-1112.google.com ([64.233.166.179]:20290 "EHLO py-out-1112.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756370AbXGQWJ6 (ORCPT ); Tue, 17 Jul 2007 18:09:58 -0400 Received: by py-out-1112.google.com with SMTP id d32so3224028pye for ; Tue, 17 Jul 2007 15:09:58 -0700 (PDT) In-Reply-To: <1184698169.19637.19.camel@heimdal.trondhjem.org> Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On 7/17/07, Trond Myklebust wrote: > In CIFS parlance, the equivalent would be to mount \\SERVER\SHAREA\foo > and \\SERVER\SHAREA\bar with different mount options: I'm not sure that > is really what Steve is proposing. Yes - Or perhaps simply \\server\shareA being mounted twice to two different paths with different mount options (I also still need to add the code, as NFS did last year to handle the case where they share a sb, presumably with the same mount options). If for nothing else, being able to do the above will be helpful for Samba server testing - but I think there are cases in which particular applications work better with one or the other semantics (as apparently the MacOS guys run into too). > Anyhow, the issue with that is you have to deal with potentially caching > the same file on two different super blocks if, say foo/a and bar/b > happen to be hard linked. We punted on dealing with the dragons hidden > in that sort of issue by requiring that users mount with nosharedcache > if and only if they know that this is safe. This is an interesting question for cifs in a few ways as well. CIFS servers such as Samba can have different clients connected, some with "windows semantics" and some with "posix semantics" - even for handle based operations these semamtics differ for whether reads and/or writes on a locked range can fail. If \\server\shareA is mounted twice from the same client with different mount options (in particular the new "nounix" mount option that I have been coding today, which disables support for the CIFS Unix Extensions), for reads or writes from the pagecache it could matter which handle is used - for that reason, they may have to be treated as distinct inodes or we may have to forbid a second mount to the same share from the same client unless a few key mount options ("forcedirectio" and "nounix" e.g.) are the same on each -- Thanks, Steve