From mboxrd@z Thu Jan 1 00:00:00 1970 From: tridge@samba.org Subject: Re: CONFIG_VFAT_FS_DUALNAMES regression Date: Fri, 3 Jul 2009 10:25:05 +1000 Message-ID: <19021.20449.732095.210252@samba.org> References: <19013.8005.541836.436991@samba.org> <20090630063102.GB1351@ucw.cz> <200907012019.53932.rusty@rustcorp.com.au> <20090701122558.3a7c80d3@lxorguk.ukuu.org.uk> <20090701140503.GA21185@mit.edu> <19021.17576.808138.476600@samba.org> Reply-To: tridge@samba.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Theodore Tso , Alan Cox , Rusty Russell , Pavel Machek , OGAWA Hirofumi , john.lanza@linux.com, Linux Kernel Mailing List , linux-fsdevel@vger.kernel.org, Dave Kleikamp , corbet@lwn.net, jcm@jonmasters.org To: Jan Engelhardt Return-path: Received: from mail.samba.org ([66.70.73.150]:47665 "EHLO lists.samba.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754004AbZGCAZU (ORCPT ); Thu, 2 Jul 2009 20:25:20 -0400 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hi Jan, > Then, I just tried everything to get an overview: thanks! > (All with DUALNAMES=n) > # mount /dev/sdc1 /mnt -o iocharset=utf8,shortnames=lower > # cp /mnt/dcim/100_fuji/dscf{4160,3004}.jpg > # umount /mnt > # mount /dev/sdc1 /mnt -o iocharset=utf8,shortnames=win95 > # cp /mnt/dcim/100_fuji/dscf{4160,3005}.jpg > # umount /mnt > # mount /dev/sdc1 /mnt -o iocharset=utf8,shortnames=winnt > # cp /mnt/dcim/100_fuji/dscf{4160,3006}.jpg > # umount /mnt > # mount /dev/sdc1 /mnt -o iocharset=utf8,shortnames=mixed > # cp /mnt/dcim/100_fuji/dscf{4160,3007}.jpg > # umount /mnt > > Result? The camera only displays 3006. > > The dualnames patch's filling filenames with random illegal > chars does seems to have a really foul side-effect after actually, you've just proved the patch works as intended on your device! Only the shortname=winnt would create a 8.3 name when you use the filename dscfNNNN.jpg. That is why my first patch in May forced shortname_flags = VFAT_SFN_CREATE_WINNT; when the patch triggered. I think this is the only sane behaviour for a VFAT filesystem on Linux. Unfortunately it isn't the default, and at least on my Ubuntu system the automatic mounting doesn't get this right. I'd love to change the default or do an override, at least when dualnames is diabled. Hirofumi-san, what do you think? Cheers, Tridge PS: I'm assuming you actually typed "shortname=" not "shortnames=". The option is not plural.