Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-x doesn't seem to respect filesystem boundary on BTRFS #204

Open
osamuaoki opened this issue Jan 28, 2023 · 1 comment
Open

-x doesn't seem to respect filesystem boundary on BTRFS #204

osamuaoki opened this issue Jan 28, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@osamuaoki
Copy link

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.

@dundee dundee added the bug Something isn't working label Feb 3, 2023
@lilydjwg
Copy link

lilydjwg commented Mar 9, 2024

A working patch (I had to gzip it because GitHub didn't accept my .patch file):

traditional-no-cross.patch.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants