On Monday 24 November 2008 14:59, Rob Landley wrote: > On Sunday 23 November 2008 09:01:35 Denys Vlasenko wrote: > > On Friday 07 November 2008 03:01, [EMAIL PROTECTED] wrote: > > > busybox's implementation of mount differs from the standalone version > > Back in the 1.1 timeframe I rewrote it more or less from scratch, something > like 3 times, trying to get it to behave sanely. (Mount is tricksy.) > > I see it's been fairly heavily edited then. Kind of horrible to read through > now, actually.
NFS code was merged into mount.c. Somebody asked me to do it (it was before my maintainership). In hindsight, that was not such a good idea - now it's not readable. Other that NFS code - what places you don't like Rob? > And kind of broken in several places. Ooh, ick. Where? :( > The tricky one is that you have to overmount / to switch_root off of rootfs, > so you can't simply say "this mount point is already in use". > > The rule should probably be more like "If existing mount has same filesystem > type as the new one you're trying to do, bail out". Except this won't work > if > you try each block-backed type in /proc/filesystems in sequence autodetect > your mount point (which is the only sane way to do it; the kernel knows what > filesystems it supports, a userspace tool doesn't). Luckily, for tmpfs you > _must_ specify the type (either via -t or saying it in fstab), and that's the > one we really care about here. > > > Might get real weird in corner cases of stacked mounts, > > union mounts, mounts with some options differing and so on. > > Some filesystem types are per-instance, and some are shared with all > instances > (most block backed ones, non-containerized versions of /proc and /sys...). > > Did you ever read the thing I wrote about the four types of filesystems > (blocked back, ram backed, synthetic, and network)? No. Do you have an URL? -- vda _______________________________________________ busybox mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/busybox
