On Mon, Dec 24, 2012 at 4:13 PM, Vadim Zhukov <persg...@gmail.com> wrote: ... > Thanks a lot, Phillip! Now I feel myself much more brave than a few hours > ago. :) I think about tweaking NAME_MAX to 1535: this should be fine for any > 255 UTF-8 characters (and even a bit more). Oh, PATH_MAX is smaller... But > none said it'll be easy; otherwise somebody probably had done this work in > OpenBSD already. :)
My response made you feel *more* brave about making the change? Changing both the on-disk format *and* ABI makes this worse than a normal a flag day: not only would you be unable to use normal OpenBSD binaries, but you wouldn't be able to view the filesystem with a normal OpenBSD bsd.rd. If something goes wrong, digging out your data could be really painful. That doesn't mean it's a bad idea. 4.4 BSD changed the BSD world by changing the size of off_t and we're all the better off for it, but even that was just an ABI change. Changing NAME_MAX is a big change... >> > Also, while looking through sources, I've found some XXX in >> > sys/compat/linux/linux_misc.c. Am I right with the patch below? >> >> Not until all the filesystems actually *set* f_namemax. Looks like >> FAT, for example, returns zero right now... > > Hmmm, is there any interest in fixing those filesystems code? I can build a > patch now that I'm in that land anyway. Sure. Please verify that pathconf(path, _PC_NAME_MAX) returns the correct value for those filesystems too. (This can be tested from the shell via "getconf NAME_MAX path".) Philip Guenther