OpenCloudOS-Kernel/fs/ext4
Theodore Ts'o 2bd7c60866 ext4: fix FS_IOC_GETFSMAP handling
commit 4a622e4d477bb12ad5ed4abbc7ad1365de1fa347 upstream.

The original implementation ext4's FS_IOC_GETFSMAP handling only
worked when the range of queried blocks included at least one free
(unallocated) block range.  This is because how the metadata blocks
were emitted was as a side effect of ext4_mballoc_query_range()
calling ext4_getfsmap_datadev_helper(), and that function was only
called when a free block range was identified.  As a result, this
caused generic/365 to fail.

Fix this by creating a new function ext4_getfsmap_meta_helper() which
gets called so that blocks before the first free block range in a
block group can get properly reported.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-09 10:32:42 +01:00
..
.kunitconfig ext4: add .kunitconfig fragment to enable ext4-specific tests 2021-02-11 23:16:30 -05:00
Kconfig fs: add CONFIG_BUFFER_HEAD 2023-08-02 09:13:09 -06:00
Makefile ext4: move ext4 crypto code to its own file crypto.c 2022-05-21 22:24:24 -04:00
acl.c ext4: convert to ctime accessor functions 2023-07-24 10:29:54 +02:00
acl.h ext4: apply umask if ACL support is disabled 2023-11-28 17:20:15 +00:00
balloc.c ext4: fix race in buffer_head read fault injection 2024-12-09 10:31:46 +01:00
bitmap.c ext4: remove useless conditional branch code 2023-04-19 23:39:08 -04:00
block_validity.c ext4: add correct group descriptors and reserved GDT blocks to system zone 2023-08-27 11:27:12 -04:00
crypto.c ext4: fix memory leaks in ext4_fname_{setup_filename,prepare_lookup} 2023-08-05 08:17:56 -04:00
dir.c ext4: correct encrypted dentry name hash when not casefolded 2024-10-10 11:57:46 +02:00
ext4.h ext4: fix race in buffer_head read fault injection 2024-12-09 10:31:46 +01:00
ext4_extents.h ext4: fix sparse warnings 2021-08-30 23:36:50 -04:00
ext4_jbd2.c Many ext4 and jbd2 cleanups and bug fixes for v6.6-rc1. 2023-08-31 15:18:15 -07:00
ext4_jbd2.h ext4: split ext4_journal_start trace for debug 2022-12-01 10:46:54 -05:00
extents.c ext4: fix race in buffer_head read fault injection 2024-12-09 10:31:46 +01:00
extents_status.c ext4: fix infinite loop when replaying fast_commit 2024-08-03 08:53:53 +02:00
extents_status.h ext4: make ext4_es_insert_extent() return void 2023-06-26 19:35:12 -04:00
fast_commit.c ext4: use handle to mark fc as ineligible in __track_dentry_update() 2024-10-10 11:57:49 +02:00
fast_commit.h ext4: add missing validation of fast-commit record lengths 2022-12-08 21:49:24 -05:00
file.c ext4: dax: fix overflowing extents beyond inode size when partially writing 2024-10-10 11:57:47 +02:00
fsmap.c ext4: fix FS_IOC_GETFSMAP handling 2024-12-09 10:32:42 +01:00
fsmap.h ext4: fsmap: fix the block/inode bitmap comment 2021-06-24 09:48:29 -04:00
fsync.c ext4: drop EXT4_MF_FS_ABORTED flag 2023-07-29 18:37:53 -04:00
hash.c ext4: remove redundant checks of s_encoding 2023-08-27 11:27:13 -04:00
ialloc.c ext4: fix race in buffer_head read fault injection 2024-12-09 10:31:46 +01:00
indirect.c ext4: fix race in buffer_head read fault injection 2024-12-09 10:31:46 +01:00
inline.c ext4: avoid OOB when system.data xattr changes underneath the filesystem 2024-10-04 16:29:21 +02:00
inode-test.c ext4: convert to ctime accessor functions 2023-07-24 10:29:54 +02:00
inode.c ext4: fix race in buffer_head read fault injection 2024-12-09 10:31:46 +01:00
ioctl.c Many ext4 and jbd2 cleanups and bug fixes for v6.6-rc1. 2023-08-31 15:18:15 -07:00
mballoc.c ext4: fix FS_IOC_GETFSMAP handling 2024-12-09 10:32:42 +01:00
mballoc.h ext4: fix FS_IOC_GETFSMAP handling 2024-12-09 10:32:42 +01:00
migrate.c ext4: fix i_data_sem unlock order in ext4_ind_migrate() 2024-10-10 11:57:39 +02:00
mmp.c ext4: fix race in buffer_head read fault injection 2024-12-09 10:31:46 +01:00
move_extent.c ext4: fix race in buffer_head read fault injection 2024-12-09 10:31:46 +01:00
namei.c ext4: no need to continue when the number of entries is 1 2024-10-10 11:57:46 +02:00
orphan.c ext4: remove trailing newline from ext4_msg() message 2022-12-08 21:49:23 -05:00
page-io.c ext4: remove calls to to set/clear the folio error flag 2024-12-09 10:31:45 +01:00
readpage.c ext4: remove calls to to set/clear the folio error flag 2024-12-09 10:31:45 +01:00
resize.c ext4: fix race in buffer_head read fault injection 2024-12-09 10:31:46 +01:00
super.c ext4: supress data-race warnings in ext4_free_inodes_{count,set}() 2024-12-09 10:32:42 +01:00
symlink.c fs: port ->getattr() to pass mnt_idmap 2023-01-19 09:24:25 +01:00
sysfs.c ext4: avoid ptr null pointer dereference 2024-07-18 13:21:25 +02:00
truncate.h ext4: Convert to use mapping->invalidate_lock 2021-07-13 14:29:00 +02:00
verity.c - Nick Piggin's "shoot lazy tlbs" series, to improve the peformance of 2023-04-27 19:42:02 -07:00
xattr.c ext4: nested locking for xattr inode 2024-10-17 15:24:16 +02:00
xattr.h ext4: remove EA inode entry from mbcache on inode eviction 2022-08-02 23:56:25 -04:00
xattr_hurd.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
xattr_security.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
xattr_trusted.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
xattr_user.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00