Skip to content

Commit 356557b

Browse files
committed
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>
1 parent 15fb05f commit 356557b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎fs/udf/super.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2402,6 +2402,10 @@ static int udf_statfs(struct dentry *dentry, struct kstatfs *buf)
24022402
buf->f_blocks = sbi->s_partmaps[sbi->s_partition].s_partition_len;
24032403
buf->f_bfree = udf_count_free(sb);
24042404
buf->f_bavail = buf->f_bfree;
2405+
/*
2406+
* Let's pretend each free block is also a free 'inode' since UDF does
2407+
* not have separate preallocated table of inodes.
2408+
*/
24052409
buf->f_files = (lvidiu != NULL ? (le32_to_cpu(lvidiu->numFiles) +
24062410
le32_to_cpu(lvidiu->numDirs)) : 0)
24072411
+ buf->f_bfree;

0 commit comments

Comments
 (0)