gdu
gdu copied to clipboard
-x doesn't seem to respect filesystem boundary on BTRFS
If you have a BTRFS snapshot directory on Linux system, "gdu -x" seems to peek into it while "du -x" doesn't peek into it.
Of course, such directory is not listed in /proc/self/mounts (/etc/mtab), since they are created by btrfs subvolume snapshot .... But stepping into such snapshot subvolume and alike are crossing filesystem boundary. The device number are different.
$ stat .
File: .
Size: 326 Blocks: 0 IO Block: 4096 directory
Device: 0,77 Inode: 256 Links: 1
Access: (0755/drwxr-xr-x) Uid: ( 1000/ osamu) Gid: ( 1000/ osamu)
Access: 2023-01-29 00:24:37.239494047 +0900
Modify: 2022-12-20 15:37:26.049621026 +0900
Change: 2022-12-20 15:37:26.049621026 +0900
Birth: 2021-11-07 17:30:03.545015150 +0900
Press any key to continue...
$ pwd
/home/osamu/github
I have snapshot:
$ stat .
File: .
Size: 326 Blocks: 0 IO Block: 4096 directory
Device: 0,90 Inode: 256 Links: 1
Access: (0755/drwxr-xr-x) Uid: ( 1000/ osamu) Gid: ( 1000/ osamu)
Access: 2023-01-22 00:53:07.567855980 +0900
Modify: 2022-12-20 15:37:26.049621026 +0900
Change: 2022-12-20 15:37:26.049621026 +0900
Birth: 2021-11-07 17:30:03.545015150 +0900
Press any key to continue...
$ pwd
/home/osamu/github/.bss.d/2023-01-21T23:43:23+00:00.hour
Then gdu seems to peek into this.
A working patch (I had to gzip it because GitHub didn't accept my .patch file):