diff options
author | Theodore Ts'o <tytso@mit.edu> | 2023-08-08 16:08:52 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2023-08-08 16:08:52 -0400 |
commit | 441741fc2362b86e1643c3526d8d4c9b8e4b85fb (patch) | |
tree | c06fb1f7b052e709e960f690d9aab2f29433d561 | |
parent | b9df2bcb4d8a4d2f3985f3d2f9d85292b826cc8b (diff) | |
download | e2fsprogs-441741fc2362b86e1643c3526d8d4c9b8e4b85fb.tar.gz |
debian: update changelog and debian/patches with additional cherry-picked fixes
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r-- | debian/changelog | 4 | ||||
-rw-r--r-- | debian/patches/modify-dumpe2fs-to-report-free-block-range.patch | 63 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 67 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index f550e96b3..32322d7d0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,8 +5,10 @@ e2fsprogs (1.47.0-3) unstable; urgency=medium * Suppress "Feature orphan_present is set but orphan file is clean" nessage when running in preen mode. * Fix e2fsck's handling of an invalid symlink in an inline directory + * Fix how dumpe2fs reports free ranges for bigalloc file systems + * Update debian/changelog with missing information - -- Theodore Y. Ts'o <tytso@mit.edu> Thu, 15 Jun 2023 00:46:33 -0400 + -- Theodore Y. Ts'o <tytso@mit.edu> Tue, 08 Aug 2023 16:08:06 -0400 e2fsprogs (1.47.0-2) unstable; urgency=medium diff --git a/debian/patches/modify-dumpe2fs-to-report-free-block-range.patch b/debian/patches/modify-dumpe2fs-to-report-free-block-range.patch new file mode 100644 index 000000000..5f1b1bbec --- /dev/null +++ b/debian/patches/modify-dumpe2fs-to-report-free-block-range.patch @@ -0,0 +1,63 @@ +From: Eric Whitney <enwlinux@gmail.com> +Description: modify dumpe2fs to report free block ranges for bigalloc + . + dumpe2fs has never been modified to correctly report block ranges + corresponding to free clusters in block allocation bitmaps from bigalloc + file systems. Rather than reporting block ranges covering all the + blocks in free clusters found in a block bitmap, it either reports just + the first block number in a cluster for a single free cluster, or a + range beginning with the first block number in the first cluster in a + series of free clusters, and ending with the first block number in the + last cluster in that series. + . + This behavior causes xfstest shared/298 to fail when run on a bigalloc + file system with a 1k block size. The test uses dumpe2fs to collect + a list of the blocks freed when files are deleted from a file system. + When the test deletes a file containing blocks located after the first + block in the last cluster in a series of clusters, dumpe2fs does not + report those blocks as free per the test's expectations. + . + Modify dumpe2fs to report full block ranges for free clusters. At the + same time, fix a small bug causing unnecessary !in_use() retests while + iterating over a block bitmap. +Origin: upstream,https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/commit/?h=next&id=b31d5b582b4189a0ed27bced22276dd3f68c50a7 +--- + misc/dumpe2fs.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c +index 7c080ed9f..d2d57fb0a 100644 +--- a/misc/dumpe2fs.c ++++ b/misc/dumpe2fs.c +@@ -84,8 +84,7 @@ static void print_free(unsigned long group, char * bitmap, + unsigned long num, unsigned long offset, int ratio) + { + int p = 0; +- unsigned long i; +- unsigned long j; ++ unsigned long i, j; + + offset /= ratio; + offset += group * num; +@@ -95,13 +94,14 @@ static void print_free(unsigned long group, char * bitmap, + if (p) + printf (", "); + print_number((i + offset) * ratio); +- for (j = i; j < num && !in_use (bitmap, j); j++) ++ for (j = i + 1; j < num && !in_use(bitmap, j); j++) + ; +- if (--j != i) { ++ if (j != i + 1 || ratio > 1) { + fputc('-', stdout); +- print_number((j + offset) * ratio); +- i = j; ++ print_number(((j - 1 + offset) * ratio) + ++ ratio - 1); + } ++ i = j; + p = 1; + } + } +-- +2.31.0 + diff --git a/debian/patches/series b/debian/patches/series index 7bad3516c..f9f117323 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ suppress-orphan-file-is-clean-message-in-preen-mode.patch e2fsck-fix-handling-of-a-invalid-symlink-in-an-inline-dir.patch +modify-dumpe2fs-to-report-free-block-range.patch |