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

gdu assumes directory takes up 1 block when it doesn't (on XFS) #393

Open
joliss opened this issue Dec 5, 2024 · 0 comments
Open

gdu assumes directory takes up 1 block when it doesn't (on XFS) #393

joliss opened this issue Dec 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@joliss
Copy link

joliss commented Dec 5, 2024

On XFS, small directories can be stored inline in the inode, rather than taking up a block. This is reported correctly by du, but gdu seems to assume that a directory always occupies one block.

~/tmp $ mkdir somedir
~/tmp $ touch somedir/a
~/tmp $ touch somedir/b
~/tmp $ stat somedir | grep Blocks
  Size: 24        	Blocks: 0          IO Block: 4096   directory
~/tmp $ sudo xfs_bmap somedir
somedir: no extents
~/tmp $ du somedir
0	somedir
~/tmp $ gdu -n | grep somedir
    4.0 KiB /somedir

This happens on gdu master (a8b32c).

@dundee dundee added the bug Something isn't working label Dec 6, 2024
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

2 participants