Chris Murphy
2013-Oct-15 19:23 UTC
regression, can''t mount subvol if default subvol is changed
After changing the default subvolume, I can''t mount a nested subvolume with a correct relative pathname to the default subvolume; it can only be mounted by absolute path or subvolid. Setup: 3.11.4-302.fc20.x86_64 btrfs-progs-0.20.rc1.20130917git194aa4a-1.fc20.x86_64 dir = a directory, sub=a subvolume, nested=a subvolume; set-default is top level 5 # mount -o subvol=dir/sub /dev/vda1 /mnt # btrfs subvol list /mnt ID 263 gen 140 top level 5 path dir/sub ID 264 gen 140 top level 263 path nested # btrfs subvol set-default 263 /mnt # umount /mnt # mount -o subvol=nested /dev/vda1 /mnt mount: mount(2) failed: No such file or directory # mount -o subvol=/nested /dev/vda1 /mnt mount: mount(2) failed: No such file or directory # mount -o subvol=/dir/sub/nested /dev/vda1 /mnt [works] # umount /mnt # mount -o subvolid=264 /dev/vda1 /mnt [works] The subvol nested is under dir/sub which is ID 263. So if set-default is 263, I should be able to mount with subvol=nested as a relative path to the default subvolume, but it fails. There''s no meaningful kernel message at the time of the failed mount, just: [ 4265.386990] device label fedora devid 1 transid 165 /dev/vda1 But I get the exact same message with a successful mount. So should the mounting of relative pathnames still work? Chris Murphy-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Chris Murphy
2013-Oct-15 19:32 UTC
Re: regression, can''t mount subvol if default subvol is changed
On Oct 15, 2013, at 1:23 PM, Chris Murphy <lists@colorremedies.com> wrote:> > So should the mounting of relative pathnames still work?Is it related to fix: [PATCH] Btrfs: use right root when checking for hash collision can''t move subvols into subvols http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg27848.html Chris Murphy-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Chris Murphy
2013-Oct-15 20:06 UTC
Re: regression, can''t mount subvol if default subvol is changed
On Oct 15, 2013, at 1:23 PM, Chris Murphy <lists@colorremedies.com> wrote:> After changing the default subvolume, I can''t mount a nested subvolume with a correct relative pathname to the default subvolume; it can only be mounted by absolute path or subvolid. > > Setup: > 3.11.4-302.fc20.x86_64 > btrfs-progs-0.20.rc1.20130917git194aa4a-1.fc20.x86_64 > dir = a directory, sub=a subvolume, nested=a subvolume; set-default is top level 5 > > > # mount -o subvol=dir/sub /dev/vda1 /mnt > # btrfs subvol list /mnt > ID 263 gen 140 top level 5 path dir/sub > ID 264 gen 140 top level 263 path nested > > # btrfs subvol set-default 263 /mnt > # umount /mnt > # mount -o subvol=nested /dev/vda1 /mnt > mount: mount(2) failed: No such file or directory > # mount -o subvol=/nested /dev/vda1 /mnt > mount: mount(2) failed: No such file or directory > > # mount -o subvol=/dir/sub/nested /dev/vda1 /mnt > [works] > # umount /mnt > # mount -o subvolid=264 /dev/vda1 /mnt > [works] >Further both of these work and produce the same results # mount -o subvol=/dir/sub/nested /dev/vda1 /mnt # mount -o subvol=dir/sub/nested /dev/vda1 /mnt I think that''s wrong, unless set-default is effectively deprecated. Is it? /dir/ and dir/ are not the same thing, but even with set-default 263 both of those work as if they were the same thing. Chris Murphy-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
David Sterba
2013-Oct-15 20:50 UTC
Re: regression, can''t mount subvol if default subvol is changed
On Tue, Oct 15, 2013 at 01:23:44PM -0600, Chris Murphy wrote:> After changing the default subvolume, I can''t mount a nested subvolume > with a correct relative pathname to the default subvolume; it can only > be mounted by absolute path or subvolid.The path to subvol= is always taken as absolute, no matter if the path starts with / or not. david -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Chris Murphy
2013-Oct-15 20:58 UTC
Re: regression, can''t mount subvol if default subvol is changed
On Oct 15, 2013, at 2:50 PM, David Sterba <dsterba@suse.cz> wrote:> On Tue, Oct 15, 2013 at 01:23:44PM -0600, Chris Murphy wrote: >> After changing the default subvolume, I can''t mount a nested subvolume >> with a correct relative pathname to the default subvolume; it can only >> be mounted by absolute path or subvolid. > > The path to subvol= is always taken as absolute, no matter if the path > starts with / or not.Looks like this changed with the 3.2 kernel " Subvolumes mountable by full path", I thought that was in addition to relative rather than a total change in behavior. Good to know. Is the idea that subvolume set-default only affects mount -o defaults behavior and nothing else? Chris Murphy-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
David Sterba
2013-Oct-15 21:48 UTC
Re: regression, can''t mount subvol if default subvol is changed
On Tue, Oct 15, 2013 at 02:58:22PM -0600, Chris Murphy wrote:> Looks like this changed with the 3.2 kernel " Subvolumes mountable by > full path", I thought that was in addition to relative rather than a > total change in behavior. Good to know.Yes, the pre-3.2 behaviour was limited to subvolumes in the toplevel subvolume, nested subvols were mountable via subvolrootid, but that was only a clumsy temporary workaround.> Is the idea that subvolume set-default only affects mount -o defaults > behavior and nothing else?Yes. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Chris Murphy
2013-Oct-15 21:52 UTC
Re: regression, can''t mount subvol if default subvol is changed
On Oct 15, 2013, at 3:48 PM, David Sterba <dsterba@suse.cz> wrote:> On Tue, Oct 15, 2013 at 02:58:22PM -0600, Chris Murphy wrote: >> Looks like this changed with the 3.2 kernel " Subvolumes mountable by >> full path", I thought that was in addition to relative rather than a >> total change in behavior. Good to know. > > Yes, the pre-3.2 behaviour was limited to subvolumes in the toplevel > subvolume, nested subvols were mountable via subvolrootid, but that was > only a clumsy temporary workaround. > >> Is the idea that subvolume set-default only affects mount -o defaults >> behavior and nothing else? > > Yes.Great, thanks for the clarification. Chris Murphy -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html