Xfs file size, block size and size

ll /srv/node/dcodxx/test.sh
-rw-r--r--. 1 root root 7 Nov  5 11:18 /srv/node/dcodxx/test.sh

File size is displayed in bytes. This file is stored in the xfs file system with a file size of 4096 bytes.

xfs_info /srv/node/sdaxx/
meta-data=/dev/sda               isize=256    agcount=32, agsize=7630958 blks
         =                       sectsz=4096  attr=2, projid32bit=0
data     =                       bsize=4096   blocks=244190646, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal               bsize=4096   blocks=119233, version=2
         =                       sectsz=4096  sunit=1 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

Does this mean that a block can contain more than one file, if not what happens with the rest of the bytes (4096-7)? Also, where are the 256 bytes reserved for storing the inode, if it is stored in the same block as the file, the file size should not be larger (256 + 7)?

+4
source share
2 answers

Does this mean that a block can contain more than one file, if not what happens with the rest of the bytes (4096-7)?

A block cannot contain more than one file. If the file is more than one block, several blocks are used.

, XFS, "inline", , ( 60 ), inode, , .

256 , inode, , , (256 + 7)?

Inode inode.

+1

, XFS. , , . 1- 4k 4k.

, , , .. - xfs .

256 256 . 256 , .

+3

All Articles