mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
udf: Clarify meaning of f_files in udf_statfs
UDF does not have separate preallocated table of inodes. So similarly to XFS we pretend that every free block is also a free inode in statfs(2) output. Clarify this in a comment. Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
@@ -2402,6 +2402,10 @@ static int udf_statfs(struct dentry *dentry, struct kstatfs *buf)
|
|||||||
buf->f_blocks = sbi->s_partmaps[sbi->s_partition].s_partition_len;
|
buf->f_blocks = sbi->s_partmaps[sbi->s_partition].s_partition_len;
|
||||||
buf->f_bfree = udf_count_free(sb);
|
buf->f_bfree = udf_count_free(sb);
|
||||||
buf->f_bavail = buf->f_bfree;
|
buf->f_bavail = buf->f_bfree;
|
||||||
|
/*
|
||||||
|
* Let's pretend each free block is also a free 'inode' since UDF does
|
||||||
|
* not have separate preallocated table of inodes.
|
||||||
|
*/
|
||||||
buf->f_files = (lvidiu != NULL ? (le32_to_cpu(lvidiu->numFiles) +
|
buf->f_files = (lvidiu != NULL ? (le32_to_cpu(lvidiu->numFiles) +
|
||||||
le32_to_cpu(lvidiu->numDirs)) : 0)
|
le32_to_cpu(lvidiu->numDirs)) : 0)
|
||||||
+ buf->f_bfree;
|
+ buf->f_bfree;
|
||||||
|
Reference in New Issue
Block a user