On Wed, Dec 02, 2015 at 01:51:17PM +0100, Karel Zak wrote: > On Fri, Nov 27, 2015 at 06:15:41PM +0100, Stanislav Brabec wrote: > > root has to be literally the same as src_root, which is already the path > > prefixed by /{subvolume}. Otherwise it will not match in > > mnt_fs_streq_target(fs, xtgt) inside mnt_table_is_fs_mounted() and > > repeated "mount -a" will mount it again and again. > > yes > > > if (src_root && !startswith(root, src_root)) { > > - size_t sz = strlen(root) + strlen(src_root) + 1; > > - char *tmp = malloc(sz); > > - > > + char *tmp = strdup (src_root); > > if (!tmp) > > goto err; > > - snprintf(tmp, sz, "%s%s", src_root, root); > > free(root); > > root = tmp; > > } > > but this code is there for another use case. The problem is when the > fstab_fs source is *sub-directory* on btrfs subvolume (or another bind > mount). For example imagine: > > /dev/sdc /mnt/test btrfs subvol=/anydir Only subvolumes are accepted as parameter for 'subvol=', otherwise bind mount needs to be used. -- 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