Hi Ian,

In the meantime I moved forward to Ubuntu 24.04LTS and today I got kernel 
6.17.0-14
I also recompiled the test-statx programm with the latest libs.

root@prod:/home/bernie24# uname -a
Linux prod 6.17.0-14-generic #14~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jan 15 
15:52:10 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

root@prod:/home/bernie24# tune2fs -l /dev/sda2 |grep ' size:'
Block size:               4096
Fragment size:            4096
Group descriptor size:    64
Flex block group size:    16
Inode size:               256

root@prod:/home/bernie24/c# ldd test-statx
        linux-vdso.so.1 (0x00007b9257a9c000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007b9257800000)
        /lib64/ld-linux-x86-64.so.2 (0x00007b9257a9e000)

root@prod:/home/bernie24# bin/find_sparse_file.bash 
+ UB=/usr/bin
+ US=/usr/sbin
+ START=/
+ env
+ /usr/bin/grep '^LC_'
+ /usr/bin/locale
LANG=de_AT.UTF-8
LANGUAGE=
LC_CTYPE="de_AT.UTF-8"
LC_NUMERIC="de_AT.UTF-8"
LC_TIME="de_AT.UTF-8"
LC_COLLATE="de_AT.UTF-8"
LC_MONETARY="de_AT.UTF-8"
LC_MESSAGES="de_AT.UTF-8"
LC_PAPER="de_AT.UTF-8"
LC_NAME="de_AT.UTF-8"
LC_ADDRESS="de_AT.UTF-8"
LC_TELEPHONE="de_AT.UTF-8"
LC_MEASUREMENT="de_AT.UTF-8"
LC_IDENTIFICATION="de_AT.UTF-8"
LC_ALL=
+ /usr/bin/sort -nr
+ /usr/bin/egrep '^0,99'
+ /usr/bin/find / -xdev -type f -printf '%S bytes=%s file=%p\n'
0,999734 bytes=4146256 file=/usr/share/icons/Adwaita/cursors/progress

root@prod:/home/bernie24# dd bs=4K if=/usr/share/icons/Adwaita/cursors/progress 
of=/tmp/4K.out
1012+1 records in
1012+1 records out
4146256 bytes (4,1 MB, 4,0 MiB) copied, 0,00686331 s, 604 MB/s

HERE you see 1012+1. I assume the last partially filled block is not
counted correctly.


root@prod:/home/bernie24# c/test-statx /usr/share/icons/Adwaita/cursors/progress
statx(/usr/share/icons/Adwaita/cursors/progress) = 0
results=1fff (stx_blocks is mask 0x400U)
  Size: 4146256         Blocks: 8096       IO Block: 4096    regular file
Device: 08:02           Inode: 1066765     Links: 1    
Access: (0644/-rw-r--r--)  Uid:     0   Gid:     0
Access: 2026-02-05 16:29:24.842880391+0100
Modify: 2024-03-18 19:46:24.000000000+0100
Change: 2025-11-08 13:37:07.598385217+0100
 Birth: 2025-11-08 13:37:07.549384702+0100
Attributes: 0000000000000000 (........ ........ ........ ........ ........ 
..--.... ..---... .---.-..)

root@prod:/home/bernie24# filefrag -sv /usr/share/icons/Adwaita/cursors/progress
Filesystem type is: ef53
File size of /usr/share/icons/Adwaita/cursors/progress is 4146256 (1013 blocks 
of 4096 bytes)
 ext:     logical_offset:        physical_offset: length:   expected: flags:
   0:        0..    1011:    3957760..   3958771:   1012:             last
/usr/share/icons/Adwaita/cursors/progress: 1 extent found

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2137491

Title:
  syscall statx(2) report wrong value for stx_blocks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-hwe-6.8/+bug/2137491/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to