linux-yocto/fs/f2fs
Chao Yu 3bc5abf8e7 f2fs: don't over-report free space or inodes in statvfs
[ Upstream commit a920196062 ]

This fixes an analogus bug that was fixed in modern filesystems:
a) xfs in commit 4b8d867ca6 ("xfs: don't over-report free space or
inodes in statvfs")
b) ext4 in commit f87d3af741 ("ext4: don't over-report free space
or inodes in statvfs")
where statfs can report misleading / incorrect information where
project quota is enabled, and the free space is less than the
remaining quota.

This commit will resolve a test failure in generic/762 which tests
for this bug.

generic/762       - output mismatch (see /share/git/fstests/results//generic/762.out.bad)
#    --- tests/generic/762.out   2025-04-15 10:21:53.371067071 +0800
#    +++ /share/git/fstests/results//generic/762.out.bad 2025-05-13 16:13:37.000000000 +0800
#    @@ -6,8 +6,10 @@
#     root blocks2 is in range
#     dir blocks2 is in range
#     root bavail2 is in range
#    -dir bavail2 is in range
#    +dir bavail2 has value of 1539066
#    +dir bavail2 is NOT in range 304734.87 .. 310891.13
#     root blocks3 is in range
#    ...
#    (Run 'diff -u /share/git/fstests/tests/generic/762.out /share/git/fstests/results//generic/762.out.bad'  to see the entire diff)

HINT: You _MAY_ be missing kernel fix:
      XXXXXXXXXXXXXX xfs: don't over-report free space or inodes in statvfs

Cc: stable@kernel.org
Fixes: ddc34e328d ("f2fs: introduce f2fs_statfs_project")
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-07-06 11:00:09 +02:00
..
acl.c
acl.h
checkpoint.c Revert "f2fs: rebuild nat_bits during umount" 2025-04-25 10:45:16 +02:00
compress.c f2fs: use vmalloc instead of kvmalloc in .init_{,de}compress_ctx 2025-06-27 11:08:53 +01:00
data.c f2fs: fix to detect gcing page in f2fs_is_cp_guaranteed() 2025-06-19 15:28:12 +02:00
debug.c f2fs: use BLKS_PER_SEG, BLKS_PER_SEC, and SEGS_PER_SEC 2024-06-12 11:12:28 +02:00
dir.c f2fs: Introduce linear search for dentries 2025-02-08 09:52:35 +01:00
extent_cache.c f2fs: fix to shrink read extent node in batches 2024-12-14 20:00:15 +01:00
f2fs.h f2fs: use vmalloc instead of kvmalloc in .init_{,de}compress_ctx 2025-06-27 11:08:53 +01:00
file.c f2fs: fix to wait dio completion 2025-01-09 13:31:54 +01:00
gc.c f2fs: fix to avoid use GC_AT when setting gc_mode as GC_URGENT_LOW or GC_URGENT_MID 2024-12-09 10:32:26 +01:00
gc.h
hash.c
inline.c f2fs: Introduce linear search for dentries 2025-02-08 09:52:35 +01:00
inode.c f2fs: fix to set atomic write status more clear 2025-06-27 11:08:56 +01:00
iostat.c
iostat.h
Kconfig
Makefile
namei.c f2fs: prevent kernel warning due to negative i_nlink from corrupted image 2025-06-27 11:08:48 +01:00
node.c Revert "f2fs: rebuild nat_bits during umount" 2025-04-25 10:45:16 +02:00
node.h f2fs: use BLKS_PER_SEG, BLKS_PER_SEC, and SEGS_PER_SEC 2024-06-12 11:12:28 +02:00
recovery.c f2fs: use BLKS_PER_SEG, BLKS_PER_SEC, and SEGS_PER_SEC 2024-06-12 11:12:28 +02:00
segment.c f2fs: fix to set atomic write status more clear 2025-06-27 11:08:56 +01:00
segment.h f2fs: fix to account dirty data in __get_secs_required() 2024-12-09 10:32:25 +01:00
shrinker.c
super.c f2fs: don't over-report free space or inodes in statvfs 2025-07-06 11:00:09 +02:00
sysfs.c f2fs: introduce f2fs_base_attr for global sysfs entries 2025-06-04 14:42:12 +02:00
verity.c
xattr.c f2fs: reduce expensive checkpoint trigger frequency 2024-10-04 16:29:36 +02:00
xattr.h