Re: [PATCH] Re: msdos/vfat defaults are annoying
Followup to: <[EMAIL PROTECTED]> By author:=?iso-8859-1?Q?Pozs=E1r_Bal=E1zs?= <[EMAIL PROTECTED]> In newsgroup: linux.dev.kernel > > Granted, I could override the default order by using a /etc/filesystems > file. But the kernel should have a much more sane default on its own, > namely "try vfat before msdos". > What it really means is that mount(8) should know this is a special case; presumably it already knows to try ext3 over ext2. -hpa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Re: msdos/vfat defaults are annoying
-BEGIN PGP SIGNED MESSAGE- (BHash: SHA1 (B (BOn 02/08/2005 09:23 AM, Horst von Brand wrote: (B> Clemens Schwaighofer <[EMAIL PROTECTED]> said: (B> (B> [...] (B>>but to be honest, most times I need vfat, and I actually haven't (B>>encountered a time when I need msdos. (B> (B> But writing MSDOS on a VFAT filesystem is a sure way to screw it up, and (B> AFAIU vice-versa. (B (Bwell it doesn't screw it up if you write MS DOS on a VFAT, you just (Bloose a lot of data. (B (BI was kinda surprised when I came home and plugged in my USB stick to (Bsee just A3.CB instead of a nice long filename :) (B (B- -- (B[ Clemens Schwaighofer -=:~ ] (B[ TBWA\ && TEQUILA\ Japan IT Group ] (B[6-17-2 Ginza Chuo-ku, Tokyo 104-0061, JAPAN ] (B[ Tel: +81-(0)3-3545-7703Fax: +81-(0)3-3545-7343 ] (B[ http://www.tequila.co.jphttp://www.tbwajapan.co.jp ] (B-BEGIN PGP SIGNATURE- (BVersion: GnuPG v1.2.6 (GNU/Linux) (BComment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org (B (BiD8DBQFCCCLljBz/yQjBxz8RAvgyAJ4zRyjszLLuBeZz5lBAyegCTbm1ygCfYf2E (BUJKEEU0HJuLRTAjec3aEQ3s= (B=g+L4 (B-END PGP SIGNATURE- (B- (BTo unsubscribe from this list: send the line "unsubscribe linux-kernel" in (Bthe body of a message to [EMAIL PROTECTED] (BMore majordomo info at http://vger.kernel.org/majordomo-info.html (BPlease read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Re: msdos/vfat defaults are annoying
Clemens Schwaighofer <[EMAIL PROTECTED]> said: [...] > but to be honest, most times I need vfat, and I actually haven't > encountered a time when I need msdos. But writing MSDOS on a VFAT filesystem is a sure way to screw it up, and AFAIU vice-versa. -- Dr. Horst H. von Brand User #22616 counter.li.org Departamento de Informatica Fono: +56 32 654431 Universidad Tecnica Federico Santa Maria +56 32 654239 Casilla 110-V, Valparaiso, ChileFax: +56 32 797513 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Re: msdos/vfat defaults are annoying
Michelle Konzack schrieb: > Am 2005-02-07 09:47:09, schrieb Pozsár Balázs: > > See? I _have_ that patch applied, that's why it tried vfat and not msdos > > first. > > With this, you will nerver mount a Filesystem "msdos". > > Because "vfat" IS "msdos" + "lfn". > > You can attach to ALL "msdos" media "lfn" and you will have "vfat". So msdos is vfat WITHOUT lfn, which is a a restriction like noatime or mounting ext3 as ext2. That's why the default should be vfat indeed and the restriction should be "nolfn", which will not allow lfns to be created and is what you actually intend, right? But this will break API today, so it should be added to list of features that will change. Regards Ingo Oeser - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Re: msdos/vfat defaults are annoying
On 2005.02.07 08:47, Pozsár Balázs wrote: On Mon, Feb 07, 2005 at 02:48:00AM +, Nuno Monteiro wrote: > But the contents of /proc/filesystems comes from the kernel. And the order of filesystems comes from the link order. Yes, but /proc/filesystems is only processed after two other checks have failed first: specifying a filesystem type (-t), and reading /etc/ filesystems. Relying on mount to do the guesswork is asking for trouble if you realy value your data. And /etc/filesystems is the mechanism mount (8) has in place to change the probe order, in case you really want that. This is entirely a userspace problem, the kernel shouldn't have anything to do with it. But, anyway, for the sake of argument let's suppose link order is effectively changed. You just effectively broke people's working setups, because like you want to rely on fs/ link order to mount your vfats as vfat and not as msdos, there's people out there relying on that (broken) assumption to have their msdos filesystems mounted as msdos. Now, with the new link order, they'll be mounted as vfat, and pop-goes-the-weasel. Tomorrow, someone unhappy that their msdos fs is now mounted as vfat will send a patch changing it back, thus breaking vfats. Rinse, repeat. ;-) See? This is just wrong. This is why mount(8) has a mechanism to change the probe order. Everybody's happy that way, and no one has to rely on the broken assumption that the kernel knows how you want your filesystems mounted. So, to sum things up: this is entirely an userspace problem. Yours just appears to be in need of fixing or tuning. Regards, Nuno - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Re: msdos/vfat defaults are annoying
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07.02.2005 20:29, Andries Brouwer wrote: > Making a symlink /etc/filesystems -> /proc/filesystems is > meaningless. well to be honest, I didn't even know Gentoo makes a symlink here, but I'll definitly will make bug entry for that. Perhaps its a default setting. eg Debian doesn't have a /etc/filesystems file by defauly anyway. > It is not true that vfat is universally better than msdos. > Some need one, some need the other. but to be honest, most times I need vfat, and I actually haven't encountered a time when I need msdos. lg, clemens -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD4DBQFCB3RpjBz/yQjBxz8RAlQBAJjj0IIhxCPWvWinMpi6J5UOJ9bBAJ9oQnI4 A6sIi+MzKiFbvpLIiQI1YQ== =rmlN -END PGP SIGNATURE- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Re: msdos/vfat defaults are annoying
Am 2005-02-07 09:47:09, schrieb Pozsár Balázs: > See? I _have_ that patch applied, that's why it tried vfat and not msdos > first. With this, you will nerver mount a Filesystem "msdos". Because "vfat" IS "msdos" + "lfn". You can attach to ALL "msdos" media "lfn" and you will have "vfat". > Granted, I could override the default order by using a /etc/filesystems > file. But the kernel should have a much more sane default on its own, > namely "try vfat before msdos". This will give many errors here at work... Greetings Michelle -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ Michelle Konzack Apt. 917 ICQ #328449886 50, rue de Soultz MSM LinuxMichi 0033/3/8845235667100 Strasbourg/France IRC #Debian (irc.icq.com) signature.pgp Description: Digital signature
Re: [PATCH] Re: msdos/vfat defaults are annoying
On Mon, Feb 07, 2005 at 12:29:14PM +0100, Andries Brouwer wrote: > and (ii) sometimes several types would succeed (e.g. msdos/vfat) > and the user can override the kernel order. But we are talking about the default order. > By the way, it is best to consider the kernel order as undefined. But it is not undefined, and if it is a well-defined order (and it is), then it should have a sane order. > It is not true that vfat is universally better than msdos. > Some need one, some need the other. > Finally, guessing is always bad. It is convenient in the short run > but may lead to crashes and data loss in the long run. Well, it can be bad, maybe it should be avoided. But if someone wants guessing, why not provide him a (imho) more reasonable order of guessing? I do think vfat should be tried first. If you are doing for example some kind of recovery you wont bet on autoguessing. But if you just want to use it, use might, and in that case you want long filenames, ie vfat. -- pozsy - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Re: msdos/vfat defaults are annoying
On Mon, Feb 07, 2005 at 03:53:00PM +0900, Clemens Schwaighofer wrote: > >>Yeah, but the link order could be changed... Patch inlined. > > > > And just what does the link order (or changes thereof) have to do with that? > > because some distributions (eg gentoo) make a symlink to /proc/filesystems > > jupiter root # ls -l /etc/filesystems > lrwxrwxrwx 1 root root 19 Oct 25 11:18 /etc/filesystems -> > ../proc/filesystems > > and then its impossible to change the order. (unless you make a "hand > made" file of course). Ah, I had not met this particular form of brokenness before. If one does not specify a filesystem type to mount, mount will try its own collection of heuristics, looking for known magic numbers. This stuff comes in two versions, depending on whether mount was linked against the blkid library or not. When no magic is recognized, mount will try all filesystems listed in /proc/filesystems that were not rejected already because of wrong magic. The list in /proc/filesystems can be overridden by the file /etc/filesystems. That is useful for two reasons: (i) sometimes the kernel crashes when one tries to mount something with the wrong type, so /etc/filesystems can skip the types that must never be tried, and (ii) sometimes several types would succeed (e.g. msdos/vfat) and the user can override the kernel order. Making a symlink /etc/filesystems -> /proc/filesystems is meaningless. By the way, it is best to consider the kernel order as undefined. It plays a role when mounting the rootfs. If you get undesirable results at boot time, specify the rootfstype= boot option. It plays a role when generating /proc/filesystems. If you get undesirable results, adapt /etc/filesystems. It is not true that vfat is universally better than msdos. Some need one, some need the other. Instead of having a global order, one can have a per-mountpoint list in /etc/fstab. For example, /dev/foo/mntext2,msdos noauto 0 0 Finally, guessing is always bad. It is convenient in the short run but may lead to crashes and data loss in the long run. Andries - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Re: msdos/vfat defaults are annoying
On Mon, Feb 07, 2005 at 02:48:00AM +, Nuno Monteiro wrote: > > On 2005.02.07 00:42, Pozsár Balázs wrote: > >On Mon, Feb 07, 2005 at 12:36:10AM +, Al Viro wrote: > >> On Mon, Feb 07, 2005 at 12:21:08AM +0100, Pozsar Balazs wrote: > >> > On Sun, Feb 06, 2005 at 07:06:59AM +, Christoph Hellwig wrote: > >> > > filesystem detection isn't handled at the kerne level. >^ > But since filesystem detection isn't handled in the kernel, changing the > link order is pointless. Please fix your /etc/filesystems instead. But the contents of /proc/filesystems comes from the kernel. And the order of filesystems comes from the link order. Let me show you, why it is _not_ pointless: If you do not have /etc/filesystems, mount will read /proc/filesystems: # strace -o mount.trace mount -t auto /dev/sda1 /mnt # grep filesystems mount.trace open("/etc/filesystems", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/proc/filesystems", O_RDONLY|O_LARGEFILE) = 3 # grep ^mount mount.trace mount("/dev/sda1", "/mnt", "squashfs", 0xc0ed, 0) = -1 EINVAL (Invalid argument) mount("/dev/sda1", "/mnt", "vfat", 0xc0ed, 0) = 0 See? I _have_ that patch applied, that's why it tried vfat and not msdos first. Granted, I could override the default order by using a /etc/filesystems file. But the kernel should have a much more sane default on its own, namely "try vfat before msdos". -- pozsy - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Re: msdos/vfat defaults are annoying
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/07/2005 09:36 AM, Al Viro wrote: > On Mon, Feb 07, 2005 at 12:21:08AM +0100, Pozsar Balazs wrote: > >>On Sun, Feb 06, 2005 at 07:06:59AM +, Christoph Hellwig wrote: >> >>>On Sun, Feb 06, 2005 at 12:33:43AM -0500, John Richard Moser wrote: >>> I dunno. I can never understand the innards of the kernel devs' minds. >>> >>>filesystem detection isn't handled at the kerne level. >> >>Yeah, but the link order could be changed... Patch inlined. > > > And just what does the link order (or changes thereof) have to do with that? because some distributions (eg gentoo) make a symlink to /proc/filesystems jupiter root # ls -l /etc/filesystems lrwxrwxrwx 1 root root 19 Oct 25 11:18 /etc/filesystems -> ../proc/filesystems and then its impossible to change the order. (unless you make a "hand made" file of course). - -- [ Clemens Schwaighofer -=:~ ] [ TBWA\ && TEQUILA\ Japan IT Group ] [6-17-2 Ginza Chuo-ku, Tokyo 104-0061, JAPAN ] [ Tel: +81-(0)3-3545-7703Fax: +81-(0)3-3545-7343 ] [ http://www.tequila.co.jphttp://www.tbwajapan.co.jp ] -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCBxBLjBz/yQjBxz8RAsCXAKCHwURn6UJjrtEOhjaXHa0min94NQCdFlBa EgBrVpGuASFNepZigjV1p5E= =ol2B -END PGP SIGNATURE- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Re: msdos/vfat defaults are annoying
On 2005.02.07 00:42, Pozsár Balázs wrote: On Mon, Feb 07, 2005 at 12:36:10AM +, Al Viro wrote: > On Mon, Feb 07, 2005 at 12:21:08AM +0100, Pozsar Balazs wrote: > > On Sun, Feb 06, 2005 at 07:06:59AM +, Christoph Hellwig wrote: > > > filesystem detection isn't handled at the kerne level. ^ IIRC currently if both msdos and vfat are compiled in (not modules), and you try to mount a vfat filesystem without explicitly specifying the fs type, it will be mounted with the msdos type. With the, it will mounted vfat. But since filesystem detection isn't handled in the kernel, changing the link order is pointless. Please fix your /etc/filesystems instead. ~# grep camera /etc/fstab /dev/sda1 /mnt/camera auto users,noauto 0 0 ~# strace -o mount.trace mount /mnt/camera ~# grep filesystems mount.trace open("/etc/filesystems", O_RDONLY|O_LARGEFILE) = 3 ~# cat /etc/filesystems ext2 ext3 nodev proc nodev devpts iso9660 reiserfs vfat udf Also check man 8 mount, specifically option -t: [...] Creating a file /etc/filesystems can be useful to change the probe order (e.g., to try vfat before msdos) ... This is from man-pages 1.66, btw. Regards, Nuno - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Re: msdos/vfat defaults are annoying
On Mon, Feb 07, 2005 at 12:36:10AM +, Al Viro wrote: > On Mon, Feb 07, 2005 at 12:21:08AM +0100, Pozsar Balazs wrote: > > On Sun, Feb 06, 2005 at 07:06:59AM +, Christoph Hellwig wrote: > > > On Sun, Feb 06, 2005 at 12:33:43AM -0500, John Richard Moser wrote: > > > > I dunno. I can never understand the innards of the kernel devs' minds. > > > > > > filesystem detection isn't handled at the kerne level. > > > > Yeah, but the link order could be changed... Patch inlined. > > And just what does the link order (or changes thereof) have to do with that? IIRC currently if both msdos and vfat are compiled in (not modules), and you try to mount a vfat filesystem without explicitly specifying the fs type, it will be mounted with the msdos type. With the, it will mounted vfat. -- pozsy - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Re: msdos/vfat defaults are annoying
On Mon, Feb 07, 2005 at 12:21:08AM +0100, Pozsar Balazs wrote: > On Sun, Feb 06, 2005 at 07:06:59AM +, Christoph Hellwig wrote: > > On Sun, Feb 06, 2005 at 12:33:43AM -0500, John Richard Moser wrote: > > > I dunno. I can never understand the innards of the kernel devs' minds. > > > > filesystem detection isn't handled at the kerne level. > > Yeah, but the link order could be changed... Patch inlined. And just what does the link order (or changes thereof) have to do with that? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Re: msdos/vfat defaults are annoying
On Sun, Feb 06, 2005 at 07:06:59AM +, Christoph Hellwig wrote: > On Sun, Feb 06, 2005 at 12:33:43AM -0500, John Richard Moser wrote: > > I dunno. I can never understand the innards of the kernel devs' minds. > > filesystem detection isn't handled at the kerne level. Yeah, but the link order could be changed... Patch inlined. -- pozsy diff -Naurd a/fs/Makefile b/fs/Makefile --- a/fs/Makefile 2004-08-04 10:52:28.0 +0200 +++ b/fs/Makefile 2004-08-04 11:32:04.510913663 +0200 @@ -57,8 +57,8 @@ obj-$(CONFIG_MINIX_FS) += minix/ obj-$(CONFIG_FAT_FS) += fat/ obj-$(CONFIG_UMSDOS_FS)+= umsdos/ -obj-$(CONFIG_MSDOS_FS) += msdos/ obj-$(CONFIG_VFAT_FS) += vfat/ +obj-$(CONFIG_MSDOS_FS) += msdos/ obj-$(CONFIG_BFS_FS) += bfs/ obj-$(CONFIG_ISO9660_FS) += isofs/ obj-$(CONFIG_DEVFS_FS) += devfs/ Signed-off-by: Pozsar Balazs <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/