Re: [PATCH] proc: introduce proc_statfs()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 10, 2023 at 11:20:03PM +0800, Chao Yu wrote:
> Introduce proc_statfs() to replace simple_statfs(), so that
> f_bsize queried from statfs() can be consistent w/ the value we
> set in s_blocksize.
> 
> stat -f /proc/
> 
> Before:
>     ID: 0        Namelen: 255     Type: proc
> Block size: 4096       Fundamental block size: 4096
> Blocks: Total: 0          Free: 0          Available: 0
> Inodes: Total: 0          Free: 0
> 
> After:
>     ID: 0        Namelen: 255     Type: proc
> Block size: 1024       Fundamental block size: 1024
> Blocks: Total: 0          Free: 0          Available: 0
> Inodes: Total: 0          Free: 0

4096 is better value is in fact.

seq_files allocate 1 page and fill it, therefore reading less than
PAGE_SIZE from /proc is mostly waste of syscalls.

I doubt anything uses f_bsize.

BTW this patch is not self contained.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux