svn commit: r246217 - head/sys/fs/msdosfs

Bruce Evans brde at optusnet.com.au
Fri Feb 1 18:56:31 UTC 2013


On Fri, 1 Feb 2013, Konstantin Belousov wrote:

> Log:
>  The directory entry for dotdot was corrupted in the FAT32 case when moving
>  a directory to a subdir of the root directory from somewhere else.
>
>  For all directory moves that change the parent directory, the dotdot
>  entry must be fixed up.  For msdosfs, the root directory is magic for
>  non-FAT32.  It is less magic for FAT32, but needs the same magic for
>  the dotdot fixup.  It didn't have it.
>
>  Both chkdsk and fsck_msdosfs fix the corrupt directory entries with no
>  problems.
>
>  The fix is to use the same magic for dotdot in msdosfs_rename() as in
>  msdosfs_mkdir().
>
>  For msdosfs_mkdir(), document the magic. When writing the dotdot entry
>  in mkdir, use explicitly set pcl variable instead on relying on the
>  start cluster of the root directory typically has a value < 65536.
>
>  Submitted by:	bde
>  MFC after:	1 week

Thanks.  That was fast.

Bruce


More information about the svn-src-all mailing list