From owner-svn-src-head@FreeBSD.ORG Fri Feb 1 18:56:31 2013 Return-Path: Delivered-To: svn-src-head@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 914A0E77; Fri, 1 Feb 2013 18:56:31 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail12.syd.optusnet.com.au (mail12.syd.optusnet.com.au [211.29.132.193]) by mx1.freebsd.org (Postfix) with ESMTP id 1A18F945; Fri, 1 Feb 2013 18:56:30 +0000 (UTC) Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail12.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r11IuLp7010312 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 2 Feb 2013 05:56:23 +1100 Date: Sat, 2 Feb 2013 05:56:21 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov Subject: Re: svn commit: r246217 - head/sys/fs/msdosfs In-Reply-To: <201302011806.r11I66aP010436@svn.freebsd.org> Message-ID: <20130202055559.W3890@besplex.bde.org> References: <201302011806.r11I66aP010436@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=evCHVfVX c=1 sm=1 a=aMzxrNFpgZ0A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=AH4PAgtxFLYA:10 a=mUdXZ0t08xOriRn7bX4A:9 a=CjuIK1q_8ugA:10 a=TEtd8y5WR3g2ypngnwZWYw==:117 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Feb 2013 18:56:31 -0000 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