linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* the major/minor value of statx(kernel samples/vfs/test-statx.c) does not match /usr/bin/stat
@ 2021-06-17 10:12 Wang Yugui
  2021-06-23 20:49 ` David Sterba
  0 siblings, 1 reply; 3+ messages in thread
From: Wang Yugui @ 2021-06-17 10:12 UTC (permalink / raw)
  To: linux-fsdevel, linux-btrfs, dhowells

Hi,

the major/minor value of statx(kernel samples/vfs/test-statx.c) does not
match /usr/bin/stat. 

major/minor of statx result seems be truncated by something like
old_decode_dev()?

kernel:5.10.44
kernel-headers:5.10.44
test fs: vfat, xfs, btrfs

btrfs output sample:

[root@T640 vfs]# ./test-statx /ssd/
statx(/ssd/) = 0
results=1fff
  Size: 200             Blocks: 0          IO Block: 4096    directory
Device: 00:31           Inode: 256         Links: 1
Access: (0755/drwxr-xr-x)  Uid:     0   Gid:     0
Access: 2021-06-16 19:16:56.644344956+0800
Modify: 2021-05-06 16:14:33.676248229+0800
Change: 2021-05-06 16:14:33.676248229+0800
 Birth: 2020-11-18 14:03:35.324915316+0800
Attributes: 0000000000002000 (........ ........ ........ ........ ........ ..-..... ..?-.... .---.-..)
[root@T640 vfs]# stat /ssd/
  File: ‘/ssd/’
  Size: 200             Blocks: 0          IO Block: 4096   directory
Device: 31h/49d Inode: 256         Links: 1
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2021-06-16 19:16:56.644344956 +0800
Modify: 2021-05-06 16:14:33.676248229 +0800
Change: 2021-05-06 16:14:33.676248229 +0800
 Birth: -

vfat output sample:
[root@T640 vfs]# ./test-statx /boot/efi/
statx(/boot/efi/) = 0
results=17ff
  Size: 4096            Blocks: 8          IO Block: 4096    directory
Device: 08:01           Inode: 1           Links: 3
Access: (0700/drwx------)  Uid:     0   Gid:     0
Access: 1970-01-01 08:00:00.000000000+0800
Modify: 1970-01-01 08:00:00.000000000+0800
Change: 1970-01-01 08:00:00.000000000+0800
Attributes: 0000000000002000 (........ ........ ........ ........ ........ ..-..... ..?-.... ........)
[root@T640 vfs]# stat /boot/efi/
  File: ‘/boot/efi/’
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 801h/2049d      Inode: 1           Links: 3
Access: (0700/drwx------)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 1970-01-01 08:00:00.000000000 +0800
Modify: 1970-01-01 08:00:00.000000000 +0800
Change: 1970-01-01 08:00:00.000000000 +0800
 Birth: -


Best Regards
Wang Yugui (wangyugui@e16-tech.com)
2021/06/17



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-23 22:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-17 10:12 the major/minor value of statx(kernel samples/vfs/test-statx.c) does not match /usr/bin/stat Wang Yugui
2021-06-23 20:49 ` David Sterba
2021-06-23 22:19   ` Wang Yugui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).