* btrfs fi show not accepting mount path as arg?
@ 2014-12-04 13:50 Shriramana Sharma
2014-12-04 17:41 ` Robert White
2014-12-05 1:35 ` Gui Hecheng
0 siblings, 2 replies; 3+ messages in thread
From: Shriramana Sharma @ 2014-12-04 13:50 UTC (permalink / raw)
To: linux-btrfs
Using SuSE Tumbleweed. Observe:
[samjnaa:~] sudo btrfs fi show
root's password:
Label: 'BRIHATII' uuid: 57836428-576e-466b-8a28-7961712867ab
Total devices 1 FS bytes used 460.19GiB
devid 1 size 931.51GiB used 464.04GiB path /dev/sdb1
Btrfs v3.17+20141103
[samjnaa:~] sudo btrfs fi show /dev/sdb1
Label: 'BRIHATII' uuid: 57836428-576e-466b-8a28-7961712867ab
Total devices 1 FS bytes used 460.16GiB
devid 1 size 931.51GiB used 464.04GiB path /dev/sdb1
Btrfs v3.17+20141103
[samjnaa:~] mount | grep btrfs
/dev/sdb1 on /run/media/samjnaa/BRIHATII type btrfs
(rw,nosuid,nodev,relatime,space_cache,uhelper=udisks2)
[samjnaa:~] sudo btrfs fi show /run/media/samjnaa/BRIHATII/
Btrfs v3.17+20141103
[samjnaa:~]
But the manpage of btrfs filesystem says that <path> is an acceptable
argument to show, by which I understand to mean the mounted path of
the filesystem (or a subvolume thereof?).
Some problem here?
--
Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: btrfs fi show not accepting mount path as arg?
2014-12-04 13:50 btrfs fi show not accepting mount path as arg? Shriramana Sharma
@ 2014-12-04 17:41 ` Robert White
2014-12-05 1:35 ` Gui Hecheng
1 sibling, 0 replies; 3+ messages in thread
From: Robert White @ 2014-12-04 17:41 UTC (permalink / raw)
To: Shriramana Sharma, linux-btrfs
On 12/04/2014 05:50 AM, Shriramana Sharma wrote:
> [samjnaa:~] mount | grep btrfs
> /dev/sdb1 on /run/media/samjnaa/BRIHATII type btrfs
> (rw,nosuid,nodev,relatime,space_cache,uhelper=udisks2)
> [samjnaa:~] sudo btrfs fi show /run/media/samjnaa/BRIHATII/
> Btrfs v3.17+20141103
> [samjnaa:~]
>
> But the manpage of btrfs filesystem says that <path> is an acceptable
> argument to show, by which I understand to mean the mounted path of
> the filesystem (or a subvolume thereof?).
>
> Some problem here?
>
Mount Point: /run/media/samjnaa/BRIHATII
Not Mount Point: /run/media/samjnaa/BRIHATII/
The trailing slash turns the mount point into an implicit reference to
the dot "." entry inside the mounted directory instead of the mount
point itself.
For normal file-system (vnode etc) operations inside the kernel there is
no difference.
For system management operations there is a difference. Lots of tools do
extra work to hide that difference. Apparently btrfs does not.
It gets even more confusing for root. Fo instance on my laptop with a
BTRFS root...
Gust ~ # btrfs fi show /
Label: 'ROOT' uuid: eca97d32-637d-41cb-914c-659875968b5e
Total devices 1 FS bytes used 338.53GiB
devid 1 size 456.45GiB used 351.06GiB path /dev/sda3
Btrfs v3.17.1
Gust ~ # btrfs fi show //
Btrfs v3.17.1
Gust ~ #
But the filesystem operations through the kernel are fine with extra
slashes as extra slashes.
Gust ~ # ls -ld /etc
drwxr-xr-x 1 root root 4440 Dec 4 01:10 /etc
Gust ~ # ls -ld //etc
drwxr-xr-x 1 root root 4440 Dec 4 01:10 //etc
Gust ~ # ls -ld /
drwxr-xr-x 1 root root 380 Nov 18 17:35 /
Gust ~ # ls -ld //
drwxr-xr-x 1 root root 380 Nov 18 17:35 //
Gust ~ #
So the first rule of paranoid system management is "press backspace
after tab when expanding directory names".
(Note also what the realpath command does, said command ne library being
frequently and silently used in some utilities.)
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: btrfs fi show not accepting mount path as arg?
2014-12-04 13:50 btrfs fi show not accepting mount path as arg? Shriramana Sharma
2014-12-04 17:41 ` Robert White
@ 2014-12-05 1:35 ` Gui Hecheng
1 sibling, 0 replies; 3+ messages in thread
From: Gui Hecheng @ 2014-12-05 1:35 UTC (permalink / raw)
To: Shriramana Sharma; +Cc: linux-btrfs
On Thu, 2014-12-04 at 19:20 +0530, Shriramana Sharma wrote:
> Using SuSE Tumbleweed. Observe:
>
> [samjnaa:~] sudo btrfs fi show
> root's password:
> Label: 'BRIHATII' uuid: 57836428-576e-466b-8a28-7961712867ab
> Total devices 1 FS bytes used 460.19GiB
> devid 1 size 931.51GiB used 464.04GiB path /dev/sdb1
>
> Btrfs v3.17+20141103
> [samjnaa:~] sudo btrfs fi show /dev/sdb1
> Label: 'BRIHATII' uuid: 57836428-576e-466b-8a28-7961712867ab
> Total devices 1 FS bytes used 460.16GiB
> devid 1 size 931.51GiB used 464.04GiB path /dev/sdb1
>
> Btrfs v3.17+20141103
> [samjnaa:~] mount | grep btrfs
> /dev/sdb1 on /run/media/samjnaa/BRIHATII type btrfs
> (rw,nosuid,nodev,relatime,space_cache,uhelper=udisks2)
> [samjnaa:~] sudo btrfs fi show /run/media/samjnaa/BRIHATII/
> Btrfs v3.17+20141103
> [samjnaa:~]
>
> But the manpage of btrfs filesystem says that <path> is an acceptable
> argument to show, by which I understand to mean the mounted path of
> the filesystem (or a subvolume thereof?).
>
> Some problem here?
>
Hi Shriramana Sharma,
I think this problem has already got a fix, see below:
https://patchwork.kernel.org/patch/5391131/
Thanks,
Gui
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-12-05 1:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-04 13:50 btrfs fi show not accepting mount path as arg? Shriramana Sharma
2014-12-04 17:41 ` Robert White
2014-12-05 1:35 ` Gui Hecheng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox