From owner-freebsd-fs@FreeBSD.ORG Mon Jul 22 16:04:05 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 69F1EF7E; Mon, 22 Jul 2013 16:04:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 464C1262B; Mon, 22 Jul 2013 16:04:05 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D5C4AB926; Mon, 22 Jul 2013 12:04:02 -0400 (EDT) From: John Baldwin To: freebsd-arch@freebsd.org Subject: Re: VOP_MKDIR/VOP_CREATE and namecache Date: Mon, 22 Jul 2013 11:10:31 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <51E968FC.20905@FreeBSD.org> In-Reply-To: <51E968FC.20905@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201307221110.32011.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 22 Jul 2013 12:04:03 -0400 (EDT) Cc: freebsd-fs@freebsd.org, Andriy Gapon X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jul 2013 16:04:05 -0000 On Friday, July 19, 2013 12:27:40 pm Andriy Gapon wrote: > > Should VOP_MKDIR and VOP_CREATE immediately insert newly created vnodes into the > namecache? If yes, where would it be done best? FS code, VFS code, VOP > post-hooks, something else? Hmm, I'm not sure. However, if it is done, I think it needs to be done in the FS code (e.g., NFS needs to be able to add it's special timestamps). In UFS you could do this by just adding a cache_enter() call to ufs_direnter(). For NFS you would want the post-op attrs from the RPC reply (assuming it includes attrs for the parent directory). -- John Baldwin