From owner-freebsd-fs@FreeBSD.ORG Fri Jun 3 13:00:24 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B970C106567F for ; Fri, 3 Jun 2011 13:00:24 +0000 (UTC) (envelope-from kevlo@kevlo.org) Received: from ns.kevlo.org (kevlo.org [220.128.136.52]) by mx1.freebsd.org (Postfix) with ESMTP id 8F7458FC18 for ; Fri, 3 Jun 2011 13:00:09 +0000 (UTC) Received: from [127.0.0.1] (kevlo@kevlo.org [220.128.136.52]) by ns.kevlo.org (8.14.3/8.14.3) with ESMTP id p53D071D023769; Fri, 3 Jun 2011 21:00:07 +0800 (CST) From: Kevin Lo To: Kostik Belousov In-Reply-To: <20110603105904.GM48734@deviant.kiev.zoral.com.ua> References: <1307069726.2024.18.camel@nsl> <1307071973.2024.19.camel@nsl> <20110603173555.X994@besplex.bde.org> <20110603105904.GM48734@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset="UTF-8" Date: Fri, 03 Jun 2011 21:00:07 +0800 Message-ID: <1307106007.2865.8.camel@nsl> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org, rmacklem@freebsd.org Subject: Re: [PATCH] Set the DE_UPDATE flag on the directory node on msdosfs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2011 13:00:26 -0000 Kostik Belousov wrote: > On Fri, Jun 03, 2011 at 06:25:07PM +1000, Bruce Evans wrote: > > On Fri, 3 Jun 2011, Kevin Lo wrote: > > > > >Kevin Lo wrote: > > >>If you try to NFS export a fat32 formatted external usb devices, > > >>you'll notice if a new file is created, you won't see that file > > >>on the NFS client. The reason is msdosfs(5) doesn't change the > > >>modify time of the directory when an entry is created. > > >> > > >>Attached is a patch against HEAD that sets DE_UPDATE on the > > >>directory node in both createde() and removede(). > > >>Please test it, thanks. > > > > It breaks compatibility with MSDOS and Windows. > > > > No correct fix is evident. ffs maintains the generation count va_filerev > > which should help, but: > > - ffs only increments it when a file mtime is updated. > > - msdosfs doesn't properly maintain it (it initializes to a non-random > > number related to the current time when the vnode is initialized, but > > never increments it). > > - the old nfs client doesn't use it > > - the new nfs client does use it for v4. I don't know if this use is > > sufficient (it has to get it from the server to work for this). > It seems that reporter forgot to mention this, but the problem was > reported for the _linux_ NFS client mounting FAT share from the FreeBSD > server. Thank kib@ for pointing that out. Yes, the NFS clients running on Linux. I looked at the Darwin's msdosfs: http://opensource.apple.com/source/msdosfs/msdosfs-48/msdosfs.kextproj/msdosfs.kmodproj/msdosfs_lookup.c It seems the DE_UPDATE flag is also set in createde() and removede(). Kevin