From owner-freebsd-fs@FreeBSD.ORG Fri Jun 3 03:32:52 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 ACA1A1065670 for ; Fri, 3 Jun 2011 03:32:52 +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 514528FC14 for ; Fri, 3 Jun 2011 03:32:51 +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 p533WoeG019961 for ; Fri, 3 Jun 2011 11:32:50 +0800 (CST) From: Kevin Lo To: freebsd-fs@freebsd.org In-Reply-To: <1307069726.2024.18.camel@nsl> References: <1307069726.2024.18.camel@nsl> Content-Type: text/plain; charset="UTF-8" Date: Fri, 03 Jun 2011 11:32:53 +0800 Message-ID: <1307071973.2024.19.camel@nsl> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 Content-Transfer-Encoding: 7bit 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 03:32:52 -0000 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. > > Kevin > --- sys/fs/msdosfs/msdosfs_lookup.c.orig 2011-06-02 15:26:23.000000000 +0800 +++ sys/fs/msdosfs/msdosfs_lookup.c 2011-06-02 15:27:22.000000000 +0800 @@ -725,6 +725,8 @@ else if ((error = bwrite(bp)) != 0) return error; + ddep->de_flag |= DE_UPDATE; + /* * If they want us to return with the denode gotten. */ @@ -1027,6 +1029,7 @@ } while (!(pmp->pm_flags & MSDOSFSMNT_NOWIN95) && !(offset & pmp->pm_crbomask) && offset); + pdep->de_flag |= DE_UPDATE; return 0; }