* regression, can't mount subvol if default subvol is changed
@ 2013-10-15 19:23 Chris Murphy
2013-10-15 19:32 ` Chris Murphy
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Chris Murphy @ 2013-10-15 19:23 UTC (permalink / raw)
To: Btrfs BTRFS
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: regression, can't mount subvol if default subvol is changed
2013-10-15 19:23 regression, can't mount subvol if default subvol is changed Chris Murphy
@ 2013-10-15 19:32 ` Chris Murphy
2013-10-15 20:06 ` Chris Murphy
2013-10-15 20:50 ` David Sterba
2 siblings, 0 replies; 7+ messages in thread
From: Chris Murphy @ 2013-10-15 19:32 UTC (permalink / raw)
To: Btrfs BTRFS
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: regression, can't mount subvol if default subvol is changed
2013-10-15 19:23 regression, can't mount subvol if default subvol is changed Chris Murphy
2013-10-15 19:32 ` Chris Murphy
@ 2013-10-15 20:06 ` Chris Murphy
2013-10-15 20:50 ` David Sterba
2 siblings, 0 replies; 7+ messages in thread
From: Chris Murphy @ 2013-10-15 20:06 UTC (permalink / raw)
To: Btrfs BTRFS
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: regression, can't mount subvol if default subvol is changed
2013-10-15 19:23 regression, can't mount subvol if default subvol is changed Chris Murphy
2013-10-15 19:32 ` Chris Murphy
2013-10-15 20:06 ` Chris Murphy
@ 2013-10-15 20:50 ` David Sterba
2013-10-15 20:58 ` Chris Murphy
2 siblings, 1 reply; 7+ messages in thread
From: David Sterba @ 2013-10-15 20:50 UTC (permalink / raw)
To: Chris Murphy; +Cc: Btrfs BTRFS
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: regression, can't mount subvol if default subvol is changed
2013-10-15 20:50 ` David Sterba
@ 2013-10-15 20:58 ` Chris Murphy
2013-10-15 21:48 ` David Sterba
0 siblings, 1 reply; 7+ messages in thread
From: Chris Murphy @ 2013-10-15 20:58 UTC (permalink / raw)
To: dsterba; +Cc: Btrfs BTRFS
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: regression, can't mount subvol if default subvol is changed
2013-10-15 20:58 ` Chris Murphy
@ 2013-10-15 21:48 ` David Sterba
2013-10-15 21:52 ` Chris Murphy
0 siblings, 1 reply; 7+ messages in thread
From: David Sterba @ 2013-10-15 21:48 UTC (permalink / raw)
To: Chris Murphy; +Cc: dsterba, Btrfs BTRFS
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: regression, can't mount subvol if default subvol is changed
2013-10-15 21:48 ` David Sterba
@ 2013-10-15 21:52 ` Chris Murphy
0 siblings, 0 replies; 7+ messages in thread
From: Chris Murphy @ 2013-10-15 21:52 UTC (permalink / raw)
To: dsterba; +Cc: Btrfs BTRFS
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-10-15 21:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-15 19:23 regression, can't mount subvol if default subvol is changed Chris Murphy
2013-10-15 19:32 ` Chris Murphy
2013-10-15 20:06 ` Chris Murphy
2013-10-15 20:50 ` David Sterba
2013-10-15 20:58 ` Chris Murphy
2013-10-15 21:48 ` David Sterba
2013-10-15 21:52 ` Chris Murphy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox