From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dominique Martinet Subject: Re: [V9fs-developer] [Bug 1336794] Re: 9pfs does not honor open file handles on unlinked files Date: Wed, 15 Apr 2015 13:28:02 +0200 Message-ID: <20150415112802.GA16121@u-blusson> References: <20140702135258.23882.15100.malonedeb@soybean.canonical.com> <20150410123059.26540.1036.malone@gac.canonical.com> <20150413082753.GA15891@u-blusson> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Cc: Linux FS Devel , Bug 1336794 <1336794@bugs.launchpad.net>, qemu-devel , V9FS Developers To: Eric Van Hensbergen Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: linux-fsdevel.vger.kernel.org Eric Van Hensbergen wrote on Mon, Apr 13, 2015 at 04:05:28PM +0000: > Well, technically fid 3 isn't 'open', only fid 2 is open - at least > according to the protocol. fid 3 and fid 2 are both clones of fid 1. Right, they're clone fids, but nothing in the protocol says what should happen to non-open fids when you unlink the file either - I guess both behaviours are OK as long as the client can handle it, so it would make sense to at least call fstat() on the fid matching the fd, but while I think this is how the kernel currently behaves the kernel doesn't HAVE to make one open, separate fid per open file descriptor either. > However, thanks for the alternative workaround. If you get a chance, can > you check that my change to the client to partially fix this for the other > servers doesn't break nfs-ganesha: > > https://github.com/ericvh/linux/commit/fddc7721d6d19e4e6be4905f37ade5b0521f4ed5 I'm afraid I haven't had much time lately, but while fstat-after-unlink still works I'm getting some Oops with my basic test suite (create empty files and rm -rf, kernel compilation, etc - nothing fancy) to the point of locking myself out of my test box pretty quickly. I'll try to debug patches a bit more individually (trying everything at once isn't helping), but at the very least something is fishy -- Dominique Martinet From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiLUa-0006aR-Cx for qemu-devel@nongnu.org; Wed, 15 Apr 2015 07:28:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YiLUX-00052O-6x for qemu-devel@nongnu.org; Wed, 15 Apr 2015 07:28:28 -0400 Received: from sainfoin-out.extra.cea.fr ([132.167.192.145]:37480) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiLUW-00051M-Ux for qemu-devel@nongnu.org; Wed, 15 Apr 2015 07:28:25 -0400 Received: from pisaure.intra.cea.fr (pisaure.intra.cea.fr [132.166.88.21]) by sainfoin.extra.cea.fr (8.14.2/8.14.2/CEAnet-Internet-out-2.3) with ESMTP id t3FBSIHg021516 for ; Wed, 15 Apr 2015 13:28:18 +0200 Received: from pisaure.intra.cea.fr (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 631652058D4 for ; Wed, 15 Apr 2015 13:29:32 +0200 (CEST) Received: from muguet2.intra.cea.fr (muguet2.intra.cea.fr [132.166.192.7]) by pisaure.intra.cea.fr (Postfix) with ESMTP id 57629203EFD for ; Wed, 15 Apr 2015 13:29:32 +0200 (CEST) Received: from zia.cdc.esteban.ctsi (out.dam.intra.cea.fr [132.165.76.10]) by muguet2.intra.cea.fr (8.13.8/8.13.8/CEAnet-Intranet-out-1.2) with SMTP id t3FBSHqn024054 for ; Wed, 15 Apr 2015 13:28:17 +0200 Date: Wed, 15 Apr 2015 13:28:02 +0200 From: Dominique Martinet Message-ID: <20150415112802.GA16121@u-blusson> References: <20140702135258.23882.15100.malonedeb@soybean.canonical.com> <20150410123059.26540.1036.malone@gac.canonical.com> <20150413082753.GA15891@u-blusson> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [V9fs-developer] [Bug 1336794] Re: 9pfs does not honor open file handles on unlinked files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Van Hensbergen Cc: Linux FS Devel , Bug 1336794 <1336794@bugs.launchpad.net>, qemu-devel , V9FS Developers Eric Van Hensbergen wrote on Mon, Apr 13, 2015 at 04:05:28PM +0000: > Well, technically fid 3 isn't 'open', only fid 2 is open - at least > according to the protocol. fid 3 and fid 2 are both clones of fid 1. Right, they're clone fids, but nothing in the protocol says what should happen to non-open fids when you unlink the file either - I guess both behaviours are OK as long as the client can handle it, so it would make sense to at least call fstat() on the fid matching the fd, but while I think this is how the kernel currently behaves the kernel doesn't HAVE to make one open, separate fid per open file descriptor either. > However, thanks for the alternative workaround. If you get a chance, can > you check that my change to the client to partially fix this for the other > servers doesn't break nfs-ganesha: > > https://github.com/ericvh/linux/commit/fddc7721d6d19e4e6be4905f37ade5b0521f4ed5 I'm afraid I haven't had much time lately, but while fstat-after-unlink still works I'm getting some Oops with my basic test suite (create empty files and rm -rf, kernel compilation, etc - nothing fancy) to the point of locking myself out of my test box pretty quickly. I'll try to debug patches a bit more individually (trying everything at once isn't helping), but at the very least something is fishy -- Dominique Martinet