Busybox[PATCH] for mount.c - enable fsc as a mount option for NFS

Roland Arnold rolandarnold at gmail.com
Tue May 19 07:20:01 UTC 2009


On Monday 18 May 2009 10:17, Denys Vlasenko wrote:
>> In looking at this I first hacked up a very quick hard-coded test to
>> only pass the mount string to the kernel for an NFS3 setup, and
>> according to bloatcheck the resulting busybox binary shrank by ~56
>> kilobytes,
>
> Kilobytes? Can you send me the patch and .config you saw this on?

Yes, kilobytes. Attached is a config file and patch that does pretty
much what the hack effectively did: ignore/delete everything related
to binary nfs-mounting. This doesn't handle background mounting -
which is a userspace detail AFAICS, and really must be put back - but
for people using a new kernel, doing only foreground mounting, this
would work.

> People may copy mount binary to 2.4-based machine, and then
> it will fail there. They can even move it to older 2.6 machine,
> and it will fail. Bad PR :D ;)
>
> I think 2.4 is not old enough to disregard that.

Hey, you're a maintainer for a reason :-D

>> Would this be acceptable, or would (as another alternative) a
>> menuconfig setting (Binary NFS mount call vs String NFS mount call) be
>> more preferable for you? Are there other examples that I should look
>> at?
>
> I still think runtime check is better than smaller code size.
> If you really need to exclude that code, add CONFIG_xxx
> as _optional_ way to exclude binary NFS mount machinery
> (CONFIG_xxx help text should explain which kernels are safe
> to use it on), but let people be able to have mount applet
> which works on both newer and older kernels.

Sounds decent enough. I'll have a go at it.

Roland Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mount.c.patch
Type: text/x-patch
Size: 26360 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090519/789e4db5/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: _config
Type: application/octet-stream
Size: 26657 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090519/789e4db5/attachment-0001.obj>


More information about the busybox mailing list