From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from oxalide-out.extra.cea.fr ([132.168.224.8]:44207 "EHLO oxalide-out.extra.cea.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752197AbcJDIK4 (ORCPT ); Tue, 4 Oct 2016 04:10:56 -0400 Received: from pisaure.intra.cea.fr (pisaure.intra.cea.fr [132.166.88.21]) by oxalide.extra.cea.fr (8.15.2/8.15.2/CEAnet-Internet-out-2.4) with ESMTP id u947UW9Z015262 for ; Tue, 4 Oct 2016 09:30:32 +0200 Received: from pisaure.intra.cea.fr (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 156B1203EC8 for ; Tue, 4 Oct 2016 09:30:32 +0200 (CEST) Received: from muguet1.intra.cea.fr (muguet1.intra.cea.fr [132.166.192.6]) by pisaure.intra.cea.fr (Postfix) with ESMTP id 00E22202755 for ; Tue, 4 Oct 2016 09:30:32 +0200 (CEST) Received: from zia.cdc.esteban.ctsi (out.dam.intra.cea.fr [132.165.76.10]) by muguet1.intra.cea.fr (8.15.2/8.15.2/CEAnet-Intranet-out-1.4) with SMTP id u947UV4v017262 for ; Tue, 4 Oct 2016 09:30:31 +0200 Date: Tue, 4 Oct 2016 09:30:16 +0200 From: Dominique Martinet To: Subject: open_by_handle_at on disconnected dentry Message-ID: <20161004073016.GA31167@u-isr-cdi-08> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hi, I've been playing with open_by_handle_at and noticed that I can get /proc/self/fd/X to contain just '/' by opening a handle in a directory that's not in cache (either through /proc/sys/vm/drop_cache or reboot) Looking a bit further it looks like the path.dentry is disconnected (DCACHE_DISCONNECTED flag, and points to itself/d_name is /). I see exportfs_decode_fh can call reconnect_path in this case for directories, or non-directly-acceptable files - maybe open_by_handle_at should make sure we're always connected, or have an open flag for it? I'm not sure what other implications there are aside of the odd filename for its own /proc/self/fd and fanotify. Thanks, -- Dominique Martinet