linux-stable/fs/ext4
Jan Kara 173b6e383d ext4: avoid trim error on fs with small groups
A user reported FITRIM ioctl failing for him on ext4 on some devices
without apparent reason.  After some debugging we've found out that
these devices (being LVM volumes) report rather large discard
granularity of 42MB and the filesystem had 1k blocksize and thus group
size of 8MB. Because ext4 FITRIM implementation puts discard
granularity into minlen, ext4_trim_fs() declared the trim request as
invalid. However just silently doing nothing seems to be a more
appropriate reaction to such combination of parameters since user did
not specify anything wrong.

CC: Lukas Czerner <lczerner@redhat.com>
Fixes: 5c2ed62fd4 ("ext4: Adjust minlen with discard_granularity in the FITRIM ioctl")
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20211112152202.26614-1-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2022-01-10 13:25:55 -05:00
..
.kunitconfig
acl.c ext4: use ext4_journal_start/stop for fast commit transactions 2021-12-23 18:13:25 -05:00
acl.h
balloc.c
bitmap.c
block_validity.c
dir.c ext4: fix potential infinite loop in ext4_dx_readdir() 2021-10-01 00:05:09 -04:00
ext4.h ext4: destroy ext4_fc_dentry_cachep kmemcache on module removal 2022-01-10 13:25:54 -05:00
ext4_extents.h
ext4_jbd2.c ext4: fix null-ptr-deref in '__ext4_journal_ensure_credits' 2022-01-10 13:25:55 -05:00
ext4_jbd2.h
extents.c ext4: fix fast commit may miss tracking range for FALLOC_FL_ZERO_RANGE 2022-01-10 13:25:44 -05:00
extents_status.c
extents_status.h
fast_commit.c ext4: destroy ext4_fc_dentry_cachep kmemcache on module removal 2022-01-10 13:25:54 -05:00
fast_commit.h ext4: simplify updating of fast commit stats 2021-12-23 18:13:25 -05:00
file.c ext4: use ext4_journal_start/stop for fast commit transactions 2021-12-23 18:13:25 -05:00
fsmap.c
fsmap.h
fsync.c
hash.c
ialloc.c
indirect.c
inline.c ext4: remove extent cache entries when truncating inline data 2021-09-09 10:52:05 -04:00
inode-test.c
inode.c ext4: fix an use-after-free issue about data=journal writeback mode 2022-01-10 13:25:55 -05:00
ioctl.c ext4: avoid trim error on fs with small groups 2022-01-10 13:25:55 -05:00
Kconfig
Makefile
mballoc.c ext4: avoid trim error on fs with small groups 2022-01-10 13:25:55 -05:00
mballoc.h
migrate.c
mmp.c
move_extent.c
namei.c ext4: fix boolreturn.cocci warnings in fs/ext4/name.c 2021-11-04 10:33:25 -04:00
orphan.c
page-io.c ext4: convert from atomic_t to refcount_t on ext4_io_end->count 2021-11-04 10:33:24 -04:00
readpage.c
resize.c
super.c ext4: make sure to reset inode lockdep class when quota enabling fails 2022-01-10 13:25:55 -05:00
symlink.c
sysfs.c ext4: replace snprintf in show functions with sysfs_emit 2022-01-10 13:25:55 -05:00
truncate.h
verity.c
xattr.c
xattr.h
xattr_hurd.c
xattr_security.c
xattr_trusted.c
xattr_user.c