Re: [regression?] escaping commas in overlayfs mount options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 2023-10-03 12:50+0300, Amir Goldstein <amir73il@xxxxxxxxx> sent:

What you can do is use the new mount API for kernel >=6.5
and provide the parameters one by one, e.g.:

fsconfig(fs_fd, FSCONFIG_SET_STRING, "lowerdir", "/tmp/test-lower,", 0);

See example in commit message of
b36a5780cb44 ("ovl: modify layer parameter parsing")

That would be great, but fsconfig doesn't appear to be documented. It's a new syscall? What kernel version was it introduced in, and how am I supposed to support older kernels?

The second part of your message suggests that the answer to older kernel support is libmount:

The mount tool and libmount in util-linux 2.39 support the new mount API [1]. They already auto detect and fallback to the old mount API, so you wouldn't need to implement per kernel version logic.

Again sounds great, but in the libmount documentation I've been looking at [1], there doesn't seem to be a function for setting options individually. mnt_context_set_options accepts a comma-delimited string, and mnt_optstr_set_option modifies a comma-delimited string. What am I missing?

Thanks,
Ryan


[1] https://cdn.kernel.org/pub/linux/utils/util-linux/v2.39/libmount-docs/index.html



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux