2001-12-25 20:27:34

by James Stevenson

[permalink] [raw]
Subject: file names ?

Hi

i could not help but notice in the kernel source
in both the ipv4/netfilter and ipv6/netfilter
dirs there are files the same name which can cause problems
under certin conditions like non-case sensitive file systems.

like
ipt_mark.c
ipt_MARK.c

ipt_tos.c
ipt_TOS.c

this does not cause a problem for me but i do
know people who it does cause a problem for

a small example is a smallish ext2 / filesystem
and the rest being a fat filesystem to that
it can be accessed from both windows and linux.
and there is not enough space on the ext2 to compile a kernel anymore.

anyone got any suggestions ?

thanks
James

--------------------------
Mobile: +44 07779080838
http://www.stev.org
8:10pm up 7 days, 3:40, 1 user, load average: 0.00, 0.00, 0.00




2001-12-25 20:42:17

by Ryan Cumming

[permalink] [raw]
Subject: Re: file names ?

On December 25, 2001 12:25, James Stevenson wrote:
> a small example is a smallish ext2 / filesystem
> and the rest being a fat filesystem to that
> it can be accessed from both windows and linux.
> and there is not enough space on the ext2 to compile a kernel anymore.

Case-insensitivity is not your only problem. 'ln -s' is used multiple times
during the kernel build process, I'd like to see a FAT filesystem try to
handle that. I haven't checked, but the compile might also depend on the
executable bit actually working, and being able to rename and unlink files in
use. Even with filenames that do not collide in a case-insensitive namespace,
the build will fail.

The kernel compile requires a POSIX filesystem, which is a completely sane
demand. I'd go as far as saying that all 'real' filesystems are POSIX
compliant, and that non-POSIX filesystems should only be used for simple data
file storage.

-Ryan

2001-12-25 23:37:13

by Nicholas Knight

[permalink] [raw]
Subject: Re: file names ?

On Tuesday 25 December 2001 12:41 pm, Ryan Cumming wrote:
> On December 25, 2001 12:25, James Stevenson wrote:
> > a small example is a smallish ext2 / filesystem
> > and the rest being a fat filesystem to that
> > it can be accessed from both windows and linux.
> > and there is not enough space on the ext2 to compile a kernel
> > anymore.
>
> Case-insensitivity is not your only problem. 'ln -s' is used multiple
> times during the kernel build process, I'd like to see a FAT
> filesystem try to handle that. I haven't checked, but the compile
> might also depend on the executable bit actually working, and being
> able to rename and unlink files in use. Even with filenames that do
> not collide in a case-insensitive namespace, the build will fail.
>
> The kernel compile requires a POSIX filesystem, which is a completely
> sane demand. I'd go as far as saying that all 'real' filesystems are
> POSIX compliant, and that non-POSIX filesystems should only be used
> for simple data file storage.
>

Actually there should be *no* problem at all. Just enable UMSDOS and
the UMSDOS filesystem will take care of ensuring that the FAT
filesystem supports the links, and the same filenames. Just don't try
to extract the files anywhere but in Linux with UMSDOS enabled.

Err, and don't run scandisk or anything similar on the drives while in
DOS/Windows....

2001-12-26 04:00:25

by Ryan Cumming

[permalink] [raw]
Subject: Re: file names ?

> Actually there should be *no* problem at all. Just enable UMSDOS and
> the UMSDOS filesystem will take care of ensuring that the FAT
> filesystem supports the links, and the same filenames. Just don't try
> to extract the files anywhere but in Linux with UMSDOS enabled.

UMSDOS is a POSIX filesystem, FAT isn't. It's pretty simple.

-Ryan

2001-12-26 05:42:32

by Patrick Schaaf

[permalink] [raw]
Subject: Re: file names ?

> i could not help but notice in the kernel source
> in both the ipv4/netfilter and ipv6/netfilter
> dirs there are files the same name which can cause problems
> under certin conditions like non-case sensitive file systems.
>[...]
> this does not cause a problem for me but i do
> know people who it does cause a problem for
>[...]
> anyone got any suggestions ?

Yes: don't worry. That's Unix.

> a small example is a smallish ext2 / filesystem
> and the rest being a fat filesystem to that
> it can be accessed from both windows and linux.
> and there is not enough space on the ext2 to compile a kernel anymore.

There's a very simple means to "solve" that scenario, if you are the
one in a million people who happens to have such a setup, _and_ want
to recompile your kernel from scratch: create a loop mount file on the
FAT partition, create an ext2fs there, mount that, and compile on it.

Problem solved.

best regards
Patrick

2001-12-28 15:20:14

by Jacques Gelinas

[permalink] [raw]
Subject: Re: file names ?

On Tue, 25 Dec 2001 15:36:46 -0500, Nicholas Knight wrote

> Actually there should be *no* problem at all. Just enable UMSDOS and
> the UMSDOS filesystem will take care of ensuring that the FAT
> filesystem supports the links, and the same filenames. Just don't try
> to extract the files anywhere but in Linux with UMSDOS enabled.
>
> Err, and don't run scandisk or anything similar on the drives while in
> DOS/Windows....

umsdos has no problems with scandisk. hardlinks are represented as special
symlinks for example.

---------------------------------------------------------
Jacques Gelinas <[email protected]>
vserver: run general purpose virtual servers on one box, full speed!
http://www.solucorp.qc.ca/miscprj/s_context.hc