e2fsprogs/misc
Theodore Ts'o 6568ba325e mke2fs: only try discarding a single block to test if discard works
Commit d2bfdc7ff1 ("Use punch hole as "discard" on regular files")
added a test to see if the storage device actually supports discard.
The intent was to try discarding the first block but since
io_channel_discard() interprets the offset and count arguments in
blocks, and not bytes, mke2fs was actually discarding the first 16
megabytes (when the block size is 4k).  This is normally not a
problem, since most file systems are larger than that, and requests to
discard beyond the end of the block device are ignored.

However, when creating a small file system as part of a image
containing multiple partitions, the initial test discard can end up
discarding data beyond the file system being created.

Addresses-Debian-Bug: #989630
Reported-by: Josh Triplett <josh@joshtriplett.org>
Fixes: d2bfdc7ff1 ("Use punch hole as "discard" on regular files")
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2021-07-18 11:05:20 -04:00
..
Android.bp AOSP: tune2fs/resize2fs: make vendor_ramdisk_available. 2021-01-28 00:04:14 -05:00
badblocks.8.in Remove spaces at the end of man pages 2017-08-04 01:51:50 -04:00
badblocks.c badblocks: add error checking for command-line arguments for -b and -c 2021-02-12 11:53:23 -05:00
base_device.c Make sure test progams free all allocated memory 2016-11-11 23:15:56 -05:00
base_device.tst ChangeLog, Makefile.in, base_device.c, base_device.tst, fsck.c, fsck.h: 2000-12-03 06:33:56 +00:00
blkid.8.in blkid: On the man page, show option arguments in the descriptions. 2008-08-14 13:29:50 -04:00
blkid.c AOSP: Ignore quotes in safe_print(). 2018-08-18 15:59:58 -04:00
chattr.1.in chattr/lsattr: expose FS_NOCOMP_FL (aka EXT2_NOCOMPR_FL) 2021-02-25 12:34:40 -05:00
chattr.c Remove superfluous break statements 2021-02-25 12:39:01 -05:00
check_fuzzer.c Add a program to test images provided by UBSAN fuzzing reports 2019-11-22 23:27:47 -05:00
create_inode.c misc: fix potential segmentation fault problem in scandir() 2021-07-15 23:43:37 -04:00
create_inode.h tests, mke2fs: add option to suppress xattr copying to fix f_extent_htree 2018-06-26 15:21:28 -04:00
dumpe2fs.8.in misc: add e2mmpstatus utility via dumpe2fs 2018-06-22 18:22:37 -04:00
dumpe2fs.c Fix clang warnings on architectures with a 64-bit long 2021-02-11 10:55:21 -05:00
e2freefrag.8.in misc: fix groff formatting nits in man pages 2018-12-11 22:31:14 -05:00
e2freefrag.c Fix clang warnings on architectures with a 64-bit long 2021-02-11 10:55:21 -05:00
e2freefrag.h e2freefrag: Improve output to include be more like xfs_db's freesp -s 2009-07-24 18:33:46 -04:00
e2fuzz.c Merge branch 'maint' into next 2021-01-23 01:05:43 -05:00
e2fuzz.sh e2fuzz: fuzz harder 2015-04-20 21:47:18 -04:00
e2image.8.in e2image: add OPTIONS section to man page 2021-04-02 16:02:01 -04:00
e2image.c Add checks for fs->blocksize == 0 which could cause some crashes 2021-02-23 16:02:42 -05:00
e2initrd_helper.c Move the check_plausibility() function from misc to lib/support 2015-07-12 22:01:17 -04:00
e2label.8.in Remove spaces at the end of man pages 2017-08-04 01:51:50 -04:00
e2label.c mmp: abstract out repeated 'sizeof(buf), buf' usage 2020-01-24 23:06:58 -05:00
e2mmpstatus.8.in misc: fix groff formatting nits in man pages 2018-12-11 22:31:14 -05:00
e2undo.8.in Add missing information to various man pages and usage texts 2017-12-21 11:11:10 -05:00
e2undo.c Fix clang warnings on architectures with a 64-bit long 2021-02-11 10:55:21 -05:00
e4crypt.8.in e4crypt: if salt is explicitly provided to add_key, then use it 2020-10-01 16:51:46 -04:00
e4crypt.c e4crypt: if salt is explicitly provided to add_key, then use it 2020-10-01 16:51:46 -04:00
e4defrag.8.in e4defrag: fix typo in man page 2018-05-27 16:09:28 -04:00
e4defrag.c misc: replace remaining loff_t with ext2_loff_t 2021-02-22 21:53:53 -05:00
ext4.5.in ext4.5: document the stable_inodes feature 2020-04-10 11:23:12 -04:00
filefrag.8.in filefrag: minor usability improvements 2021-04-02 16:04:38 -04:00
filefrag.c filefrag: minor usability improvements 2021-04-02 16:04:38 -04:00
findfs.8.in Remove spaces at the end of man pages 2017-08-04 01:51:50 -04:00
findsuper.c misc: replace remaining loff_t with ext2_loff_t 2021-02-22 21:53:53 -05:00
fsck.8.in Remove spaces at the end of man pages 2017-08-04 01:51:50 -04:00
fsck.c Fix gcc and clang warnings 2018-06-23 23:00:50 -04:00
fsck.h Fix typos in code comments and developer docs 2017-10-15 23:00:11 -04:00
fsmap.h e2freefrag: use GETFSMAP on mounted filesystems 2017-05-29 22:29:15 -04:00
fuse2fs.1.in fuse2fs: add a norecovery option which suppresses journal replay 2019-08-18 20:25:53 -04:00
fuse2fs.c Enable threaded support for e2fsprogs' applications. 2021-01-21 10:50:40 -05:00
ismounted.c misc: cleanup unused variables on MacOS 2012-12-29 17:28:37 -05:00
logsave.8.in Remove spaces at the end of man pages 2017-08-04 01:51:50 -04:00
logsave.c Fix typos in code comments and developer docs 2017-10-15 23:00:11 -04:00
lsattr.1.in Add missing information to various man pages and usage texts 2017-12-21 11:11:10 -05:00
lsattr.c Merge branch 'maint' into next 2016-03-06 20:37:49 -05:00
Makefile.in misc/Makefile.in: add rules to build static versions of lsattr and chattr 2021-02-23 22:03:59 -05:00
mk_hugefiles.c Fix clang warnings on architectures with a 64-bit long 2021-02-11 10:55:21 -05:00
mke2fs-hurd.conf Add "big" and "huge" types to mke2fs.conf 2011-10-03 23:46:17 -04:00
mke2fs.8.in Merge branch 'maint' into next 2021-01-29 01:13:18 -05:00
mke2fs.c mke2fs: only try discarding a single block to test if discard works 2021-07-18 11:05:20 -04:00
mke2fs.conf.5.in Rename the feature "fname_encoding" to be "casefold". 2019-05-03 13:16:29 -04:00
mke2fs.conf.in mke2fs.conf: remove options.fname_encoding 2020-03-09 12:36:10 -04:00
mke2fs.h mke2fs: add support to align hugefiles relative to beginning of the disk 2014-07-09 10:42:13 -04:00
mklost+found.8.in Remove spaces at the end of man pages 2017-08-04 01:51:50 -04:00
mklost+found.c Fix gcc and clang warnings 2018-06-23 23:00:50 -04:00
partinfo.c partinfo: fix some build errors 2016-10-25 13:28:13 -04:00
profile-to-c.awk mke2fs: Escape double quotes when parsing mke2fs.conf 2021-01-19 23:56:20 -05:00
tune2fs.8.in tune2fs: teach tune2fs to use a random value for "-c random" 2021-02-14 10:37:00 -05:00
tune2fs.c tune2fs: update overhead when toggling journal feature 2021-07-06 19:55:09 -04:00
tune2fs.h Fix typos in code comments and developer docs 2017-10-15 23:00:11 -04:00
util.c Make userspace tools number of fast commits blocks aware 2021-01-21 10:57:22 -05:00
util.h Make userspace tools number of fast commits blocks aware 2021-01-21 10:57:22 -05:00
uuidd.8.in Fix the pathname of /var/lib/uuidd/uuidd.pid in uuidd man page. 2008-01-19 18:13:14 -05:00
uuidd.c Move the check_plausibility() function from misc to lib/support 2015-07-12 22:01:17 -04:00
uuidd.rc Add uuidd daemon to prevent duplicate time-based UUID's 2007-12-16 17:28:46 -05:00
uuidgen.1.in Remove spaces at the end of man pages 2017-08-04 01:51:50 -04:00
uuidgen.c Move the check_plausibility() function from misc to lib/support 2015-07-12 22:01:17 -04:00