On Thu, Jan 21, 2016 at 04:24:55PM +0100, Stanislav Brabec wrote: > Karel Zak wrote: > >On Wed, Jan 20, 2016 at 10:57:07PM +0100, Stanislav Brabec wrote: > >>+/** > >>+ * btrfs_get_default_subvol_id: > >>+ * @path: Path to mounted btrfs volume > > > >this comment formatting indicate API docs, for private library functions > >we don't use "/**". > > > Should I export this? I think that no. It's private function. > > Well, looking again into libbtrfs, it is also possible to use > btrfs_list_get_default_subvolume() from libbtrfs, as is nearly exactly the > same. But I am not sure, whether it is good to introduce such a > dependency just for a single small function. I really don't want to depend on libbtrfs. > P. S.: > > David also wrote btrfs_get_default_subvolume_path(), but then we found, > that there is probably better to use subvolid and path saved in > procinfo: Do you mean /proc/self/mountinfo ? > > + The tab.c patch would be much smaller and straightforward. > - Kernel evaluates it when creating procinfo entries, this would > duplicate it. > x Both subvol and subvolid in procinfo were introduced together in the > mainline kernel, and btrfs_get_default_subvolume_path() needs more > ioctl() calls. No sure if I follow. Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html