[PATCH] Set the DE_UPDATE flag on the directory node on msdosfs

Kevin Lo kevlo at kevlo.org
Fri Jun 3 03:32:52 UTC 2011


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;
 }



More information about the freebsd-fs mailing list