Compare commits

..

No commits in common. "SLE_12" and "factory" have entirely different histories.

29 changed files with 5284 additions and 2264 deletions

View File

@ -1,2 +0,0 @@
[lfs]
url = http://gitea.opensuse.org:9999/gitlfs

View File

@ -1,77 +0,0 @@
From 457e49981e7881d22f5621a37c7097535a863988 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Sun, 3 Aug 2014 12:22:27 -0400
Subject: [PATCH 1/2] Revert "mke2fs: prevent creation of unmountable ext4 with
large flex_bg count"
This reverts commit d988201ef9cb6f7b521e544061976ab4270a3f89.
The problem with this commit is that causes common small file system
configurations to fail. For example:
mke2fs -O flex_bg -b 4096 -I 1024 -F /tmp/tt 79106
mke2fs 1.42.11 (09-Jul-2014)
/tmp/tt: Invalid argument passed to ext2 library while setting
up superblock
This check in ext2fs_initialize() was added to prevent the metadata
from being allocated beyond the end of the filesystem, but it is
also causing a wide range of failures for small filesystems.
We'll address this in a different way, by using a smarter algorithm
for deciding the layout of metadata blocks for the last flex block
group.
Reported-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
lib/ext2fs/initialize.c | 24 ------------------------
1 file changed, 24 deletions(-)
diff --git a/lib/ext2fs/initialize.c b/lib/ext2fs/initialize.c
index de358fd8e72d..36c94a9a4d86 100644
--- a/lib/ext2fs/initialize.c
+++ b/lib/ext2fs/initialize.c
@@ -91,10 +91,8 @@ errcode_t ext2fs_initialize(const char *name, int flags,
unsigned int rem;
unsigned int overhead = 0;
unsigned int ipg;
- unsigned int flexbg_size;
dgrp_t i;
blk64_t free_blocks;
- blk64_t flexbg_overhead;
blk_t numblocks;
int rsv_gdt;
int csum_flag;
@@ -420,28 +418,6 @@ ipg_retry:
goto retry;
}
- /*
- * Calculate the flex_bg related metadata blocks count.
- * It includes the boot block, the super block,
- * the block group descriptors, the reserved gdt blocks,
- * the block bitmaps, the inode bitmaps and the inode tables.
- * This is a simple check, so that the backup superblock and
- * other feature related blocks are not considered.
- */
- flexbg_size = 1 << fs->super->s_log_groups_per_flex;
- flexbg_overhead = super->s_first_data_block + 1 +
- fs->desc_blocks + super->s_reserved_gdt_blocks +
- (__u64)flexbg_size * (2 + fs->inode_blocks_per_group);
-
- /*
- * Disallow creating ext4 which breaks flex_bg metadata layout
- * obviously.
- */
- if (flexbg_overhead > ext2fs_blocks_count(fs->super)) {
- retval = EXT2_ET_INVALID_ARGUMENT;
- goto cleanup;
- }
-
/*
* At this point we know how big the filesystem will be. So
* we can do any and all allocations that depend on the block
--
2.16.4

4
_multibuild Normal file
View File

@ -0,0 +1,4 @@
<multibuild>
<package>fuse2fs</package>
</multibuild>

View File

@ -1,55 +0,0 @@
From 8dd73c149f418238f19791f9d666089ef9734dff Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Thu, 19 Dec 2019 19:37:34 -0500
Subject: [PATCH] e2fsck: abort if there is a corrupted directory block
when rehashing
References: bsc#1160571 CVE-2019-5188
In e2fsck pass 3a, when we are rehashing directories, at least in
theory, all of the directories should have had corruptions with
respect to directory entry structure fixed. However, it's possible
(for example, if the user declined a fix) that we can reach this stage
of processing with a corrupted directory entries.
So check for that case and don't try to process a corrupted directory
block so we don't run into trouble in mutate_name() if there is a
zero-length file name.
Addresses: TALOS-2019-0973
Addresses: CVE-2019-5188
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Acked-by: Jan Kara <jack@suse.cz>
---
e2fsck/rehash.c | 9 +++++++++
1 file changed, 9 insertions(+)
Index: e2fsprogs-1.42.11/e2fsck/rehash.c
===================================================================
--- e2fsprogs-1.42.11.orig/e2fsck/rehash.c
+++ e2fsprogs-1.42.11/e2fsck/rehash.c
@@ -129,6 +129,10 @@ static int fill_dir_block(ext2_filsys fs
dir_offset += rec_len;
if (dirent->inode == 0)
continue;
+ if ((dirent->name_len&0xFF) == 0) {
+ fd->err = EXT2_ET_DIR_CORRUPTED;
+ return BLOCK_ABORT;
+ }
if (!fd->compress && ((dirent->name_len&0xFF) == 1) &&
(dirent->name[0] == '.'))
continue;
@@ -365,8 +369,13 @@ static int duplicate_search_and_fix(e2fs
fixed++;
continue;
}
- memcpy(new_name, ent->dir->name, ent->dir->name_len & 0xFF);
new_len = ent->dir->name_len;
+ if (new_len & 0xFF == 0) {
+ /* should never happen */
+ ext2fs_unmark_valid(fs);
+ continue;
+ }
+ memcpy(new_name, ent->dir->name, new_len & 0xFF);
mutate_name(new_name, &new_len);
for (j=0; j < fd->num_array; j++) {
if ((i==j) ||

View File

@ -1,355 +0,0 @@
From 6d0b48896247dc70b16482a8ff4123d570285a2a Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Sun, 5 May 2019 16:43:33 -0400
Subject: [PATCH] e2fsck: check and fix tails of all bitmap blocks
References: bsc#1128383
Currently, e2fsck effectively checks only tail of the last inode and
block bitmap in the filesystem. Thus if some previous bitmap has unset
bits it goes unnoticed. Mostly these tail bits in the bitmap are
ignored; however, if blocks_per_group are smaller than 8*blocksize,
the multi-block allocator in the kernel can get confused when the tail
bits are unset and return bogus free extent.
Add support to libext2fs to check these bitmap tails when loading
bitmaps (as that's about the only place which has access to the bitmap
tail bits) and make e2fsck use this functionality to detect buggy bitmap
tails and fix them (by rewriting the bitmaps).
Reported-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
e2fsck/pass5.c | 40 ++++++++++++++++---
lib/ext2fs/ext2fs.h | 2 +
lib/ext2fs/rw_bitmaps.c | 26 +++++++++++-
tests/f_bitmaps/expect.1 | 2 +
tests/f_dup/expect.1 | 2 +
tests/f_dup2/expect.1 | 2 +
tests/f_dup3/expect.1 | 2 +
tests/f_end-bitmap/expect.1 | 2 +
tests/f_illbbitmap/expect.1 | 2 +
tests/f_illibitmap/expect.1 | 2 +
tests/f_illitable_flexbg/expect.1 | 2 +
tests/f_lpf/expect.1 | 2 +
tests/f_overfsblks/expect.1 | 2 +
tests/f_super_bad_csum/expect.1 | 4 +-
tests/j_corrupt_ext_jnl_sb_csum/expect | 2 +
tests/j_ext_long_trans/expect | 2 +
tests/j_long_trans/expect | 2 +
tests/j_long_trans_mcsum_32bit/expect | 2 +
tests/j_long_trans_mcsum_64bit/expect | 2 +
tests/j_recover_csum2_32bit/expect.1 | 2 +
tests/j_recover_csum2_64bit/expect.1 | 2 +
tests/j_short_trans/expect | 2 +
tests/j_short_trans_64bit/expect | 2 +
tests/j_short_trans_mcsum_64bit/expect | 2 +
tests/j_short_trans_old_csum/expect | 2 +
tests/j_short_trans_open_recover/expect | 2 +
tests/j_short_trans_recover/expect | 2 +
.../j_short_trans_recover_mcsum_64bit/expect | 2 +
tests/t_replay_and_set/expect | 2 +
29 files changed, 113 insertions(+), 9 deletions(-)
Index: e2fsprogs-1.42.11/e2fsck/pass5.c
===================================================================
--- e2fsprogs-1.42.11.orig/e2fsck/pass5.c
+++ e2fsprogs-1.42.11/e2fsck/pass5.c
@@ -731,6 +731,7 @@ static void check_inode_end(e2fsck_t ctx
ext2_filsys fs = ctx->fs;
ext2_ino_t end, save_inodes_count, i;
struct problem_context pctx;
+ int asked = 0;
clear_problem_context(&pctx);
@@ -744,11 +745,12 @@ static void check_inode_end(e2fsck_t ctx
return;
}
if (save_inodes_count == end)
- return;
+ goto check_intra_bg_tail;
/* protect loop from wrap-around if end is maxed */
for (i = save_inodes_count + 1; i <= end && i > save_inodes_count; i++) {
if (!ext2fs_test_inode_bitmap(fs->inode_map, i)) {
+ asked = 1;
if (fix_problem(ctx, PR_5_INODE_BMAP_PADDING, &pctx)) {
for (; i <= end; i++)
ext2fs_mark_inode_bitmap(fs->inode_map,
@@ -768,6 +770,20 @@ static void check_inode_end(e2fsck_t ctx
ctx->flags |= E2F_FLAG_ABORT; /* fatal */
return;
}
+ /*
+ * If the number of inodes per block group != blocksize, we
+ * can also have a potential problem with the tail bits in
+ * each individual inode bitmap block. If there is a problem,
+ * it would have been noticed when the bitmap was loaded. And
+ * fixing this is easy; all we need to do force the bitmap to
+ * be written back to disk.
+ */
+check_intra_bg_tail:
+ if (!asked && fs->flags & EXT2_FLAG_IBITMAP_TAIL_PROBLEM)
+ if (fix_problem(ctx, PR_5_INODE_BMAP_PADDING, &pctx))
+ ext2fs_mark_ib_dirty(fs);
+ else
+ ext2fs_unmark_valid(fs);
}
static void check_block_end(e2fsck_t ctx)
@@ -775,6 +791,7 @@ static void check_block_end(e2fsck_t ctx
ext2_filsys fs = ctx->fs;
blk64_t end, save_blocks_count, i;
struct problem_context pctx;
+ int asked = 0;
clear_problem_context(&pctx);
@@ -789,12 +806,13 @@ static void check_block_end(e2fsck_t ctx
return;
}
if (save_blocks_count == end)
- return;
+ goto check_intra_bg_tail;
/* Protect loop from wrap-around if end is maxed */
for (i = save_blocks_count + 1; i <= end && i > save_blocks_count; i++) {
if (!ext2fs_test_block_bitmap2(fs->block_map,
EXT2FS_C2B(fs, i))) {
+ asked = 1;
if (fix_problem(ctx, PR_5_BLOCK_BMAP_PADDING, &pctx)) {
for (; i <= end; i++)
ext2fs_mark_block_bitmap2(fs->block_map,
@@ -814,7 +832,19 @@ static void check_block_end(e2fsck_t ctx
ctx->flags |= E2F_FLAG_ABORT; /* fatal */
return;
}
+ /*
+ * If the number of blocks per block group != blocksize, we
+ * can also have a potential problem with the tail bits in
+ * each individual block bitmap block. If there is a problem,
+ * it would have been noticed when the bitmap was loaded. And
+ * fixing this is easy; all we need to do force the bitmap to
+ * be written back to disk.
+ */
+check_intra_bg_tail:
+ if (!asked && fs->flags & EXT2_FLAG_BBITMAP_TAIL_PROBLEM) {
+ if (fix_problem(ctx, PR_5_BLOCK_BMAP_PADDING, &pctx))
+ ext2fs_mark_bb_dirty(fs);
+ else
+ ext2fs_unmark_valid(fs);
+ }
}
-
-
-
Index: e2fsprogs-1.42.11/lib/ext2fs/ext2fs.h
===================================================================
--- e2fsprogs-1.42.11.orig/lib/ext2fs/ext2fs.h
+++ e2fsprogs-1.42.11/lib/ext2fs/ext2fs.h
@@ -192,6 +192,8 @@ typedef struct ext2_file *ext2_file_t;
#define EXT2_FLAG_PRINT_PROGRESS 0x40000
#define EXT2_FLAG_DIRECT_IO 0x80000
#define EXT2_FLAG_SKIP_MMP 0x100000
+#define EXT2_FLAG_BBITMAP_TAIL_PROBLEM 0x1000000
+#define EXT2_FLAG_IBITMAP_TAIL_PROBLEM 0x2000000
/*
* Special flag in the ext2 inode i_flag field that means that this is
Index: e2fsprogs-1.42.11/lib/ext2fs/rw_bitmaps.c
===================================================================
--- e2fsprogs-1.42.11.orig/lib/ext2fs/rw_bitmaps.c
+++ e2fsprogs-1.42.11/lib/ext2fs/rw_bitmaps.c
@@ -182,6 +182,16 @@ static errcode_t mark_uninit_bg_group_bl
return 0;
}
+static int bitmap_tail_verify(unsigned char *bitmap, int first, int last)
+{
+ int i;
+
+ for (i = first; i <= last; i++)
+ if (bitmap[i] != 0xff)
+ return 0;
+ return 1;
+}
+
static errcode_t read_bitmaps(ext2_filsys fs, int do_inode, int do_block)
{
dgrp_t i;
@@ -190,6 +200,7 @@ static errcode_t read_bitmaps(ext2_filsy
errcode_t retval;
int block_nbytes = EXT2_CLUSTERS_PER_GROUP(fs->super) / 8;
int inode_nbytes = EXT2_INODES_PER_GROUP(fs->super) / 8;
+ int tail_flags = 0;
int csum_flag = 0;
unsigned int cnt;
blk64_t blk;
@@ -297,6 +308,9 @@ static errcode_t read_bitmaps(ext2_filsy
retval = EXT2_ET_BLOCK_BITMAP_READ;
goto cleanup;
}
+ if (!bitmap_tail_verify(block_bitmap,
+ block_nbytes, fs->blocksize - 1))
+ tail_flags |= EXT2_FLAG_BBITMAP_TAIL_PROBLEM;
} else
memset(block_bitmap, 0, block_nbytes);
cnt = block_nbytes << 3;
@@ -319,6 +333,9 @@ static errcode_t read_bitmaps(ext2_filsy
retval = EXT2_ET_INODE_BITMAP_READ;
goto cleanup;
}
+ if (!bitmap_tail_verify(inode_bitmap,
+ inode_nbytes, fs->blocksize - 1))
+ tail_flags |= EXT2_FLAG_IBITMAP_TAIL_PROBLEM;
} else
memset(inode_bitmap, 0, inode_nbytes);
cnt = inode_nbytes << 3;
@@ -338,10 +355,15 @@ static errcode_t read_bitmaps(ext2_filsy
}
success_cleanup:
- if (inode_bitmap)
+ if (inode_bitmap) {
ext2fs_free_mem(&inode_bitmap);
- if (block_bitmap)
+ fs->flags &= ~EXT2_FLAG_IBITMAP_TAIL_PROBLEM;
+ }
+ if (block_bitmap) {
ext2fs_free_mem(&block_bitmap);
+ fs->flags &= ~EXT2_FLAG_BBITMAP_TAIL_PROBLEM;
+ }
+ fs->flags |= tail_flags;
return 0;
cleanup:
Index: e2fsprogs-1.42.11/tests/f_bitmaps/expect.1
===================================================================
--- e2fsprogs-1.42.11.orig/tests/f_bitmaps/expect.1
+++ e2fsprogs-1.42.11/tests/f_bitmaps/expect.1
@@ -11,6 +11,8 @@ Fix? yes
Inode bitmap differences: +11 -15
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/32 files (9.1% non-contiguous), 22/100 blocks
Index: e2fsprogs-1.42.11/tests/f_dup/expect.1
===================================================================
--- e2fsprogs-1.42.11.orig/tests/f_dup/expect.1
+++ e2fsprogs-1.42.11/tests/f_dup/expect.1
@@ -30,6 +30,8 @@ Fix? yes
Free blocks count wrong (62, counted=60).
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
Padding at end of block bitmap is not set. Fix? yes
Index: e2fsprogs-1.42.11/tests/f_dup2/expect.1
===================================================================
--- e2fsprogs-1.42.11.orig/tests/f_dup2/expect.1
+++ e2fsprogs-1.42.11/tests/f_dup2/expect.1
@@ -37,6 +37,8 @@ Fix? yes
Free blocks count wrong (26, counted=22).
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
Padding at end of block bitmap is not set. Fix? yes
Index: e2fsprogs-1.42.11/tests/f_dup3/expect.1
===================================================================
--- e2fsprogs-1.42.11.orig/tests/f_dup3/expect.1
+++ e2fsprogs-1.42.11/tests/f_dup3/expect.1
@@ -39,6 +39,8 @@ Fix? yes
Free blocks count wrong (20, counted=19).
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 16/16 files (25.0% non-contiguous), 81/100 blocks
Index: e2fsprogs-1.42.11/tests/f_end-bitmap/expect.1
===================================================================
--- e2fsprogs-1.42.11.orig/tests/f_end-bitmap/expect.1
+++ e2fsprogs-1.42.11/tests/f_end-bitmap/expect.1
@@ -8,6 +8,8 @@ Pass 5: Checking group summary informati
Free blocks count wrong for group #0 (44, counted=63).
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
Padding at end of block bitmap is not set. Fix? yes
Index: e2fsprogs-1.42.11/tests/f_illbbitmap/expect.1
===================================================================
--- e2fsprogs-1.42.11.orig/tests/f_illbbitmap/expect.1
+++ e2fsprogs-1.42.11/tests/f_illbbitmap/expect.1
@@ -22,6 +22,8 @@ Fix? yes
Inode bitmap differences: -(12--21)
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks
Index: e2fsprogs-1.42.11/tests/f_illibitmap/expect.1
===================================================================
--- e2fsprogs-1.42.11.orig/tests/f_illibitmap/expect.1
+++ e2fsprogs-1.42.11/tests/f_illibitmap/expect.1
@@ -19,6 +19,8 @@ Pass 5: Checking group summary informati
Inode bitmap differences: +(1--11)
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks
Index: e2fsprogs-1.42.11/tests/f_illitable_flexbg/expect.1
===================================================================
--- e2fsprogs-1.42.11.orig/tests/f_illitable_flexbg/expect.1
+++ e2fsprogs-1.42.11/tests/f_illitable_flexbg/expect.1
@@ -18,6 +18,8 @@ Pass 5: Checking group summary informati
Inode bitmap differences: -(65--128)
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 12/256 files (0.0% non-contiguous), 31163/32768 blocks
Index: e2fsprogs-1.42.11/tests/f_lpf/expect.1
===================================================================
--- e2fsprogs-1.42.11.orig/tests/f_lpf/expect.1
+++ e2fsprogs-1.42.11/tests/f_lpf/expect.1
@@ -42,6 +42,8 @@ Fix? yes
Free inodes count wrong (1, counted=0).
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 16/16 files (12.5% non-contiguous), 67/100 blocks
Index: e2fsprogs-1.42.11/tests/f_overfsblks/expect.1
===================================================================
--- e2fsprogs-1.42.11.orig/tests/f_overfsblks/expect.1
+++ e2fsprogs-1.42.11/tests/f_overfsblks/expect.1
@@ -13,6 +13,8 @@ Pass 5: Checking group summary informati
Inode bitmap differences: -(12--21)
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks

View File

@ -1,45 +0,0 @@
From 71ba13755337e19c9a826dfc874562a36e1b24d3 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Thu, 19 Dec 2019 19:45:06 -0500
Subject: [PATCH] e2fsck: don't try to rehash a deleted directory
References: bsc#1160571 CVE-2019-5188
If directory has been deleted in pass1[bcd] processing, then we
shouldn't try to rehash the directory in pass 3a when we try to
rehash/reoptimize directories.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Acked-by: Jan Kara <jack@suse.cz>
---
e2fsck/pass1b.c | 4 ++++
e2fsck/rehash.c | 2 ++
2 files changed, 6 insertions(+)
Index: e2fsprogs-1.42.11/e2fsck/pass1b.c
===================================================================
--- e2fsprogs-1.42.11.orig/e2fsck/pass1b.c
+++ e2fsprogs-1.42.11/e2fsck/pass1b.c
@@ -643,6 +643,10 @@ static void delete_file(e2fsck_t ctx, ex
fix_problem(ctx, PR_1B_BLOCK_ITERATE, &pctx);
if (ctx->inode_bad_map)
ext2fs_unmark_inode_bitmap2(ctx->inode_bad_map, ino);
+ if (ctx->inode_reg_map)
+ ext2fs_unmark_inode_bitmap2(ctx->inode_reg_map, ino);
+ ext2fs_unmark_inode_bitmap2(ctx->inode_dir_map, ino);
+ ext2fs_unmark_inode_bitmap2(ctx->inode_used_map, ino);
ext2fs_inode_alloc_stats2(fs, ino, -1, LINUX_S_ISDIR(dp->inode.i_mode));
quota_data_sub(ctx->qctx, &dp->inode, ino,
pb.dup_blocks * fs->blocksize);
Index: e2fsprogs-1.42.11/e2fsck/rehash.c
===================================================================
--- e2fsprogs-1.42.11.orig/e2fsck/rehash.c
+++ e2fsprogs-1.42.11/e2fsck/rehash.c
@@ -882,6 +882,8 @@ void e2fsck_rehash_directories(e2fsck_t
}
if (ino == ctx->lost_and_found)
continue;
+ if (!ext2fs_test_inode_bitmap2(ctx->inode_dir_map, ino))
+ continue;
pctx.dir = ino;
if (first) {
fix_problem(ctx, PR_3A_PASS_HEADER, &pctx);

View File

@ -1,47 +0,0 @@
From ebdf895b43a1ce499e4d2556a201e2a753fc422f Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Wed, 8 Oct 2014 11:18:41 -0400
Subject: [PATCH] e2fsck: fix free pointer dereferences
References: bnc#912229
Commit 47fee2ef6a23a introduces some free pointer dereference bugs by
not clearing ctx->fs after calling ext2fs_close_free().
Reported-by: Matthias Andree <mandree@FreeBSD.org>
Cc: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
e2fsck/unix.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: e2fsprogs-1.42.11/e2fsck/unix.c
===================================================================
--- e2fsprogs-1.42.11.orig/e2fsck/unix.c
+++ e2fsprogs-1.42.11/e2fsck/unix.c
@@ -459,7 +459,7 @@ static void check_if_skip(e2fsck_t ctx)
}
log_out(ctx, "\n");
skip:
- ext2fs_close_free(&fs);
+ ext2fs_close_free(&ctx->fs);
e2fsck_free_context(ctx);
exit(FSCK_OK);
}
@@ -1465,7 +1465,7 @@ failure:
/*
* Restart in order to reopen fs but this time start mmp.
*/
- ext2fs_close_free(&fs);
+ ext2fs_close_free(&ctx->fs);
flags &= ~EXT2_FLAG_SKIP_MMP;
goto restart;
}
@@ -1695,7 +1695,7 @@ no_journal:
_("while resetting context"));
fatal_error(ctx, 0);
}
- ext2fs_close_free(&fs);
+ ext2fs_close_free(&ctx->fs);
goto restart;
}
if (run_result & E2F_FLAG_CANCEL) {

View File

@ -1,34 +0,0 @@
From a82d88ea99d3c5c21bf538b886da0482bf143fd5 Mon Sep 17 00:00:00 2001
From: "Darrick J. Wong" <darrick.wong@oracle.com>
Date: Thu, 24 Jul 2014 21:03:54 -0400
Subject: [PATCH] e2fsck: free ctx->fs, not fs, at the end of fsck
References: bnc#912229
When we call ext2fs_close_free at the end of main(), we need to supply
the address of ctx->fs, because the subsequent e2fsck_free_context
call will try to access ctx->fs (which is now set to a freed block) to
see if it should free the directory block list. This is clearly not
desirable, so fix the problem.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
e2fsck/unix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index 8d1bdf3e03cb..fc05bdeec257 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -1774,7 +1774,7 @@ no_journal:
io_channel_flush(ctx->fs->io);
print_resource_track(ctx, NULL, &ctx->global_rtrack, ctx->fs->io);
- ext2fs_close_free(&fs);
+ ext2fs_close_free(&ctx->fs);
free(ctx->journal_name);
e2fsck_free_context(ctx);
--
2.1.2

View File

@ -1,188 +0,0 @@
Index: e2fsck/Makefile.in
===================================================================
--- e2fsck/Makefile.in.orig
+++ e2fsck/Makefile.in
@@ -61,7 +61,7 @@ OBJS= crc32.o dict.o unix.o e2fsck.o sup
pass3.o pass4.o pass5.o journal.o badblocks.o util.o dirinfo.o \
dx_dirinfo.o ehandler.o problem.o message.o quota.o recovery.o \
region.o revoke.o ea_refcount.o rehash.o profile.o prof_err.o \
- logfile.o sigcatcher.o $(MTRACE_OBJ)
+ logfile.o sigcatcher.o splash.o $(MTRACE_OBJ)
PROFILED_OBJS= profiled/dict.o profiled/unix.o profiled/e2fsck.o \
profiled/super.o profiled/pass1.o profiled/pass1b.o \
@@ -100,6 +100,7 @@ SRCS= $(srcdir)/e2fsck.c \
$(srcdir)/rehash.c \
$(srcdir)/region.c \
$(srcdir)/profile.c \
+ $(srcdir)/splash.c \
$(srcdir)/sigcatcher.c \
$(srcdir)/logfile.c \
prof_err.c \
@@ -519,6 +520,7 @@ region.o: $(srcdir)/region.c $(top_build
$(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/quotaio.h \
$(top_srcdir)/lib/quota/dqblk_v2.h $(top_srcdir)/lib/quota/quotaio_tree.h \
$(top_srcdir)/lib/../e2fsck/dict.h
+splash.o: $(srcdir)/splash.c $(srcdir)/splash.h
profile.o: $(srcdir)/profile.c $(top_builddir)/lib/config.h \
$(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/et/com_err.h \
$(srcdir)/profile.h prof_err.h
Index: e2fsck/splash.c
===================================================================
--- /dev/null
+++ e2fsck/splash.c
@@ -0,0 +1,100 @@
+/*
+ * add support for switching the splash screen on boot
+ */
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+#include "splash.h"
+
+static int verbose = 0;
+
+/* nop implementation
+ */
+static void nop(void)
+{
+}
+
+static struct splash_ops nop_ops = {
+ .splash_on = nop,
+ .splash_off = nop
+};
+
+/*
+ * bootsplash implementation
+ */
+#define BOOTSPLASH_CTL "/proc/splash"
+
+static int bootsplash_exists(void)
+{
+ struct stat sb;
+
+ if (stat(BOOTSPLASH_CTL, &sb) == -1)
+ return 0;
+
+ if (S_ISREG(sb.st_mode))
+ return 1;
+
+ return 0;
+}
+
+/* write msg to splash control */
+static void bootsplash_msg(const char *msg, size_t size)
+{
+ int fd;
+ size_t written;
+
+ fd = open(BOOTSPLASH_CTL, O_WRONLY);
+ if (fd == -1) {
+ if (verbose)
+ printf("cannot open %s\n", BOOTSPLASH_CTL);
+ return;
+ }
+
+ written = write(fd, msg, size);
+ if (written != size) {
+ if (verbose)
+ printf("size = %zd, written = %zd\n", size, written);
+ }
+
+ close(fd);
+}
+
+static void bootsplash_on(void)
+{
+ if (verbose)
+ printf("setting bootsplash silent\n");
+ bootsplash_msg("silent\n", 7);
+}
+
+static void bootsplash_off(void)
+{
+ if (verbose)
+ printf("setting bootsplash verbose\n");
+ bootsplash_msg("verbose\n", 8);
+}
+
+static struct splash_ops bootsplash_ops = {
+ .splash_on = bootsplash_on,
+ .splash_off = bootsplash_off
+};
+
+/*
+ * Initialisation
+ */
+void splash_init(struct splash_ops **ops)
+{
+ if (bootsplash_exists())
+ *ops = &bootsplash_ops;
+ else
+ *ops = &nop_ops;
+}
+
+void splash_set_verbose(void)
+{
+ verbose = 1;
+}
+
Index: e2fsck/splash.h
===================================================================
--- /dev/null
+++ e2fsck/splash.h
@@ -0,0 +1,13 @@
+#ifndef _SPLASH_H
+#define _SPLASH_H
+
+struct splash_ops {
+ void (*splash_on)(void);
+ void (*splash_off)(void);
+};
+
+void splash_init(struct splash_ops **ops);
+void splash_set_verbose(void);
+
+#endif /* _SPLASH_H */
+
Index: e2fsck/unix.c
===================================================================
--- e2fsck/unix.c.orig
+++ e2fsck/unix.c
@@ -51,6 +51,7 @@ extern int optind;
#include "e2p/e2p.h"
#include "e2fsck.h"
#include "problem.h"
+#include "splash.h"
#include "../version.h"
/* Command line options */
@@ -1177,6 +1178,7 @@ int main (int argc, char *argv[])
e2fsck_t ctx;
blk64_t orig_superblock;
struct problem_context pctx;
+ struct splash_ops *sops;
int flags, run_result;
int journal_size;
int sysval, sys_page_size = 4096;
@@ -1215,6 +1217,7 @@ int main (int argc, char *argv[])
exit(FSCK_ERROR);
}
reserve_stdio_fds();
+ splash_init(&sops);
set_up_logging(ctx);
if (ctx->logf) {
@@ -1590,6 +1593,7 @@ print_unsupp_features:
fatal_error(ctx, 0);
check_if_skip(ctx);
check_resize_inode(ctx);
+ sops->splash_off();
if (bad_blocks_file)
read_bad_blocks_file(ctx, bad_blocks_file, replace_bad_blocks);
else if (cflag)

View File

@ -1,10 +1,10 @@
Index: lib/ext2fs/ext2fs.h
===================================================================
--- lib/ext2fs/ext2fs.h.orig 2012-06-04 18:42:23.000000000 +0200
+++ lib/ext2fs/ext2fs.h 2012-06-14 09:53:19.190709779 +0200
@@ -53,6 +53,7 @@ extern "C" {
#include <stdlib.h>
--- lib/ext2fs/ext2fs.h.orig
+++ lib/ext2fs/ext2fs.h
@@ -62,6 +62,7 @@ extern "C" {
#include <string.h>
#include <time.h>
#include <errno.h>
+#include <unistd.h>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4bd8a770b6925c3f4ec5dce82c55774e4566cd6f3ffb5805177e3c92c8910b76
size 6353078

BIN
e2fsprogs-1.46.5.tar.sign Normal file

Binary file not shown.

3
e2fsprogs-1.46.5.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2f16c9176704cf645dc69d5b15ff704ae722d665df38b2ed3cfc249757d8d81e
size 7040672

View File

@ -1,87 +1,575 @@
-------------------------------------------------------------------
Fri Apr 29 16:35:06 UTC 2022 - Jan Kara <jack@suse.cz>
Tue Dec 27 10:34:50 UTC 2022 - Ludwig Nussel <lnussel@suse.com>
- libext2fs-add-sanity-check-to-extent-manipulation.patch: libext2fs: add
sanity check to extent manipulation (bsc#1198446 CVE-2022-1304)
- Replace transitional %usrmerged macro with regular version check (boo#1206798)
-------------------------------------------------------------------
Thu Jan 9 15:19:10 UTC 2020 - Jan Kara <jack@suse.cz>
Thu Sep 15 10:23:25 UTC 2022 - Dominique Leuenberger <dimstar@opensuse.org>
- e2fsck-abort-if-there-is-a-corrupted-directory-block.patch: e2fsck: abort if
there is a corrupted directory block when rehashing (bsc#1160571
CVE-2019-5188)
- e2fsck-don-t-try-to-rehash-a-deleted-directory.patch: 2fsck: don't try to
rehash a deleted directory (bsc#1160571 CVE-2019-5188)
- Refresh e2fsprogs.keyring based on currently provided keys.
-------------------------------------------------------------------
Mon May 20 16:20:33 UTC 2019 - Jan Kara <jack@suse.cz>
Wed Sep 14 14:47:43 UTC 2022 - Dominique Leuenberger <dimstar@opensuse.org>
- Revert-mke2fs-prevent-creation-of-unmountable-ext4-w.patch: Revert
"mke2fs: prevent creation of unmountable ext4 with large flex_bg count"
(bsc#1135261)
libext2fs-place-metadata-blocks-in-the-last-flex_bg-.patch: libext2fs:
place metadata blocks in the last flex_bg so they are contiguous
(bsc#1135261)
- Spec file cleanup:
+ Drop remainders regarding -mini packages, which was not a thing
since Jan 2014.
+ Split build of fuse2fs out into a sep build (_multibuild
enabled).
-------------------------------------------------------------------
Thu May 16 15:05:53 UTC 2019 - Jan Kara <jack@suse.cz>
Tue Sep 13 13:47:21 UTC 2022 - Christian Goll <cgoll@suse.com>
- e2fsck-check-and-fix-tails-of-all-bitmaps.patch: e2fsck: Check and fix
tails of all bitmaps (bsc#1128383)
- enabled fuse2fs build which enable to mount ext2/3/4 via FUSE
-------------------------------------------------------------------
Wed Jun 7 13:06:21 UTC 2017 - jack@suse.cz
Tue Apr 19 20:51:15 UTC 2022 - Dirk Müller <dmueller@suse.com>
- libext2fs-don-t-ignore-fsync-errors.patch: libext2fs: don't ignore fsync
errors (bsc#1038194)
- avoid empty preuninstall script
-------------------------------------------------------------------
Wed May 31 13:34:50 UTC 2017 - jack@suse.cz
Fri Jan 28 15:40:35 UTC 2022 - Jan Kara <jack@suse.cz>
- Update to 1.46.5:
* better handling for resizing to fs sizes which would exceed inode limits
* fix crash in e2fsck fastcommit handling
* fix possibly lost quota limits when e2fsck corrects quota files
* fix tune2fs to properly transfer quota limits when convertion quota files
* add support for handling of version 0 quota files in tune2fs
* teach libss to use libreadline.so.8
* optimize resize2fs cpu usage for large filesystems
* teach libuuid to use getrandom() or getentropy() if available
- libss-add-newer-libreadline.so.8-to-dlopen-path.patch: Remove, merged upstream
- quota-Add-support-to-version-0-quota-format.patch: Remove, merged upstream
- quota-Fold-quota_read_all_dquots-into-quota_update_l.patch: Remove, merged upstream
- quota-Rename-quota_update_limits-to-quota_read_all_d.patch: Remove, merged upstream
- tune2fs-Fix-conversion-of-quota-files.patch: Remove, merged upstream
- e2fsck-Do-not-trash-user-limits-when-processing-orph.patch: Remove, merged upstream
- debugfs-Fix-headers-for-quota-commands.patch: Remove, merged upstream
- quota-Drop-dead-code.patch: Remove, merged upstream
- libext2fs-Fix-fsync-2-detection.patch: libext2fs: Fix fsync(2) detection
(bsc#1038194)
-------------------------------------------------------------------
Thu Nov 24 15:41:57 UTC 2016 - jack@suse.cz
Fri Oct 15 12:11:41 UTC 2021 - Johannes Segitz <jsegitz@suse.com>
- resize2fs-Fix-32-64-bit-overflow-when-multiplying-by-blocks-cl.patch: Fix
32/64-bit overflow when multiplying by blocks/clusters per group
(bsc#1009532)
- Drop ProtectClock hardening, can cause issues if other device acceess is needed
-------------------------------------------------------------------
Thu Aug 11 09:13:57 UTC 2016 - jack@suse.cz
Thu Sep 30 14:13:06 UTC 2021 - Jan Kara <jack@suse.cz>
- Update spec file to regenerate initrd when e2fsprogs is updated or
uninstalled (bsc#960273)
- quota-Add-support-to-version-0-quota-format.patch: quota: Add support to
version 0 quota format (jsc#SLE-17360)
quota-Fold-quota_read_all_dquots-into-quota_update_l.patch: quota: Fold
quota_read_all_dquots() into quota_update_limits() (jsc#SLE-17360)
quota-Rename-quota_update_limits-to-quota_read_all_d.patch: quota: Rename
quota_update_limits() to quota_read_all_dquots() (jsc#SLE-17360)
tune2fs-Fix-conversion-of-quota-files.patch: tune2fs: Fix conversion of quota
files (jsc#SLE-17360)
e2fsck-Do-not-trash-user-limits-when-processing-orph.patch: e2fsck: Do not
trash user limits when processing orphan list (jsc#SLE-17360)
debugfs-Fix-headers-for-quota-commands.patch: debugfs: Fix headers for quota
commands (jsc#SLE-17360)
quota-Drop-dead-code.patch: quota: Drop dead code (jsc#SLE-17360)
- add these not yet released fixes to e2fsprogs package so that SLE15-SP4 ships
with them
-------------------------------------------------------------------
Tue May 26 11:42:47 UTC 2015 - jack@suse.cz
Wed Sep 15 09:16:54 UTC 2021 - Jan Kara <jack@suse.cz>
- libext2fs-fix-potential-buffer-overflow-in-closefs.patch: libext2fs: fix
potential buffer overflow in closefs() (bsc#918346 CVE-2015-1572)
- Update to 1.46.4:
* Default to 256-byte inodes for all filesystems, not only larger ones
* Bigalloc is considered supported now for small cluster sizes
* E2fsck and e2image fixes for quota feature
* Fix mke2fs creation of filesystem into non-existent file
- libss-add-newer-libreadline.so.8-to-dlopen-path.patch: libss: add newer
libreadline.so.8 to dlopen path (bsc#1189453)
-------------------------------------------------------------------
Tue May 26 11:30:53 UTC 2015 - jack@suse.cz
Tue Sep 14 07:03:07 UTC 2021 - Johannes Segitz <jsegitz@suse.com>
- libext2fs-avoid-buffer-overflow-if-s_first_meta_bg-i.patch: libext2fs:
avoid buffer overflow if s_first_meta_bg is too big (bsc#915402 CVE-2015-0247)
- Added hardening to systemd service(s) (bsc#1181400). Added patch(es):
* harden_e2scrub@.service.patch
* harden_e2scrub_all.service.patch
* harden_e2scrub_fail@.service.patch
* harden_e2scrub_reap.service.patch
-------------------------------------------------------------------
Fri Jan 9 09:05:27 UTC 2015 - jack@suse.cz
Mon Aug 2 20:47:09 UTC 2021 - Jan Kara <jack@suse.cz>
- e2fsck-fix-free-pointer-dereferences.patch:
e2fsck-free-ctx-fs-not-fs-at-the-end-of-fsck.patch:
Fix use after free issues (bnc#912229)
- Update to 1.46.3:
* Add -V and -VV options to filefrag
* Fix fs corruption cause by resize2fs on filesystems with MMP blocks
* Fast commit portability fixes
* Fix direct IO support in Unix IO manager
* Avoid calling EXT2_IOC_[GS]ETFLAGS for block devices
* Fix mke2fs to not discard blocks beyond end of filesystem
* Make e2fsck set filetype of '.' and '..' entries
* Fix QCOW image generation in e2image for very large filesystems
* Update translations
-------------------------------------------------------------------
Mon Jul 21 17:54:46 UTC 2014 - jack@suse.cz
Wed Jun 2 08:31:22 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
- Fix the %doc files. RELEASE-NOTES is a symlink to
doc/RelNotes/v%version.
-------------------------------------------------------------------
Sun Mar 14 15:25:20 UTC 2021 - Andreas Stieger <andreas.stieger@gmx.de>
- e2fsprogs 1.46.2:
* tune2fs -c now takes "random" argument
* Add support for the FS_NOCOMP_FL flag to chattr and lsattr
* Fix warnings when resizing small file systems to a super-large
* Fix the debugfs rdump and ls commands so they will work correctly
for uid's and gid's => 65536
* Fix the debugfs write and symlink commands so they support
targets which contain a pathname
* Fix Direct I/O support on block devices where the logical block
size is greater 1k
* Fix debugfs's logdump so it works on file systems whose block
size is greater than 8k
* Fix a crash when there is error while e2fsck is trying to open
the file system, and e2fsck calls ext2fs_mmp_stop() before MMP
has been initialized
* Improved error checking in the fast commit replay code in e2fsck
* Fix various compiler and Coverity warnings
* Update the Spanish translation from the translation project
-------------------------------------------------------------------
Thu Feb 18 14:44:00 UTC 2021 - Jan Kara <jack@suse.cz>
- Remove autoreconf (and resulting dependencies) from the spec file. The
upstream configure script should be fine.
-------------------------------------------------------------------
Tue Feb 16 17:31:25 UTC 2021 - Jan Kara <jack@suse.cz>
- Update to 1.46.1:
* Fix setting extended attributes in libext2fs and debugfs
* Fix e2fsck to accept large_dir directories greater than 4G
* Fix fast commit support on big endian architectures
* Fix mke2fs -d to correctly import a small file stored using inline_data
feature and which has ACL or extended attribute
* Various compilation fixes
* Speedup bitmap loading for large filesystems using multiple threads
* Speedup mke2fs for bigalloc filesystems
* E2fsck fixes when rehashing directories
* Fix e2fsck crashes on maliciously corrupted filesystems
* Fix e2fsck handling of duplicated case-folded file names
* Implement hashed directory support in libext2fs
* Support for fast commit feature
* Support for combination of casefolding and encryption
* Support for stable inodes feature
* Add support for per-inode DAX flag
* Fix tune2fs to unlock MMP on failure
* Fix e2fsck buffer overflow when scanning directory blocks
* Fix resize2fs overflowing block group descriptors with 1k block size
- delete e2fsprogs-1.45.2-gettext.patch - it was merged upstream
- Add autoconf-archive to build requirements
- Fix installation of info files for older distros
-------------------------------------------------------------------
Thu Jan 28 15:02:08 UTC 2021 - Thorsten Kukuk <kukuk@suse.com>
- Fix usage of info macros on openSUSE, we use file triggers today
- Use file requires for post section
-------------------------------------------------------------------
Thu Oct 29 10:31:32 UTC 2020 - Ludwig Nussel <lnussel@suse.de>
- prepare usrmerge (boo#1029961)
-------------------------------------------------------------------
Sat May 2 09:44:11 UTC 2020 - Andreas Stieger <andreas.stieger@gmx.de>
- Update to 1.45.6:
* Debugfs will ignore lines in its command files which start with
a comment character ("#")
* Fix a number of potential out of bounds memory accesses caused
by fuzzed / malicious file systems
* Fix a spurious complaint from e2fsck when a directory which
previously had more than 32000 subdirectories has the number
of subdirectories drops below 32000
* Fix an ismounted check when an LVM device is renamed while the
device is mounted
* Mke2fs -d now correctly sets permission with files where the
owner permissions are not rwx
* Improve e2fsck's ability to deal with file systems with very
large number of directories, such that various data structures
take more than 2GiB of memory. Use better structure packing to
improve the memory efficiency of these data structures.
* Fix debugfs so it correctly prints inode numbers > 2**31.
* Filefrag now supports very large files (with > 4 billion
blocks), as well as block sizes up to 1 GiB.
* Update and clarify various man pages
* Reserved the error code EXT2_ET_NO_GDESC (which will be used
in e2fsprogs v1.46+)
* Add a thread-safe variant of e2p_feature2string(),
e2p_feature_to_string() to the libe2p library.
* Fixed portability problems caused by gcc 10.
* Synchroniz changes from Android's AOSP e2fsprogs tree
* Update the Malay translation from the translation project
- add upstream signing key and verify source signature
-------------------------------------------------------------------
Thu Jan 9 13:48:12 UTC 2020 - Jan Kara <jack@suse.cz>
- Update to 1.45.5:
* Fix out of bounds write when checking maliciously corrupted filesystem
* Remove unnecessary sleep in e2scrub
* Fix spurious emails from e2scrub_all
* Fix crash in e2fsck when rebuilding very large directories
* Improve resize2fs minimum fs size estimates when the fs is mounted
* Fix UBSAN failures when fuzzing filesystem images
* Fix potential memory leak in read_bitmap() in libext2fs
* Speedup e2fsck on file systems with a very large number of inodes
* fuse2fs fixes
-------------------------------------------------------------------
Mon Sep 30 16:34:37 UTC 2019 - Jan Kara <jack@suse.cz>
- Update to 1.45.4:
* A maliciously corrupted file systems can trigger buffer overruns in the
quota code used by e2fsck. (Addresses CVE-2019-5094)
* E2fsck now checks to make sure the casefold flag is only set on
directories, and only when the casefold feature is enabled
* E2fsck will not disable the low dtime checks when using a backup superblock
where the last mount time is zero
* Scrubbing scripts fixes
* Update translations
-------------------------------------------------------------------
Fri Aug 9 09:09:39 UTC 2019 - Jan Kara <jack@suse.cz>
- Update to 1.45.3:
* Whether or not automatic online scrubbing will be called is now controlled
in /etc/e2scrub.conf.
* Fix e2fsck handling of filesystems with large_dir and inline directories
* Fix e2scrub_all for encrypted LUKS partitions
* Fix e2scrub_all volume cleanup
* Regression tests cleanups and improvements
* Fixed compiler warnings
* Translation fixes and updates (boo#1170964)
-------------------------------------------------------------------
Wed Jul 24 20:47:22 UTC 2019 - Antoine Belvire <antoine.belvire@opensuse.org>
- Fix build with gettext 0.20:
* Add e2fsprogs-1.45.2-gettext.patch.
* Exclude in-sources intl/ directory from build.
- Fix install_info_delete usage: It must be called in preun.
-------------------------------------------------------------------
Tue Jul 2 07:28:56 UTC 2019 - Martin Liška <mliska@suse.cz>
- Use FAT LTO objects in order to provide proper static library.
-------------------------------------------------------------------
Fri May 31 10:42:41 UTC 2019 - Jan Kara <jack@suse.cz>
- Package e2scrub unit files and separate scrubbing bits into a separate
subpackage e2fsprogs-scrub
-------------------------------------------------------------------
Fri May 31 03:50:23 UTC 2019 - seanlew@opensuse.org
- Update to 1.45.2
* Fixed e2scrub_all issues running from cron
* When mke2fs asks to proceed, fall back on English Y/y
* Fix spurious complaint of blocks beyond i_size
* Fixed 'make install' failure when the cron.d dir doesn't exist
-------------------------------------------------------------------
Wed May 15 14:49:56 UTC 2019 - Jan Kara <jack@suse.cz>
- Remove unused configure-Fix-autoheader-failure.patch.
-------------------------------------------------------------------
Wed May 15 13:48:31 UTC 2019 - seanlew@opensuse.org
- Update to 1.45.1
* Remove configure-Fix-autoheader-failure.patch (fixed upstream)
* Debugfs now supports non-printable chars
* E2fsck now checks to make sure all unused bits in block are set
* E2fsck now supports writing out a problem code log
* Fixed various casefold bugs
* Fix mke2fs support for < 900TB disks
* E2scrub will take its snapshots with UDISK_IGNORE
* Dropped utf8/nls symbols from libext2fs shared library
-------------------------------------------------------------------
Fri Mar 29 16:56:07 UTC 2019 - Jan Kara <jack@suse.cz>
- configure-Fix-autoheader-failure.patch: Fix autoheader failure
-------------------------------------------------------------------
Fri Mar 29 15:01:02 UTC 2019 - Jan Kara <jack@suse.cz>
- Update to 1.45.0
* Add support to force check at the next fsck run to tune2fs
* Add e2scrub script to run e2fsck on LVM backed filesystem
* Mke2fs will attempt to use ZERO_RANGE before PUNCH_HOLE so that we don't
lose allocated blocks in preallocated files
* Initial support for setting character set encoding
* Add support for setting inode checksum to debugfs
* Add support for specifying superblock location to e2image
* Fix e4defrag to handle situation when files are created while it is running
* Fix e2fsck to handle dirs > 2 GiB when largedir feature is enabled
* Fix mke2fs huge file creation
* Fix libext2fs to be more robust against invalid group descriptors
* Fix mke2fs and debugfs to correctly copy files > 2 GiB
* Fix memory leaks in debugfs, mke2fs, and e2freefrag
-------------------------------------------------------------------
Tue Jan 8 09:34:17 UTC 2019 - jack@suse.cz
- Update to 1.44.5
* use 64-bit counters to track number of defragged files
* correctly traslate Posix ACLs
* Use the online free block counts
* Fix a false warning that tune2fs will take along time to change UUID
* e2fsck will only offer to set the inline_data feature flag sometimes
* e4defrag running as root but can't find file system
* resize2fs was failing to update extent tree checksums
* fuse2fs command line parsing fixed
* e2fs segfault fix when corrupted journal file-system is too large
* e2image now includes the mmp block
* fix various verity handling bugs which made it unusable
* fix a bug in tune2fs to dereference freed memory after replay
-------------------------------------------------------------------
Tue Sep 11 15:34:00 UTC 2018 - jack@suse.cz
- Update to 1.44.4
* fix debugs ncheck command to work for files with multiple hardlinks
* avoid floating point exception when libblkid probes maliciously corrupted
superblocks
* fix e2fsck to handle filesystems with resize_inode and meta_bg enabled
* basic fsverify support
* debugfs can operate on corrupted filesystems so they can be fixed
* new debugfs commands for dumping xattr blocks and i_blocks array
* dumpe2fs can print MMP block
* inode's project ID properly byte-swapped on big-endian filesystems
* e2fsck can handle s_inodes_count corruption
* other e2fsck improvements and fixes
* mke2fs fixes where in various corner cases invalid filesystem would be
created
- add new e2mmpstatus alias for dumpe2fs to spec file
-------------------------------------------------------------------
Wed May 23 15:00:07 UTC 2018 - jack@suse.cz
- Update to 1.44.2
* support for directories over 2 GB (large_dir feature)
* support for large extended attributes (ea_inode feature)
* metadata checksumming is enabled by default by mke2fs
* resize2fs deemed stable enough for bigalloc file systems
* tune2fs now replays the journal before modifying the file system
* improved consistency checks for symlinks
* various fixes in e2image, dumpe2fs, debugfs, and e2fsck for bigalloc
file systems
* fix e2image handling of images on big endian systems
* fixed e2fsck to properly update quotas when handling orphan inodes
-------------------------------------------------------------------
Tue Mar 6 10:32:58 UTC 2018 - jack@suse.cz
- libext2fs-fix-build-failure-in-swapfs.c-on-big-endia.patch: Removed as it is
included in the new release
- switched to .xz archive as kernel.org is going to deprecate gzip archives
- Update to 1.43.9
* fix build failure on big endian systems
* inode flag cleanup in libe2p
-------------------------------------------------------------------
Wed Jan 24 14:41:11 UTC 2018 - jack@suse.cz
- libext2fs-fix-build-failure-in-swapfs.c-on-big-endia.patch:
libext2fs: fix build failure in swapfs.c on big-endian systems (bsc#1077420)
-------------------------------------------------------------------
Tue Jan 9 10:16:04 UTC 2018 - jack@suse.cz
- Update to 1.43.8
* add forgotten byteswap of some new superblock fields
* fix use-after-free in e2fsck for corrupted root inode
* fix floating point exception due to corrupted superblock in e2fsck
* fix resize2fs's free block sanity checks
* updated translations
-------------------------------------------------------------------
Tue Nov 14 09:49:57 UTC 2017 - jack@suse.cz
- Added %license tag to specfile
-------------------------------------------------------------------
Tue Nov 7 09:23:56 UTC 2017 - jack@suse.cz
- Update to 1.43.7
* debugfs, tune2fs, fuse2fs fixes of error handling in journal replay
* e2fsck and debugfs fixes so that malicious filesystems do not cause
buffer overflows
* fix corner cases in offline resizing in resize2fs
* updated translations
-------------------------------------------------------------------
Mon Sep 18 14:42:48 CEST 2017 - ro@suse.de
- ignore errors for install-info calls in post scripts,
otherwise installing with "--excludedocs" fails
-------------------------------------------------------------------
Tue Sep 5 15:33:16 UTC 2017 - jack@suse.cz
- Update to 1.43.6
* fix printing of quota inconsistency messages
* fix out of bounds checks in e2fsck
* optimize e2fsck CPU usage for large sparse files
* increase inode size to 256 bytes if features require it
* various UI fixes
* updated translations
-------------------------------------------------------------------
Mon Aug 28 13:42:33 UTC 2017 - mmarek@suse.com
- Add missing coreutils dependency for initrd macros (bsc#1055492).
-------------------------------------------------------------------
Mon Aug 21 13:14:25 UTC 2017 - jack@suse.cz
- Update to 1.43.5
* fix e2fsck infinite loop when rebuilding encrypted directories
* fix tune2fs support for enabling /disabling project quota
* fixes in debugfs, dumpe2fs, e2fsck, tune2fs, and resize2fs for maliciously
corrupted filesystems
* fix e2fsck to verify invalid quota inode numbers
* fix byte-swapping of backup superblocks
* fix e2fsck -E bmap2extent to work for sparse files
* fix e2fsck to correctly handle quota accounting for multiply claimed blocks
* lots of other fixes
-------------------------------------------------------------------
Fri Mar 3 09:47:06 UTC 2017 - jack@suse.cz
- Update to 1.43.4
* fix e2fsck handling of system.data extended attributes for small files
* fixes in mke2fs -d
* make mke2fs refuse absurdly large devices
* make mke2fs properly report IO errors
* clarify default in mke2fs questions
* re-add uninit_bg to mke2fs.conf
* add support for project quota to debugfs
* improve xattr support in debugfs
* remove mkfs.ext4dev and fsck.ext4dev
-------------------------------------------------------------------
Mon Oct 3 12:02:04 UTC 2016 - jack@suse.cz
- Remove suse-module-tools dependency as it creates cycle in dependency list
-------------------------------------------------------------------
Tue Sep 27 12:41:57 UTC 2016 - jack@suse.cz
- Update download URL to poing to ftp.kernel.org which is more reliable
-------------------------------------------------------------------
Mon Sep 26 12:56:47 UTC 2016 - jack@suse.cz
- Update to 1.43.3
* mke2fs will use larger journal for large filesystems by default
* e2fsck journal replay bugfixes
* debugfs improvements and fixes
* fix resize2fs migration of attribute blocks
- fuse2fs manpage is no longer installed when fuse2fs is not built
-------------------------------------------------------------------
Mon Sep 12 11:02:14 UTC 2016 - dmueller@suse.com
- fix last change
-------------------------------------------------------------------
Sat Jul 23 18:24:39 UTC 2016 - crrodriguez@opensuse.org
- Rebuild the initrd if this package changes (and we are not
building the -mini version)
-------------------------------------------------------------------
Mon Jun 20 14:58:12 UTC 2016 - jack@suse.cz
- Update to 1.43.1
* Add support for the ext4 metadata checksum, checksum seed, inline data,
encryption, project quota, and read-only features
* Support for the very old, experimental, and never-added-to-mainline
compression feature has been removed
* Mke2fs will now create file systems with the metadata_csum and 64bit
features enabled by default
* The tune2fs program will ask the user for confirmation before starting
dangerous operations if the terminal is available, and it will replay
the journal if necessary
* Add an ext2/3/4 FUSE server
* The resize2fs command can now convert file systems between 64-bit and
32-bit mode
* We now use a new e2undo file format which is much more efficient and
faster than the old tdb-based scheme. Since it so much faster, e2fsck,
tune2fs, debugfs, and resize2fs now also can support using creating an
undo file.
* Multiple e2fsck fixes
* Multiple mke2fs improvements
* Multiple debugfs improvements
-------------------------------------------------------------------
Fri Aug 7 00:00:00 CEST 2015 - dsterba@suse.com
- spec: add static library dependencies
-------------------------------------------------------------------
Mon Jul 27 00:00:00 CEST 2015 - dsterba@suse.com
- enable static build and package static libraries
-------------------------------------------------------------------
Sat Jun 20 23:33:05 UTC 2015 - crrodriguez@opensuse.org
- e2fsprogs-1.41.1-splash_support.patch: Drop it, this patch
depends on the old in kernel "bootsplash" patches that were
removed after the introduction of plymouth.
-------------------------------------------------------------------
Tue May 26 12:15:35 UTC 2015 - jack@suse.cz
- Update to 1.42.13
* fix potential buffer overflow while closing a filesystem
* fix deadlock which occurs when using systemd and e2fsck.conf's logging
feature
* make tune2fs clear journal superblock backup when removing journal
* fix use after free bugs in resize2fs and e2fsck
* fix endianity bugs in libext2fs
...
- Remove e2fsck-fix-free-pointer-dereferences.patch: Merged upstream
-------------------------------------------------------------------
Fri Jan 9 08:48:40 UTC 2015 - jack@suse.cz
- e2fsck-fix-free-pointer-dereferences.patch: Fix use after free (bnc#912229)
-------------------------------------------------------------------
Tue Sep 2 13:39:35 UTC 2014 - jack@suse.cz
- Update to 1.42.12
* fix e2fsck bugs when repairing bigalloc filesystems
* fix rare e2fsck bugs discovered by fs fuzzing
* resize2fs will use less memory when resizing large filesystems
...
-------------------------------------------------------------------
Tue Jul 15 15:52:16 UTC 2014 - jack@suse.cz
- Remove e2fsck.conf since we don't need the changed default anymore. e2fsck
handles this type of problems automatically now and broken_system_clock has
other undesired sideeffects like skipped periodic checks (bnc#866283)
-------------------------------------------------------------------
Mon Jul 21 17:53:39 UTC 2014 - jack@suse.cz
Tue Jul 15 15:43:06 UTC 2014 - jack@suse.cz
- Update to 1.42.11
* fix aborted journal replay in e2fsck with bigalloc
@ -91,19 +579,24 @@ Mon Jul 21 17:53:39 UTC 2014 - jack@suse.cz
* mke2fs asks before wiping preexisting filesystem
* mke2fs can create filesystems with all metadata in the beginning
* fix resize2fs shrink operation in some corner cases
* fix quota handling in e2fsck
...
- Remove filefrag-print-shared-extent-flag.patch: Merged upstream
-------------------------------------------------------------------
Thu Apr 17 21:49:40 UTC 2014 - mfasheh@suse.com
Mon Apr 28 17:45:46 UTC 2014 - mfasheh@suse.com
- Add filefrag-print-shared-extent-flag.patch: let's filefrag print shared
- Add filefrag-print-shared-extent-flag.patch: lets filefrag print shared
extent flag when it gets it. Helps with fate#316317 / bnc#868847. Patch
sent to upstream 4/17/2014.
-------------------------------------------------------------------
Tue Feb 4 00:08:18 UTC 2014 - jack@suse.cz
Mon Jan 27 13:05:33 UTC 2014 - jack@suse.cz
- Removed "-mini" spec file for now as it is causing troubles in Factory
and according to Coolo may not be needed after all.
-------------------------------------------------------------------
Mon Jan 27 09:22:23 UTC 2014 - jack@suse.cz
- update to 1.42.9
* fixes in resize2fs, e2fsck, debugfs, and libext2fs to correctly handle
@ -119,6 +612,15 @@ Tue Feb 4 00:08:18 UTC 2014 - jack@suse.cz
* fix e2fsck crashes when deleting invalid symlink, directory larger than 2GB
...
-------------------------------------------------------------------
Tue Dec 10 00:45:47 UTC 2013 - nfbrown@suse.com
- Created "-mini" version of package which doesn't
build "info" and so doesn't depend on makeinfo,
texinfo, and all of tex. This should allow packages
in the bootstrap cycle (such as krb5-mini) to
build-depends of libraries from here.
-------------------------------------------------------------------
Thu Jun 27 10:54:12 UTC 2013 - jack@suse.cz

4450
e2fsprogs.keyring Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
#
# spec file for package e2fsprogs
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,64 +16,73 @@
#
%define flavor @BUILD_FLAVOR@%nil
%if "%{flavor}" == ""
Name: e2fsprogs
Summary: Utilities for the Second Extended File System
License: GPL-2.0-only
%if 0%{?suse_version} >= 1010
# Hint for ZYPP
Supplements: filesystem(ext2) filesystem(ext3) filesystem(ext4)
%endif
BuildRequires: autoconf
BuildRequires: automake
%else
Name: fuse2fs
Summary: FUSE file system client for ext2/ext3/ext4 file systems
License: MIT
BuildRequires: fuse-devel
%endif
Version: 1.46.5
Release: 0
Group: System/Filesystems
URL: http://e2fsprogs.sourceforge.net
Source: http://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v%{version}/e2fsprogs-%{version}.tar.xz
Source2: README.SUSE
Source3: baselibs.conf
Source4: http://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v%{version}/e2fsprogs-%{version}.tar.sign
Source5: https://thunk.org/tytso/tytso-key.asc#/e2fsprogs.keyring
#
# e2fsprogs patches
#
# libcom_err patches
Patch3: libcom_err-compile_et_permissions.patch
Patch4: e2fsprogs-1.42-implicit_fortify_decl.patch
Patch5: e2fsprogs-1.42-ext2fsh_implicit.patch
Patch6: harden_e2scrub@.service.patch
Patch7: harden_e2scrub_all.service.patch
Patch8: harden_e2scrub_fail@.service.patch
Patch9: harden_e2scrub_reap.service.patch
BuildRequires: libblkid-devel
BuildRequires: libuuid-devel
BuildRequires: pkg-config
BuildRequires: xz
%if "%{flavor}" == ""
%if 0%{?suse_version} >= 1210
%bcond_without systemd
%else
%bcond_with systemd
%endif
%if 0%{?suse_version} > 1220
BuildRequires: makeinfo
%endif
# Define info macros if missing (for Fedora builds)
%if 0%{!?%install_info_prereq:1}
%if ! 0%{?suse_version}
%define install_info_prereq info
%define install_info sbin/install-info
%define install_info_delete sbin/install-info --delete
Requires(post): %install_info_prereq
Requires(preun):%install_info_prereq
%endif
Requires: %install_info_prereq
# bug437293
%ifarch ppc64
Obsoletes: e2fsprogs-64bit
%endif
#
Version: 1.42.11
Release: 0
Summary: Utilities for the Second Extended File System
License: GPL-2.0-only
Group: System/Filesystems
URL: http://e2fsprogs.sourceforge.net
# For regenerate_initrd_post macro
Requires(post): /usr/bin/mkdir /usr/bin/touch
Requires: libcom_err2 >= %{version}
Requires: libext2fs2 >= %{version}
Source: http://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v%{version}/e2fsprogs-%{version}.tar.gz
Source2: README.SUSE
Source3: baselibs.conf
#
# e2fsprogs patches
#
Patch1: e2fsprogs-1.41.1-splash_support.patch
# libcom_err patches
Patch3: libcom_err-compile_et_permissions.patch
Patch4: e2fsprogs-1.42-implicit_fortify_decl.patch
Patch5: e2fsprogs-1.42-ext2fsh_implicit.patch
Patch6: e2fsck-free-ctx-fs-not-fs-at-the-end-of-fsck.patch
Patch7: e2fsck-fix-free-pointer-dereferences.patch
Patch8: libext2fs-avoid-buffer-overflow-if-s_first_meta_bg-i.patch
Patch9: libext2fs-fix-potential-buffer-overflow-in-closefs.patch
Patch10: resize2fs-Fix-32-64-bit-overflow-when-multiplying-by-blocks-cl.patch
Patch11: libext2fs-don-t-ignore-fsync-errors.patch
Patch12: libext2fs-Fix-fsync-2-detection.patch
Patch13: e2fsck-check-and-fix-tails-of-all-bitmaps.patch
Patch14: Revert-mke2fs-prevent-creation-of-unmountable-ext4-w.patch
Patch15: libext2fs-place-metadata-blocks-in-the-last-flex_bg-.patch
Patch16: e2fsck-abort-if-there-is-a-corrupted-directory-block.patch
Patch17: e2fsck-don-t-try-to-rehash-a-deleted-directory.patch
Patch18: libext2fs-add-sanity-check-to-extent-manipulation.patch
Suggests: e2fsprogs-scrub
# Do not suppress make commands
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -81,6 +90,13 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
Utilities needed to create and maintain ext2 and ext3 file systems
under Linux. Included in this package are: chattr, lsattr, mke2fs,
mklost+found, tune2fs, e2fsck, resize2fs, and badblocks.
%else
%description
fuse2fs is a FUSE file system client that supports reading and
writing from devices or image files containing ext2, ext3, and
ext4 file systems.
%endif
%package devel
Summary: Dummy development package
@ -98,6 +114,23 @@ Requires: libuuid-devel
%description devel
Dummy development package for backwards compatibility.
%package -n e2fsprogs-scrub
Summary: Ext2fs scrubbing scripts and service files
License: GPL-2.0-only
Group: System/Filesystems
%if %{with systemd}
BuildRequires: systemd-rpm-macros
%{?systemd_requires}
%endif
Requires: e2fsprogs
Requires: lvm2
Requires: postfix
Requires: util-linux
%description -n e2fsprogs-scrub
Scripts and systemd service files for background scrubbing of LVM volumes
with ext2, ext3, and ext4 filesystems.
%package -n libext2fs2
Summary: Ext2fs library
License: LGPL-2.0-only
@ -116,6 +149,17 @@ Requires: libext2fs2 = %version
%description -n libext2fs-devel
Development files for libext2fs.
%package -n libext2fs-devel-static
Summary: Development files for libext2fs
License: LGPL-2.0-only
Group: Development/Libraries/C and C++
Requires: libext2fs-devel = %{version}
Provides: libext2fs-devel:%{_libdir}/libe2p.a
Provides: libext2fs-devel:%{_libdir}/libext2fs.a
%description -n libext2fs-devel-static
Development files for libext2fs. Static libraries.
%package -n libcom_err2
Summary: E2fsprogs error reporting library
# bug437293
@ -147,62 +191,59 @@ Requires: libcom_err2 = %version
%description -n libcom_err-devel
Development files for the com_err error message display library.
%package -n libcom_err-devel-static
Summary: Development files for libcom_err, static libraries
License: MIT
Group: Development/Libraries/C and C++
Requires: libcom_err-devel = %{version}
Provides: libcom_err-devel:%{_libdir}/libcom_err.a
Provides: libcom_err-devel:%{_libdir}/libss.a
# bug437293
%ifarch ppc64
Obsoletes: libcom_err-devel-64bit
%endif
#
%description -n libcom_err-devel-static
Development files for the com_err error message display library. Static libraries.
%prep
%setup -q -n e2fsprogs-%{version}
# e2fsprogs patches
%patch1
# libcom_err patches
%patch3 -p1
%patch4
%patch5
cp %{SOURCE2} .
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
cp %{SOURCE2} .
%build
autoreconf --force --install
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
%configure \
--disable-evms \
--with-root-prefix='' \
--enable-elf-shlibs \
--disable-libblkid \
--disable-libuuid \
--disable-uuidd \
--disable-fsck \
--without-crond-dir \
--with-systemd-unit-dir=%{?_unitdir} \
CFLAGS="$RPM_OPT_FLAGS"
make %{?_smp_mflags} V=1
#Guarantee that tranlations match the source messages
make -C po update-po
%install
%if "%{flavor}" == ""
make install install-libs DESTDIR=$RPM_BUILD_ROOT ELF_INSTALL_DIR=/%{_libdir}
%{find_lang} %{name}
%{find_lang} e2fsprogs
rm $RPM_BUILD_ROOT%{_libdir}/e2initrd_helper
rm -f $RPM_BUILD_ROOT/%{_sbindir}/mkfs.ext4dev
rm -f $RPM_BUILD_ROOT/%{_sbindir}/fsck.ext4dev
rm -f $RPM_BUILD_ROOT/usr/share/man/man8/mkfs.ext4dev.8*
rm -f $RPM_BUILD_ROOT/usr/share/man/man8/fsck.ext4dev.8*
# Need libext2fs.a for silo
find "%buildroot/%_libdir" -type f -name "*.a" \
%ifarch %sparc
! -name libext2fs.a \
%endif
-print -delete
#UsrMerge
%if 0%{?suse_version} < 1550
mkdir %{buildroot}/sbin
ln -s %{_sbindir}/badblocks %{buildroot}/sbin/badblocks
ln -s %{_sbindir}/debugfs %{buildroot}/sbin/debugfs
@ -210,6 +251,7 @@ ln -s %{_sbindir}/dumpe2fs %{buildroot}/sbin/dumpe2fs
ln -s %{_sbindir}/e2undo %{buildroot}/sbin/e2undo
ln -s %{_sbindir}/e2fsck %{buildroot}/sbin/e2fsck
ln -s %{_sbindir}/e2label %{buildroot}/sbin/e2label
ln -s %{_sbindir}/e2mmpstatus %{buildroot}/sbin/e2mmpstatus
ln -s %{_sbindir}/fsck.ext2 %{buildroot}/sbin/fsck.ext2
ln -s %{_sbindir}/fsck.ext3 %{buildroot}/sbin/fsck.ext3
ln -s %{_sbindir}/fsck.ext4 %{buildroot}/sbin/fsck.ext4
@ -228,18 +270,47 @@ popd
for libName in $LIBNAMES;
do ln -s %{_libdir}/$libName %{buildroot}/%{_lib};
done
%endif
%if %{with systemd}
%pre -n e2fsprogs-scrub
%service_add_pre e2scrub@.service e2scrub_all.service e2scrub_all.timer e2scrub_fail@.service e2scrub_reap.service
%endif
#EndUsrMerge
%post
/sbin/ldconfig
%if 0%{?suse_version} <= 1530
%install_info --info-dir=%{_infodir} %{_infodir}/libext2fs.info.gz
%endif
%{?regenerate_initrd_post}
%if %{with systemd}
%post -n e2fsprogs-scrub
%service_add_post e2scrub@.service e2scrub_all.service e2scrub_all.timer e2scrub_fail@.service e2scrub_reap.service
%endif
%if %{with systemd}
%if 0%{?suse_version} <= 1530
%preun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/libext2fs.info.gz
%endif
%preun -n e2fsprogs-scrub
%service_del_preun e2scrub@.service e2scrub_all.service e2scrub_all.timer e2scrub_fail@.service e2scrub_reap.service
%endif
%postun
/sbin/ldconfig
%install_info_delete --info-dir=%{_infodir} %{_infodir}/libext2fs.info.gz
%{?regenerate_initrd_post}
%if %{with systemd}
%postun -n e2fsprogs-scrub
%service_del_postun e2scrub@.service e2scrub_all.service e2scrub_all.timer e2scrub_fail@.service e2scrub_reap.service
%endif
%posttrans
%{?regenerate_initrd_posttrans}
%post -n libext2fs2 -p /sbin/ldconfig
%postun -n libext2fs2 -p /sbin/ldconfig
@ -248,17 +319,21 @@ done
%postun -n libcom_err2 -p /sbin/ldconfig
%files -f %{name}.lang
%files -f e2fsprogs.lang
%defattr(-, root, root)
%doc RELEASE-NOTES README
%doc doc/RelNotes/v%{version}.txt README
%if 0%{?sle_version} > 120200
%license NOTICE
%endif
%config /etc/mke2fs.conf
#UsrMerge
%if 0%{?suse_version} < 1550
/sbin/badblocks
/sbin/debugfs
/sbin/dumpe2fs
/sbin/e2undo
/sbin/e2fsck
/sbin/e2label
/sbin/e2mmpstatus
/sbin/fsck.ext2
/sbin/fsck.ext3
/sbin/fsck.ext4
@ -270,13 +345,14 @@ done
/sbin/tune2fs
/sbin/e2image
/sbin/logsave
#EndUsrMerge
%endif
%{_sbindir}/badblocks
%{_sbindir}/debugfs
%{_sbindir}/dumpe2fs
%{_sbindir}/e2undo
%{_sbindir}/e2fsck
%{_sbindir}/e2label
%{_sbindir}/e2mmpstatus
%{_sbindir}/fsck.ext2
%{_sbindir}/fsck.ext3
%{_sbindir}/fsck.ext4
@ -294,6 +370,7 @@ done
%{_sbindir}/filefrag
%{_sbindir}/e2freefrag
%{_sbindir}/e4defrag
%{_sbindir}/e4crypt
%{_infodir}/libext2fs.info.gz
%{_mandir}/man1/chattr.1.gz
%{_mandir}/man1/lsattr.1.gz
@ -306,21 +383,33 @@ done
%defattr(-,root,root)
%doc README.SUSE
%files -n e2fsprogs-scrub
%defattr(-,root,root)
%config /etc/e2scrub.conf
%{_sbindir}/e2scrub
%{_sbindir}/e2scrub_all
%if %{with systemd}
%{_libdir}/e2fsprogs/
%{_libdir}/e2fsprogs/e2scrub_fail
%{_unitdir}/e2scrub@.service
%{_unitdir}/e2scrub_all.service
%{_unitdir}/e2scrub_all.timer
%{_unitdir}/e2scrub_fail@.service
%{_unitdir}/e2scrub_reap.service
%endif
%files -n libext2fs2
%defattr(-, root, root)
#UsrMerge
%if 0%{?suse_version} < 1550
/%{_lib}/libext2fs.so.*
/%{_lib}/libe2p.so.*
#EndUsrMerge
%endif
%{_libdir}/libext2fs.so.*
%{_libdir}/libe2p.so.*
%files -n libext2fs-devel
%defattr(-, root, root)
%{_libdir}/libext2fs.so
%ifarch %sparc
%{_libdir}/libext2fs.a
%endif
%{_libdir}/libe2p.so
/usr/include/ext2fs
/usr/include/e2p
@ -329,10 +418,10 @@ done
%files -n libcom_err2
%defattr(-, root, root)
#UsrMerge
%if 0%{?suse_version} < 1550
/%{_lib}/libcom_err.so.*
/%{_lib}/libss.so.*
#EndUsrMerge
%endif
%{_libdir}/libcom_err.so.*
%{_libdir}/libss.so.*
@ -353,4 +442,23 @@ done
%{_mandir}/man1/mk_cmds.1.gz
%{_mandir}/man3/com_err.3.gz
%files -n libcom_err-devel-static
%defattr(-, root, root)
%{_libdir}/libcom_err.a
%{_libdir}/libss.a
%files -n libext2fs-devel-static
%defattr(-, root, root)
%{_libdir}/libext2fs.a
%{_libdir}/libe2p.a
%else
%make_install
(cd %{buildroot}; find -L -type f | grep -v fuse2fs | xargs rm)
%files
%_bindir/fuse2fs
%{_mandir}/man1/fuse2fs.1.gz
%endif
%changelog

View File

@ -0,0 +1,19 @@
Index: e2fsprogs-1.46.4/scrub/e2scrub@.service.in
===================================================================
--- e2fsprogs-1.46.4.orig/scrub/e2scrub@.service.in
+++ e2fsprogs-1.46.4/scrub/e2scrub@.service.in
@@ -10,6 +10,14 @@ PrivateNetwork=true
ProtectSystem=true
ProtectHome=read-only
PrivateTmp=yes
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectHostname=true
+ProtectKernelTunables=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+# end of automatic additions
AmbientCapabilities=CAP_SYS_ADMIN CAP_SYS_RAWIO
NoNewPrivileges=yes
User=root

View File

@ -0,0 +1,22 @@
Index: e2fsprogs-1.46.3/scrub/e2scrub_all.service.in
===================================================================
--- e2fsprogs-1.46.3.orig/scrub/e2scrub_all.service.in
+++ e2fsprogs-1.46.3/scrub/e2scrub_all.service.in
@@ -6,6 +6,17 @@ ConditionCapability=CAP_SYS_RAWIO
Documentation=man:e2scrub_all(8)
[Service]
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectSystem=full
+ProtectHome=true
+ProtectHostname=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+# end of automatic additions
Type=oneshot
Environment=SERVICE_MODE=1
ExecStart=@root_sbindir@/e2scrub_all

View File

@ -0,0 +1,22 @@
Index: e2fsprogs-1.46.3/scrub/e2scrub_fail@.service.in
===================================================================
--- e2fsprogs-1.46.3.orig/scrub/e2scrub_fail@.service.in
+++ e2fsprogs-1.46.3/scrub/e2scrub_fail@.service.in
@@ -3,6 +3,17 @@ Description=Online ext4 Metadata Check F
Documentation=man:e2scrub(8)
[Service]
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectSystem=full
+ProtectHome=true
+ProtectHostname=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+# end of automatic additions
Type=oneshot
ExecStart=@pkglibdir@/e2scrub_fail "%I"
User=mail

View File

@ -0,0 +1,20 @@
Index: e2fsprogs-1.46.3/scrub/e2scrub_reap.service.in
===================================================================
--- e2fsprogs-1.46.3.orig/scrub/e2scrub_reap.service.in
+++ e2fsprogs-1.46.3/scrub/e2scrub_reap.service.in
@@ -11,6 +11,15 @@ PrivateNetwork=true
ProtectSystem=true
ProtectHome=read-only
PrivateTmp=yes
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectHostname=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+# end of automatic additions
AmbientCapabilities=CAP_SYS_ADMIN CAP_SYS_RAWIO
NoNewPrivileges=yes
User=root

View File

@ -1,13 +1,13 @@
Index: e2fsprogs-1.41.7/lib/et/compile_et.sh.in
Index: e2fsprogs-1.42.13/lib/et/compile_et.sh.in
===================================================================
--- e2fsprogs-1.41.7.orig/lib/et/compile_et.sh.in
+++ e2fsprogs-1.41.7/lib/et/compile_et.sh.in
--- e2fsprogs-1.42.13.orig/lib/et/compile_et.sh.in
+++ e2fsprogs-1.42.13/lib/et/compile_et.sh.in
@@ -51,7 +51,7 @@ if test -f ${BASE}.h && cmp -s ${BASE}.h
rm -f ${BASE}.h.$$
else
mv -f ${BASE}.h.$$ ${BASE}.h
- chmod -w ${BASE}.h
+# chmod -w ${BASE}.h
- chmod a-w ${BASE}.h
+# chmod a-w ${BASE}.h
fi
$AWK -f "${DIR}/et_c.awk" "outfile=${BASE}.c.$$" "outfn=${BASE}.c" "$ROOT.et"
if test -f ${BASE}.c && cmp -s ${BASE}.c.$$ ${BASE}.c ; then

View File

@ -1,36 +0,0 @@
From: Jan Kara <jack@suse.cz>
Date: Wed, 31 May 2017 14:49:18 +0200
Subject: [PATCH] libext2fs: Fix fsync(2) detection
References: bsc#1038194
For some reason lib/config.h.in was missing a definition of HAVE_FSYNC
and as a result lib/config.h never had HAVE_FSYNC defined. As a result
we never called fsync(2) for example from
lib/ext2fs/unix_io.c:unix_flush() when we finished creating filesystem
and could miss IO errors happening during creating of the filesystem.
Test generic/405 exposes this problem.
Fix the problem by defining HAVE_FSYNC in lib/config.h.in.
Signed-off-by: Jan Kara <jack@suse.cz>
---
lib/config.h.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/config.h.in b/lib/config.h.in
index 37d0c461338a..91e869e7d3d7 100644
--- a/lib/config.h.in
+++ b/lib/config.h.in
@@ -470,6 +470,9 @@
/* Define to 1 if you have the `sync_file_range' function. */
#undef HAVE_SYNC_FILE_RANGE
+/* Define to 1 if you have the 'fsync' function. */
+#undef HAVE_FSYNC
+
/* Define to 1 if you have the `sysconf' function. */
#undef HAVE_SYSCONF
--
2.12.3

View File

@ -1,56 +0,0 @@
From ab51d587bb9b229b1fade1afd02e1574c1ba5c76 Mon Sep 17 00:00:00 2001
From: Lukas Czerner <lczerner@redhat.com>
Date: Thu, 21 Apr 2022 19:31:48 +0200
Subject: [PATCH] libext2fs: add sanity check to extent manipulation
References: bsc#1198446 CVE-2022-1304
It is possible to have a corrupted extent tree in such a way that a leaf
node contains zero extents in it. Currently if that happens and we try
to traverse the tree we can end up accessing wrong data, or possibly
even uninitialized memory. Make sure we don't do that.
Additionally make sure that we have a sane number of bytes passed to
memmove() in ext2fs_extent_delete().
Note that e2fsck is currently unable to spot and fix such corruption in
pass1.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reported-by: Nils Bars <nils_bars@t-online.de>
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2068113
Addresses: CVE-2022-1304
Addresses-Debian-Bug: #1010263
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
lib/ext2fs/extent.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/ext2fs/extent.c b/lib/ext2fs/extent.c
index b324c7b0f8c8..1a206a16c13f 100644
--- a/lib/ext2fs/extent.c
+++ b/lib/ext2fs/extent.c
@@ -495,6 +495,10 @@ retry:
ext2fs_le16_to_cpu(eh->eh_entries);
newpath->max_entries = ext2fs_le16_to_cpu(eh->eh_max);
+ /* Make sure there is at least one extent present */
+ if (newpath->left <= 0)
+ return EXT2_ET_EXTENT_NO_DOWN;
+
if (path->left > 0) {
ix++;
newpath->end_blk = ext2fs_le32_to_cpu(ix->ei_block);
@@ -1630,6 +1634,10 @@ errcode_t ext2fs_extent_delete(ext2_extent_handle_t handle, int flags)
cp = path->curr;
+ /* Sanity check before memmove() */
+ if (path->left < 0)
+ return EXT2_ET_EXTENT_LEAF_BAD;
+
if (path->left) {
memmove(cp, cp + sizeof(struct ext3_extent_idx),
path->left * sizeof(struct ext3_extent_idx));
--
2.34.1

View File

@ -1,58 +0,0 @@
From f66e6ce4446738c2c7f43d41988a3eb73347e2f5 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Sat, 9 Aug 2014 12:24:54 -0400
Subject: [PATCH] libext2fs: avoid buffer overflow if s_first_meta_bg is too
big
References: bsc#915402 CVE-2015-0247
If s_first_meta_bg is greater than the of number block group
descriptor blocks, then reading or writing the block group descriptors
will end up overruning the memory buffer allocated for the
descriptors. Fix this by limiting first_meta_bg to no more than
fs->desc_blocks. This doesn't correct the bad s_first_meta_bg value,
but it avoids causing the e2fsprogs userspace programs from
potentially crashing.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Acked-by: Jan Kara <jack@suse.cz>
---
lib/ext2fs/closefs.c | 6 ++++--
lib/ext2fs/openfs.c | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
Index: e2fsprogs-1.42.11/lib/ext2fs/closefs.c
===================================================================
--- e2fsprogs-1.42.11.orig/lib/ext2fs/closefs.c
+++ e2fsprogs-1.42.11/lib/ext2fs/closefs.c
@@ -344,9 +344,11 @@ errcode_t ext2fs_flush2(ext2_filsys fs,
* superblocks and group descriptors.
*/
group_ptr = (char *) group_shadow;
- if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG)
+ if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) {
old_desc_blocks = fs->super->s_first_meta_bg;
- else
+ if (old_desc_blocks > fs->super->s_first_meta_bg)
+ old_desc_blocks = fs->desc_blocks;
+ } else
old_desc_blocks = fs->desc_blocks;
ext2fs_numeric_progress_init(fs, &progress, NULL,
Index: e2fsprogs-1.42.11/lib/ext2fs/openfs.c
===================================================================
--- e2fsprogs-1.42.11.orig/lib/ext2fs/openfs.c
+++ e2fsprogs-1.42.11/lib/ext2fs/openfs.c
@@ -378,9 +378,11 @@ errcode_t ext2fs_open2(const char *name,
#ifdef WORDS_BIGENDIAN
groups_per_block = EXT2_DESC_PER_BLOCK(fs->super);
#endif
- if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG)
+ if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) {
first_meta_bg = fs->super->s_first_meta_bg;
- else
+ if (first_meta_bg > fs->desc_blocks)
+ first_meta_bg = fs->desc_blocks;
+ } else
first_meta_bg = fs->desc_blocks;
if (first_meta_bg) {
retval = io_channel_read_blk(fs->io, group_block +

View File

@ -1,86 +0,0 @@
From: Eric Sandeen <sandeen@redhat.com>
Date: Tue, 20 Dec 2016 09:23:29 -0600
Subject: [PATCH] libext2fs: don't ignore fsync errors
Git-commit: 025d31b17a67953ce96741588bd911e6e66b6e03
References: bsc#1038194
Today, if mke2fs experiences IO errors (say, on a thin device
which filled up during mkfs), mke2fs is silent and returns
success even though the filesystem was not properly created.
Catch errors from the io_channel_flush() callchain to
fix this up. Fix formatting of the printed error as
well:
...
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information:
Warning, had trouble writing out superblocks.
# echo $?
5
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Acked-by: Jan Kara <jack@suse.cz>
---
lib/ext2fs/closefs.c | 10 ++++++++--
lib/ext2fs/unix_io.c | 3 ++-
misc/mke2fs.c | 2 +-
3 files changed, 11 insertions(+), 4 deletions(-)
Index: e2fsprogs-1.42.11/lib/ext2fs/closefs.c
===================================================================
--- e2fsprogs-1.42.11.orig/lib/ext2fs/closefs.c
+++ e2fsprogs-1.42.11/lib/ext2fs/closefs.c
@@ -418,16 +418,22 @@ write_primary_superblock_only:
ext2fs_swap_super(super_shadow);
#endif
- if (!(flags & EXT2_FLAG_FLUSH_NO_SYNC))
+ if (!(flags & EXT2_FLAG_FLUSH_NO_SYNC)) {
retval = io_channel_flush(fs->io);
+ if (retval)
+ goto errout;
+ }
retval = write_primary_superblock(fs, super_shadow);
if (retval)
goto errout;
fs->flags &= ~EXT2_FLAG_DIRTY;
- if (!(flags & EXT2_FLAG_FLUSH_NO_SYNC))
+ if (!(flags & EXT2_FLAG_FLUSH_NO_SYNC)) {
retval = io_channel_flush(fs->io);
+ if (retval)
+ goto errout;
+ }
errout:
fs->super->s_state = fs_state;
#ifdef WORDS_BIGENDIAN
Index: e2fsprogs-1.42.11/lib/ext2fs/unix_io.c
===================================================================
--- e2fsprogs-1.42.11.orig/lib/ext2fs/unix_io.c
+++ e2fsprogs-1.42.11/lib/ext2fs/unix_io.c
@@ -843,7 +843,8 @@ static errcode_t unix_flush(io_channel c
#ifndef NO_IO_CACHE
retval = flush_cached_blocks(channel, data, 0);
#endif
- fsync(data->dev);
+ if (!retval && fsync(data->dev) != 0)
+ return errno;
return retval;
}
Index: e2fsprogs-1.42.11/misc/mke2fs.c
===================================================================
--- e2fsprogs-1.42.11.orig/misc/mke2fs.c
+++ e2fsprogs-1.42.11/misc/mke2fs.c
@@ -2925,7 +2925,7 @@ no_journal:
retval = ext2fs_close_free(&fs);
if (retval) {
fprintf(stderr, "%s",
- _("\nWarning, had trouble writing out superblocks."));
+ _("\nWarning, had trouble writing out superblocks.\n"));
} else if (!quiet) {
printf("%s", _("done\n\n"));
if (!getenv("MKE2FS_SKIP_CHECK_MSG"))

View File

@ -1,58 +0,0 @@
From 49d0fe2a14f2a23da2fe299643379b8c1d37df73 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Fri, 6 Feb 2015 12:46:39 -0500
Subject: [PATCH] libext2fs: fix potential buffer overflow in closefs()
References: bsc#918346 CVE-2015-1572
The bug fix in f66e6ce4446: "libext2fs: avoid buffer overflow if
s_first_meta_bg is too big" had a typo in the fix for
ext2fs_closefs(). In practice most of the security exposure was from
the openfs path, since this meant if there was a carefully crafted
file system, buffer overrun would be triggered when the file system was
opened.
However, if corrupted file system didn't trip over some corruption
check, and then the file system was modified via tune2fs or debugfs,
such that the superblock was marked dirty and then written out via the
closefs() path, it's possible that the buffer overrun could be
triggered when the file system is closed.
Also clear up a signed vs unsigned warning while we're at it.
Thanks to Nick Kralevich <nnk@google.com> for asking me to look at
compiler warning in the code in question, which led me to notice the
bug in f66e6ce4446.
Addresses: CVE-2015-1572
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Acked-by: Jan Kara <jack@suse.cz>
---
lib/ext2fs/closefs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/ext2fs/closefs.c b/lib/ext2fs/closefs.c
index 1f9911311a1a..ab5b2fb2365e 100644
--- a/lib/ext2fs/closefs.c
+++ b/lib/ext2fs/closefs.c
@@ -287,7 +287,7 @@ errcode_t ext2fs_flush2(ext2_filsys fs, int flags)
dgrp_t j;
#endif
char *group_ptr;
- int old_desc_blocks;
+ blk64_t old_desc_blocks;
struct ext2fs_numeric_progress_struct progress;
EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
@@ -346,7 +346,7 @@ errcode_t ext2fs_flush2(ext2_filsys fs, int flags)
group_ptr = (char *) group_shadow;
if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) {
old_desc_blocks = fs->super->s_first_meta_bg;
- if (old_desc_blocks > fs->super->s_first_meta_bg)
+ if (old_desc_blocks > fs->desc_blocks)
old_desc_blocks = fs->desc_blocks;
} else
old_desc_blocks = fs->desc_blocks;
--
2.1.4

View File

@ -1,808 +0,0 @@
From b1988056fb83dc29d7b05e31f7ccef261dfcadf5 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Sun, 3 Aug 2014 14:00:47 -0400
Subject: [PATCH 2/2] libext2fs: place metadata blocks in the last flex_bg so
they are contiguous
Place the allocation bitmaps and inode table blocks so they are
adjacent, even in the last flexbg.
Previously, after running "mke2fs -t ext4 DEV 286720", the layout of
the last few block groups would look like this:
Group 32: (Blocks 262145-270336) [INODE_UNINIT, ITABLE_ZEROED]
Block bitmap at 262145 (+0), Inode bitmap at 262161 (+16)
Inode table at 262177-262432 (+32)
Group 33: (Blocks 270337-278528) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
Block bitmap at 262146 (bg #32 + 1), Inode bitmap at 262162 (bg #32 + 17)
Inode table at 262433-262688 (bg #32 + 288)
Group 34: (Blocks 278529-286719) [INODE_UNINIT, ITABLE_ZEROED]
Block bitmap at 262147 (bg #32 + 2), Inode bitmap at 262163 (bg #32 + 18)
Inode table at 262689-262944 (bg #32 + 544)
Now, they look like this:
Group 32: (Blocks 262145-270336) [INODE_UNINIT, ITABLE_ZEROED]
Block bitmap at 262145 (+0), Inode bitmap at 262148 (+3)
Inode table at 262151-262406 (+6)
Group 33: (Blocks 270337-278528) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
Block bitmap at 262146 (bg #32 + 1), Inode bitmap at 262149 (bg #32 + 4)
Inode table at 262407-262662 (bg #32 + 262)
Group 34: (Blocks 278529-286719) [INODE_UNINIT, ITABLE_ZEROED]
Block bitmap at 262147 (bg #32 + 2), Inode bitmap at 262150 (bg #32 + 5)
Inode table at 262663-262918 (bg #32 + 518)
This reduces the free space fragmentation in a freshly created file
system. It also allows the following mke2fs command to succeed:
mke2fs -t ext4 -b 4096 -O ^resize_inode -G $((2**20)) DEV 2130483
(Note that while this allows people to run mke2fs with insanely large
flexbg sizes, this is not a recommended practice, as the kernel may
refuse to resize such a file system while mounted, since it currently
tries to allocate an in-memory data structure based on the size of the
flexbg, and so a file system with a very large flexbg size will cause
the memory allocation to fail. This will hopefully be fixed in a
future kernel release, but if the goal is to force all of the metadata
blocks to be at the beginning of the file system, it's better to use
the packed_meta_blocks configuration parameter in mke2fs.conf.)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
lib/ext2fs/alloc_tables.c | 18 ++-
tests/m_bigjournal/expect.1 | 338 ++++++++++++++++++++++----------------------
2 files changed, 184 insertions(+), 172 deletions(-)
diff --git a/lib/ext2fs/alloc_tables.c b/lib/ext2fs/alloc_tables.c
index 85d49324a6e1..3760d616dfbc 100644
--- a/lib/ext2fs/alloc_tables.c
+++ b/lib/ext2fs/alloc_tables.c
@@ -87,7 +87,7 @@ errcode_t ext2fs_allocate_group_table(ext2_filsys fs, dgrp_t group,
errcode_t retval;
blk64_t group_blk, start_blk, last_blk, new_blk;
dgrp_t last_grp = 0;
- int rem_grps = 0, flexbg_size = 0;
+ int rem_grps = 0, flexbg_size = 0, table_offset = 0;
group_blk = ext2fs_group_first_block2(fs, group);
last_blk = ext2fs_group_last_block2(fs, group);
@@ -124,8 +124,20 @@ errcode_t ext2fs_allocate_group_table(ext2_filsys fs, dgrp_t group,
if (flexbg_size) {
blk64_t prev_block = 0;
+ table_offset = flexbg_size;
if (group % flexbg_size)
prev_block = ext2fs_block_bitmap_loc(fs, group - 1) + 1;
+ else if (last_grp == fs->group_desc_count-1) {
+ /*
+ * If we are allocating for the last flex_bg
+ * keep the metadata tables contiguous
+ */
+ table_offset = last_grp & (flexbg_size - 1);
+ if (table_offset == 0)
+ table_offset = flexbg_size;
+ else
+ table_offset++;
+ }
/* FIXME: Take backup group descriptor blocks into account
* if the flexbg allocations will grow to overlap them... */
start_blk = flexbg_offset(fs, group, prev_block, bmap,
@@ -158,7 +170,7 @@ errcode_t ext2fs_allocate_group_table(ext2_filsys fs, dgrp_t group,
prev_block = ext2fs_inode_bitmap_loc(fs, group - 1) + 1;
else
prev_block = ext2fs_block_bitmap_loc(fs, group) +
- flexbg_size;
+ table_offset;
/* FIXME: Take backup group descriptor blocks into account
* if the flexbg allocations will grow to overlap them... */
start_blk = flexbg_offset(fs, group, prev_block, bmap,
@@ -196,7 +208,7 @@ errcode_t ext2fs_allocate_group_table(ext2_filsys fs, dgrp_t group,
fs->inode_blocks_per_group;
else
prev_block = ext2fs_inode_bitmap_loc(fs, group) +
- flexbg_size;
+ table_offset;
/* FIXME: Take backup group descriptor blocks into account
* if the flexbg allocations will grow to overlap them... */
diff --git a/tests/m_bigjournal/expect.1 b/tests/m_bigjournal/expect.1
index b45d02c05ef1..72467396b49e 100644
--- a/tests/m_bigjournal/expect.1
+++ b/tests/m_bigjournal/expect.1
@@ -50,524 +50,524 @@ Journal start: 0
Group 0: (Blocks 0-32767)
Primary superblock at 0, Group descriptors at 1-1
Reserved GDT blocks at 2-672
- Block bitmap at 673 (+673), Inode bitmap at 1185 (+1185)
- Inode table at 1697-1697 (+1697)
+ Block bitmap at 673 (+673), Inode bitmap at 757 (+757)
+ Inode table at 841-841 (+841)
31836 free blocks, 5 free inodes, 2 directories, 5 unused inodes
- Free blocks: 764-1184, 1269-1696, 1781-32767
+ Free blocks: 932-32767
Free inodes: 12-16
Group 1: (Blocks 32768-65535) [INODE_UNINIT, BLOCK_UNINIT]
Backup superblock at 32768, Group descriptors at 32769-32769
Reserved GDT blocks at 32770-33440
- Block bitmap at 674 (bg #0 + 674), Inode bitmap at 1186 (bg #0 + 1186)
- Inode table at 1698-1698 (bg #0 + 1698)
+ Block bitmap at 674 (bg #0 + 674), Inode bitmap at 758 (bg #0 + 758)
+ Inode table at 842-842 (bg #0 + 842)
32095 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 33441-65535
Free inodes: 17-32
Group 2: (Blocks 65536-98303) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 675 (bg #0 + 675), Inode bitmap at 1187 (bg #0 + 1187)
- Inode table at 1699-1699 (bg #0 + 1699)
+ Block bitmap at 675 (bg #0 + 675), Inode bitmap at 759 (bg #0 + 759)
+ Inode table at 843-843 (bg #0 + 843)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 65536-98303
Free inodes: 33-48
Group 3: (Blocks 98304-131071) [INODE_UNINIT, BLOCK_UNINIT]
Backup superblock at 98304, Group descriptors at 98305-98305
Reserved GDT blocks at 98306-98976
- Block bitmap at 676 (bg #0 + 676), Inode bitmap at 1188 (bg #0 + 1188)
- Inode table at 1700-1700 (bg #0 + 1700)
+ Block bitmap at 676 (bg #0 + 676), Inode bitmap at 760 (bg #0 + 760)
+ Inode table at 844-844 (bg #0 + 844)
32095 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 98977-131071
Free inodes: 49-64
Group 4: (Blocks 131072-163839) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 677 (bg #0 + 677), Inode bitmap at 1189 (bg #0 + 1189)
- Inode table at 1701-1701 (bg #0 + 1701)
+ Block bitmap at 677 (bg #0 + 677), Inode bitmap at 761 (bg #0 + 761)
+ Inode table at 845-845 (bg #0 + 845)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 131072-163839
Free inodes: 65-80
Group 5: (Blocks 163840-196607) [INODE_UNINIT, BLOCK_UNINIT]
Backup superblock at 163840, Group descriptors at 163841-163841
Reserved GDT blocks at 163842-164512
- Block bitmap at 678 (bg #0 + 678), Inode bitmap at 1190 (bg #0 + 1190)
- Inode table at 1702-1702 (bg #0 + 1702)
+ Block bitmap at 678 (bg #0 + 678), Inode bitmap at 762 (bg #0 + 762)
+ Inode table at 846-846 (bg #0 + 846)
32095 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 164513-196607
Free inodes: 81-96
Group 6: (Blocks 196608-229375) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 679 (bg #0 + 679), Inode bitmap at 1191 (bg #0 + 1191)
- Inode table at 1703-1703 (bg #0 + 1703)
+ Block bitmap at 679 (bg #0 + 679), Inode bitmap at 763 (bg #0 + 763)
+ Inode table at 847-847 (bg #0 + 847)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 196608-229375
Free inodes: 97-112
Group 7: (Blocks 229376-262143) [INODE_UNINIT, BLOCK_UNINIT]
Backup superblock at 229376, Group descriptors at 229377-229377
Reserved GDT blocks at 229378-230048
- Block bitmap at 680 (bg #0 + 680), Inode bitmap at 1192 (bg #0 + 1192)
- Inode table at 1704-1704 (bg #0 + 1704)
+ Block bitmap at 680 (bg #0 + 680), Inode bitmap at 764 (bg #0 + 764)
+ Inode table at 848-848 (bg #0 + 848)
32095 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 230049-262143
Free inodes: 113-128
Group 8: (Blocks 262144-294911) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 681 (bg #0 + 681), Inode bitmap at 1193 (bg #0 + 1193)
- Inode table at 1705-1705 (bg #0 + 1705)
+ Block bitmap at 681 (bg #0 + 681), Inode bitmap at 765 (bg #0 + 765)
+ Inode table at 849-849 (bg #0 + 849)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 262144-294911
Free inodes: 129-144
Group 9: (Blocks 294912-327679) [INODE_UNINIT, BLOCK_UNINIT]
Backup superblock at 294912, Group descriptors at 294913-294913
Reserved GDT blocks at 294914-295584
- Block bitmap at 682 (bg #0 + 682), Inode bitmap at 1194 (bg #0 + 1194)
- Inode table at 1706-1706 (bg #0 + 1706)
+ Block bitmap at 682 (bg #0 + 682), Inode bitmap at 766 (bg #0 + 766)
+ Inode table at 850-850 (bg #0 + 850)
32095 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 295585-327679
Free inodes: 145-160
Group 10: (Blocks 327680-360447) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 683 (bg #0 + 683), Inode bitmap at 1195 (bg #0 + 1195)
- Inode table at 1707-1707 (bg #0 + 1707)
+ Block bitmap at 683 (bg #0 + 683), Inode bitmap at 767 (bg #0 + 767)
+ Inode table at 851-851 (bg #0 + 851)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 327680-360447
Free inodes: 161-176
Group 11: (Blocks 360448-393215) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 684 (bg #0 + 684), Inode bitmap at 1196 (bg #0 + 1196)
- Inode table at 1708-1708 (bg #0 + 1708)
+ Block bitmap at 684 (bg #0 + 684), Inode bitmap at 768 (bg #0 + 768)
+ Inode table at 852-852 (bg #0 + 852)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 360448-393215
Free inodes: 177-192
Group 12: (Blocks 393216-425983) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 685 (bg #0 + 685), Inode bitmap at 1197 (bg #0 + 1197)
- Inode table at 1709-1709 (bg #0 + 1709)
+ Block bitmap at 685 (bg #0 + 685), Inode bitmap at 769 (bg #0 + 769)
+ Inode table at 853-853 (bg #0 + 853)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 393216-425983
Free inodes: 193-208
Group 13: (Blocks 425984-458751) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 686 (bg #0 + 686), Inode bitmap at 1198 (bg #0 + 1198)
- Inode table at 1710-1710 (bg #0 + 1710)
+ Block bitmap at 686 (bg #0 + 686), Inode bitmap at 770 (bg #0 + 770)
+ Inode table at 854-854 (bg #0 + 854)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 425984-458751
Free inodes: 209-224
Group 14: (Blocks 458752-491519) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 687 (bg #0 + 687), Inode bitmap at 1199 (bg #0 + 1199)
- Inode table at 1711-1711 (bg #0 + 1711)
+ Block bitmap at 687 (bg #0 + 687), Inode bitmap at 771 (bg #0 + 771)
+ Inode table at 855-855 (bg #0 + 855)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 458752-491519
Free inodes: 225-240
Group 15: (Blocks 491520-524287) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 688 (bg #0 + 688), Inode bitmap at 1200 (bg #0 + 1200)
- Inode table at 1712-1712 (bg #0 + 1712)
+ Block bitmap at 688 (bg #0 + 688), Inode bitmap at 772 (bg #0 + 772)
+ Inode table at 856-856 (bg #0 + 856)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 491520-524287
Free inodes: 241-256
Group 16: (Blocks 524288-557055) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 689 (bg #0 + 689), Inode bitmap at 1201 (bg #0 + 1201)
- Inode table at 1713-1713 (bg #0 + 1713)
+ Block bitmap at 689 (bg #0 + 689), Inode bitmap at 773 (bg #0 + 773)
+ Inode table at 857-857 (bg #0 + 857)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 524288-557055
Free inodes: 257-272
Group 17: (Blocks 557056-589823) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 690 (bg #0 + 690), Inode bitmap at 1202 (bg #0 + 1202)
- Inode table at 1714-1714 (bg #0 + 1714)
+ Block bitmap at 690 (bg #0 + 690), Inode bitmap at 774 (bg #0 + 774)
+ Inode table at 858-858 (bg #0 + 858)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 557056-589823
Free inodes: 273-288
Group 18: (Blocks 589824-622591) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 691 (bg #0 + 691), Inode bitmap at 1203 (bg #0 + 1203)
- Inode table at 1715-1715 (bg #0 + 1715)
+ Block bitmap at 691 (bg #0 + 691), Inode bitmap at 775 (bg #0 + 775)
+ Inode table at 859-859 (bg #0 + 859)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 589824-622591
Free inodes: 289-304
Group 19: (Blocks 622592-655359) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 692 (bg #0 + 692), Inode bitmap at 1204 (bg #0 + 1204)
- Inode table at 1716-1716 (bg #0 + 1716)
+ Block bitmap at 692 (bg #0 + 692), Inode bitmap at 776 (bg #0 + 776)
+ Inode table at 860-860 (bg #0 + 860)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 622592-655359
Free inodes: 305-320
Group 20: (Blocks 655360-688127) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 693 (bg #0 + 693), Inode bitmap at 1205 (bg #0 + 1205)
- Inode table at 1717-1717 (bg #0 + 1717)
+ Block bitmap at 693 (bg #0 + 693), Inode bitmap at 777 (bg #0 + 777)
+ Inode table at 861-861 (bg #0 + 861)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 655360-688127
Free inodes: 321-336
Group 21: (Blocks 688128-720895) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 694 (bg #0 + 694), Inode bitmap at 1206 (bg #0 + 1206)
- Inode table at 1718-1718 (bg #0 + 1718)
+ Block bitmap at 694 (bg #0 + 694), Inode bitmap at 778 (bg #0 + 778)
+ Inode table at 862-862 (bg #0 + 862)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 688128-720895
Free inodes: 337-352
Group 22: (Blocks 720896-753663) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 695 (bg #0 + 695), Inode bitmap at 1207 (bg #0 + 1207)
- Inode table at 1719-1719 (bg #0 + 1719)
+ Block bitmap at 695 (bg #0 + 695), Inode bitmap at 779 (bg #0 + 779)
+ Inode table at 863-863 (bg #0 + 863)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 720896-753663
Free inodes: 353-368
Group 23: (Blocks 753664-786431) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 696 (bg #0 + 696), Inode bitmap at 1208 (bg #0 + 1208)
- Inode table at 1720-1720 (bg #0 + 1720)
+ Block bitmap at 696 (bg #0 + 696), Inode bitmap at 780 (bg #0 + 780)
+ Inode table at 864-864 (bg #0 + 864)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 753664-786431
Free inodes: 369-384
Group 24: (Blocks 786432-819199) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 697 (bg #0 + 697), Inode bitmap at 1209 (bg #0 + 1209)
- Inode table at 1721-1721 (bg #0 + 1721)
+ Block bitmap at 697 (bg #0 + 697), Inode bitmap at 781 (bg #0 + 781)
+ Inode table at 865-865 (bg #0 + 865)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 786432-819199
Free inodes: 385-400
Group 25: (Blocks 819200-851967) [INODE_UNINIT, BLOCK_UNINIT]
Backup superblock at 819200, Group descriptors at 819201-819201
Reserved GDT blocks at 819202-819872
- Block bitmap at 698 (bg #0 + 698), Inode bitmap at 1210 (bg #0 + 1210)
- Inode table at 1722-1722 (bg #0 + 1722)
+ Block bitmap at 698 (bg #0 + 698), Inode bitmap at 782 (bg #0 + 782)
+ Inode table at 866-866 (bg #0 + 866)
32095 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 819873-851967
Free inodes: 401-416
Group 26: (Blocks 851968-884735) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 699 (bg #0 + 699), Inode bitmap at 1211 (bg #0 + 1211)
- Inode table at 1723-1723 (bg #0 + 1723)
+ Block bitmap at 699 (bg #0 + 699), Inode bitmap at 783 (bg #0 + 783)
+ Inode table at 867-867 (bg #0 + 867)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 851968-884735
Free inodes: 417-432
Group 27: (Blocks 884736-917503) [INODE_UNINIT, BLOCK_UNINIT]
Backup superblock at 884736, Group descriptors at 884737-884737
Reserved GDT blocks at 884738-885408
- Block bitmap at 700 (bg #0 + 700), Inode bitmap at 1212 (bg #0 + 1212)
- Inode table at 1724-1724 (bg #0 + 1724)
+ Block bitmap at 700 (bg #0 + 700), Inode bitmap at 784 (bg #0 + 784)
+ Inode table at 868-868 (bg #0 + 868)
32095 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 885409-917503
Free inodes: 433-448
Group 28: (Blocks 917504-950271) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 701 (bg #0 + 701), Inode bitmap at 1213 (bg #0 + 1213)
- Inode table at 1725-1725 (bg #0 + 1725)
+ Block bitmap at 701 (bg #0 + 701), Inode bitmap at 785 (bg #0 + 785)
+ Inode table at 869-869 (bg #0 + 869)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 917504-950271
Free inodes: 449-464
Group 29: (Blocks 950272-983039) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 702 (bg #0 + 702), Inode bitmap at 1214 (bg #0 + 1214)
- Inode table at 1726-1726 (bg #0 + 1726)
+ Block bitmap at 702 (bg #0 + 702), Inode bitmap at 786 (bg #0 + 786)
+ Inode table at 870-870 (bg #0 + 870)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 950272-983039
Free inodes: 465-480
Group 30: (Blocks 983040-1015807) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 703 (bg #0 + 703), Inode bitmap at 1215 (bg #0 + 1215)
- Inode table at 1727-1727 (bg #0 + 1727)
+ Block bitmap at 703 (bg #0 + 703), Inode bitmap at 787 (bg #0 + 787)
+ Inode table at 871-871 (bg #0 + 871)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 983040-1015807
Free inodes: 481-496
Group 31: (Blocks 1015808-1048575) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 704 (bg #0 + 704), Inode bitmap at 1216 (bg #0 + 1216)
- Inode table at 1728-1728 (bg #0 + 1728)
+ Block bitmap at 704 (bg #0 + 704), Inode bitmap at 788 (bg #0 + 788)
+ Inode table at 872-872 (bg #0 + 872)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 1015808-1048575
Free inodes: 497-512
Group 32: (Blocks 1048576-1081343) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 705 (bg #0 + 705), Inode bitmap at 1217 (bg #0 + 1217)
- Inode table at 1729-1729 (bg #0 + 1729)
+ Block bitmap at 705 (bg #0 + 705), Inode bitmap at 789 (bg #0 + 789)
+ Inode table at 873-873 (bg #0 + 873)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 1048576-1081343
Free inodes: 513-528
Group 33: (Blocks 1081344-1114111) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 706 (bg #0 + 706), Inode bitmap at 1218 (bg #0 + 1218)
- Inode table at 1730-1730 (bg #0 + 1730)
+ Block bitmap at 706 (bg #0 + 706), Inode bitmap at 790 (bg #0 + 790)
+ Inode table at 874-874 (bg #0 + 874)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 1081344-1114111
Free inodes: 529-544
Group 34: (Blocks 1114112-1146879) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 707 (bg #0 + 707), Inode bitmap at 1219 (bg #0 + 1219)
- Inode table at 1731-1731 (bg #0 + 1731)
+ Block bitmap at 707 (bg #0 + 707), Inode bitmap at 791 (bg #0 + 791)
+ Inode table at 875-875 (bg #0 + 875)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 1114112-1146879
Free inodes: 545-560
Group 35: (Blocks 1146880-1179647) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 708 (bg #0 + 708), Inode bitmap at 1220 (bg #0 + 1220)
- Inode table at 1732-1732 (bg #0 + 1732)
+ Block bitmap at 708 (bg #0 + 708), Inode bitmap at 792 (bg #0 + 792)
+ Inode table at 876-876 (bg #0 + 876)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 1146880-1179647
Free inodes: 561-576
Group 36: (Blocks 1179648-1212415) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 709 (bg #0 + 709), Inode bitmap at 1221 (bg #0 + 1221)
- Inode table at 1733-1733 (bg #0 + 1733)
+ Block bitmap at 709 (bg #0 + 709), Inode bitmap at 793 (bg #0 + 793)
+ Inode table at 877-877 (bg #0 + 877)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 1179648-1212415
Free inodes: 577-592
Group 37: (Blocks 1212416-1245183) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 710 (bg #0 + 710), Inode bitmap at 1222 (bg #0 + 1222)
- Inode table at 1734-1734 (bg #0 + 1734)
+ Block bitmap at 710 (bg #0 + 710), Inode bitmap at 794 (bg #0 + 794)
+ Inode table at 878-878 (bg #0 + 878)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 1212416-1245183
Free inodes: 593-608
Group 38: (Blocks 1245184-1277951) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 711 (bg #0 + 711), Inode bitmap at 1223 (bg #0 + 1223)
- Inode table at 1735-1735 (bg #0 + 1735)
+ Block bitmap at 711 (bg #0 + 711), Inode bitmap at 795 (bg #0 + 795)
+ Inode table at 879-879 (bg #0 + 879)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 1245184-1277951
Free inodes: 609-624
Group 39: (Blocks 1277952-1310719) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 712 (bg #0 + 712), Inode bitmap at 1224 (bg #0 + 1224)
- Inode table at 1736-1736 (bg #0 + 1736)
+ Block bitmap at 712 (bg #0 + 712), Inode bitmap at 796 (bg #0 + 796)
+ Inode table at 880-880 (bg #0 + 880)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 1277952-1310719
Free inodes: 625-640
Group 40: (Blocks 1310720-1343487) [INODE_UNINIT]
- Block bitmap at 713 (bg #0 + 713), Inode bitmap at 1225 (bg #0 + 1225)
- Inode table at 1737-1737 (bg #0 + 1737)
+ Block bitmap at 713 (bg #0 + 713), Inode bitmap at 797 (bg #0 + 797)
+ Inode table at 881-881 (bg #0 + 881)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 641-656
Group 41: (Blocks 1343488-1376255) [INODE_UNINIT]
- Block bitmap at 714 (bg #0 + 714), Inode bitmap at 1226 (bg #0 + 1226)
- Inode table at 1738-1738 (bg #0 + 1738)
+ Block bitmap at 714 (bg #0 + 714), Inode bitmap at 798 (bg #0 + 798)
+ Inode table at 882-882 (bg #0 + 882)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 657-672
Group 42: (Blocks 1376256-1409023) [INODE_UNINIT]
- Block bitmap at 715 (bg #0 + 715), Inode bitmap at 1227 (bg #0 + 1227)
- Inode table at 1739-1739 (bg #0 + 1739)
+ Block bitmap at 715 (bg #0 + 715), Inode bitmap at 799 (bg #0 + 799)
+ Inode table at 883-883 (bg #0 + 883)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 673-688
Group 43: (Blocks 1409024-1441791) [INODE_UNINIT]
- Block bitmap at 716 (bg #0 + 716), Inode bitmap at 1228 (bg #0 + 1228)
- Inode table at 1740-1740 (bg #0 + 1740)
+ Block bitmap at 716 (bg #0 + 716), Inode bitmap at 800 (bg #0 + 800)
+ Inode table at 884-884 (bg #0 + 884)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 689-704
Group 44: (Blocks 1441792-1474559) [INODE_UNINIT]
- Block bitmap at 717 (bg #0 + 717), Inode bitmap at 1229 (bg #0 + 1229)
- Inode table at 1741-1741 (bg #0 + 1741)
+ Block bitmap at 717 (bg #0 + 717), Inode bitmap at 801 (bg #0 + 801)
+ Inode table at 885-885 (bg #0 + 885)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 705-720
Group 45: (Blocks 1474560-1507327) [INODE_UNINIT]
- Block bitmap at 718 (bg #0 + 718), Inode bitmap at 1230 (bg #0 + 1230)
- Inode table at 1742-1742 (bg #0 + 1742)
+ Block bitmap at 718 (bg #0 + 718), Inode bitmap at 802 (bg #0 + 802)
+ Inode table at 886-886 (bg #0 + 886)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 721-736
Group 46: (Blocks 1507328-1540095) [INODE_UNINIT]
- Block bitmap at 719 (bg #0 + 719), Inode bitmap at 1231 (bg #0 + 1231)
- Inode table at 1743-1743 (bg #0 + 1743)
+ Block bitmap at 719 (bg #0 + 719), Inode bitmap at 803 (bg #0 + 803)
+ Inode table at 887-887 (bg #0 + 887)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 737-752
Group 47: (Blocks 1540096-1572863) [INODE_UNINIT]
- Block bitmap at 720 (bg #0 + 720), Inode bitmap at 1232 (bg #0 + 1232)
- Inode table at 1744-1744 (bg #0 + 1744)
+ Block bitmap at 720 (bg #0 + 720), Inode bitmap at 804 (bg #0 + 804)
+ Inode table at 888-888 (bg #0 + 888)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 753-768
Group 48: (Blocks 1572864-1605631) [INODE_UNINIT]
- Block bitmap at 721 (bg #0 + 721), Inode bitmap at 1233 (bg #0 + 1233)
- Inode table at 1745-1745 (bg #0 + 1745)
+ Block bitmap at 721 (bg #0 + 721), Inode bitmap at 805 (bg #0 + 805)
+ Inode table at 889-889 (bg #0 + 889)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 769-784
Group 49: (Blocks 1605632-1638399) [INODE_UNINIT]
Backup superblock at 1605632, Group descriptors at 1605633-1605633
Reserved GDT blocks at 1605634-1606304
- Block bitmap at 722 (bg #0 + 722), Inode bitmap at 1234 (bg #0 + 1234)
- Inode table at 1746-1746 (bg #0 + 1746)
+ Block bitmap at 722 (bg #0 + 722), Inode bitmap at 806 (bg #0 + 806)
+ Inode table at 890-890 (bg #0 + 890)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 785-800
Group 50: (Blocks 1638400-1671167) [INODE_UNINIT]
- Block bitmap at 723 (bg #0 + 723), Inode bitmap at 1235 (bg #0 + 1235)
- Inode table at 1747-1747 (bg #0 + 1747)
+ Block bitmap at 723 (bg #0 + 723), Inode bitmap at 807 (bg #0 + 807)
+ Inode table at 891-891 (bg #0 + 891)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 801-816
Group 51: (Blocks 1671168-1703935) [INODE_UNINIT]
- Block bitmap at 724 (bg #0 + 724), Inode bitmap at 1236 (bg #0 + 1236)
- Inode table at 1748-1748 (bg #0 + 1748)
+ Block bitmap at 724 (bg #0 + 724), Inode bitmap at 808 (bg #0 + 808)
+ Inode table at 892-892 (bg #0 + 892)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 817-832
Group 52: (Blocks 1703936-1736703) [INODE_UNINIT]
- Block bitmap at 725 (bg #0 + 725), Inode bitmap at 1237 (bg #0 + 1237)
- Inode table at 1749-1749 (bg #0 + 1749)
+ Block bitmap at 725 (bg #0 + 725), Inode bitmap at 809 (bg #0 + 809)
+ Inode table at 893-893 (bg #0 + 893)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 833-848
Group 53: (Blocks 1736704-1769471) [INODE_UNINIT]
- Block bitmap at 726 (bg #0 + 726), Inode bitmap at 1238 (bg #0 + 1238)
- Inode table at 1750-1750 (bg #0 + 1750)
+ Block bitmap at 726 (bg #0 + 726), Inode bitmap at 810 (bg #0 + 810)
+ Inode table at 894-894 (bg #0 + 894)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 849-864
Group 54: (Blocks 1769472-1802239) [INODE_UNINIT]
- Block bitmap at 727 (bg #0 + 727), Inode bitmap at 1239 (bg #0 + 1239)
- Inode table at 1751-1751 (bg #0 + 1751)
+ Block bitmap at 727 (bg #0 + 727), Inode bitmap at 811 (bg #0 + 811)
+ Inode table at 895-895 (bg #0 + 895)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 865-880
Group 55: (Blocks 1802240-1835007) [INODE_UNINIT]
- Block bitmap at 728 (bg #0 + 728), Inode bitmap at 1240 (bg #0 + 1240)
- Inode table at 1752-1752 (bg #0 + 1752)
+ Block bitmap at 728 (bg #0 + 728), Inode bitmap at 812 (bg #0 + 812)
+ Inode table at 896-896 (bg #0 + 896)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 881-896
Group 56: (Blocks 1835008-1867775) [INODE_UNINIT]
- Block bitmap at 729 (bg #0 + 729), Inode bitmap at 1241 (bg #0 + 1241)
- Inode table at 1753-1753 (bg #0 + 1753)
+ Block bitmap at 729 (bg #0 + 729), Inode bitmap at 813 (bg #0 + 813)
+ Inode table at 897-897 (bg #0 + 897)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 897-912
Group 57: (Blocks 1867776-1900543) [INODE_UNINIT]
- Block bitmap at 730 (bg #0 + 730), Inode bitmap at 1242 (bg #0 + 1242)
- Inode table at 1754-1754 (bg #0 + 1754)
+ Block bitmap at 730 (bg #0 + 730), Inode bitmap at 814 (bg #0 + 814)
+ Inode table at 898-898 (bg #0 + 898)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 913-928
Group 58: (Blocks 1900544-1933311) [INODE_UNINIT]
- Block bitmap at 731 (bg #0 + 731), Inode bitmap at 1243 (bg #0 + 1243)
- Inode table at 1755-1755 (bg #0 + 1755)
+ Block bitmap at 731 (bg #0 + 731), Inode bitmap at 815 (bg #0 + 815)
+ Inode table at 899-899 (bg #0 + 899)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 929-944
Group 59: (Blocks 1933312-1966079) [INODE_UNINIT]
- Block bitmap at 732 (bg #0 + 732), Inode bitmap at 1244 (bg #0 + 1244)
- Inode table at 1756-1756 (bg #0 + 1756)
+ Block bitmap at 732 (bg #0 + 732), Inode bitmap at 816 (bg #0 + 816)
+ Inode table at 900-900 (bg #0 + 900)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 945-960
Group 60: (Blocks 1966080-1998847) [INODE_UNINIT]
- Block bitmap at 733 (bg #0 + 733), Inode bitmap at 1245 (bg #0 + 1245)
- Inode table at 1757-1757 (bg #0 + 1757)
+ Block bitmap at 733 (bg #0 + 733), Inode bitmap at 817 (bg #0 + 817)
+ Inode table at 901-901 (bg #0 + 901)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 961-976
Group 61: (Blocks 1998848-2031615) [INODE_UNINIT]
- Block bitmap at 734 (bg #0 + 734), Inode bitmap at 1246 (bg #0 + 1246)
- Inode table at 1758-1758 (bg #0 + 1758)
+ Block bitmap at 734 (bg #0 + 734), Inode bitmap at 818 (bg #0 + 818)
+ Inode table at 902-902 (bg #0 + 902)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 977-992
Group 62: (Blocks 2031616-2064383) [INODE_UNINIT]
- Block bitmap at 735 (bg #0 + 735), Inode bitmap at 1247 (bg #0 + 1247)
- Inode table at 1759-1759 (bg #0 + 1759)
+ Block bitmap at 735 (bg #0 + 735), Inode bitmap at 819 (bg #0 + 819)
+ Inode table at 903-903 (bg #0 + 903)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 993-1008
Group 63: (Blocks 2064384-2097151) [INODE_UNINIT]
- Block bitmap at 736 (bg #0 + 736), Inode bitmap at 1248 (bg #0 + 1248)
- Inode table at 1760-1760 (bg #0 + 1760)
+ Block bitmap at 736 (bg #0 + 736), Inode bitmap at 820 (bg #0 + 820)
+ Inode table at 904-904 (bg #0 + 904)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 1009-1024
Group 64: (Blocks 2097152-2129919) [INODE_UNINIT]
- Block bitmap at 737 (bg #0 + 737), Inode bitmap at 1249 (bg #0 + 1249)
- Inode table at 1761-1761 (bg #0 + 1761)
+ Block bitmap at 737 (bg #0 + 737), Inode bitmap at 821 (bg #0 + 821)
+ Inode table at 905-905 (bg #0 + 905)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 1025-1040
Group 65: (Blocks 2129920-2162687) [INODE_UNINIT]
- Block bitmap at 738 (bg #0 + 738), Inode bitmap at 1250 (bg #0 + 1250)
- Inode table at 1762-1762 (bg #0 + 1762)
+ Block bitmap at 738 (bg #0 + 738), Inode bitmap at 822 (bg #0 + 822)
+ Inode table at 906-906 (bg #0 + 906)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 1041-1056
Group 66: (Blocks 2162688-2195455) [INODE_UNINIT]
- Block bitmap at 739 (bg #0 + 739), Inode bitmap at 1251 (bg #0 + 1251)
- Inode table at 1763-1763 (bg #0 + 1763)
+ Block bitmap at 739 (bg #0 + 739), Inode bitmap at 823 (bg #0 + 823)
+ Inode table at 907-907 (bg #0 + 907)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 1057-1072
Group 67: (Blocks 2195456-2228223) [INODE_UNINIT]
- Block bitmap at 740 (bg #0 + 740), Inode bitmap at 1252 (bg #0 + 1252)
- Inode table at 1764-1764 (bg #0 + 1764)
+ Block bitmap at 740 (bg #0 + 740), Inode bitmap at 824 (bg #0 + 824)
+ Inode table at 908-908 (bg #0 + 908)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 1073-1088
Group 68: (Blocks 2228224-2260991) [INODE_UNINIT]
- Block bitmap at 741 (bg #0 + 741), Inode bitmap at 1253 (bg #0 + 1253)
- Inode table at 1765-1765 (bg #0 + 1765)
+ Block bitmap at 741 (bg #0 + 741), Inode bitmap at 825 (bg #0 + 825)
+ Inode table at 909-909 (bg #0 + 909)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 1089-1104
Group 69: (Blocks 2260992-2293759) [INODE_UNINIT]
- Block bitmap at 742 (bg #0 + 742), Inode bitmap at 1254 (bg #0 + 1254)
- Inode table at 1766-1766 (bg #0 + 1766)
+ Block bitmap at 742 (bg #0 + 742), Inode bitmap at 826 (bg #0 + 826)
+ Inode table at 910-910 (bg #0 + 910)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 1105-1120
Group 70: (Blocks 2293760-2326527) [INODE_UNINIT]
- Block bitmap at 743 (bg #0 + 743), Inode bitmap at 1255 (bg #0 + 1255)
- Inode table at 1767-1767 (bg #0 + 1767)
+ Block bitmap at 743 (bg #0 + 743), Inode bitmap at 827 (bg #0 + 827)
+ Inode table at 911-911 (bg #0 + 911)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 1121-1136
Group 71: (Blocks 2326528-2359295) [INODE_UNINIT]
- Block bitmap at 744 (bg #0 + 744), Inode bitmap at 1256 (bg #0 + 1256)
- Inode table at 1768-1768 (bg #0 + 1768)
+ Block bitmap at 744 (bg #0 + 744), Inode bitmap at 828 (bg #0 + 828)
+ Inode table at 912-912 (bg #0 + 912)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 1137-1152
Group 72: (Blocks 2359296-2392063) [INODE_UNINIT]
- Block bitmap at 745 (bg #0 + 745), Inode bitmap at 1257 (bg #0 + 1257)
- Inode table at 1769-1769 (bg #0 + 1769)
+ Block bitmap at 745 (bg #0 + 745), Inode bitmap at 829 (bg #0 + 829)
+ Inode table at 913-913 (bg #0 + 913)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 1153-1168
Group 73: (Blocks 2392064-2424831) [INODE_UNINIT]
- Block bitmap at 746 (bg #0 + 746), Inode bitmap at 1258 (bg #0 + 1258)
- Inode table at 1770-1770 (bg #0 + 1770)
+ Block bitmap at 746 (bg #0 + 746), Inode bitmap at 830 (bg #0 + 830)
+ Inode table at 914-914 (bg #0 + 914)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 1169-1184
Group 74: (Blocks 2424832-2457599) [INODE_UNINIT]
- Block bitmap at 747 (bg #0 + 747), Inode bitmap at 1259 (bg #0 + 1259)
- Inode table at 1771-1771 (bg #0 + 1771)
+ Block bitmap at 747 (bg #0 + 747), Inode bitmap at 831 (bg #0 + 831)
+ Inode table at 915-915 (bg #0 + 915)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 1185-1200
Group 75: (Blocks 2457600-2490367) [INODE_UNINIT]
- Block bitmap at 748 (bg #0 + 748), Inode bitmap at 1260 (bg #0 + 1260)
- Inode table at 1772-1772 (bg #0 + 1772)
+ Block bitmap at 748 (bg #0 + 748), Inode bitmap at 832 (bg #0 + 832)
+ Inode table at 916-916 (bg #0 + 916)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 1201-1216
Group 76: (Blocks 2490368-2523135) [INODE_UNINIT]
- Block bitmap at 749 (bg #0 + 749), Inode bitmap at 1261 (bg #0 + 1261)
- Inode table at 1773-1773 (bg #0 + 1773)
+ Block bitmap at 749 (bg #0 + 749), Inode bitmap at 833 (bg #0 + 833)
+ Inode table at 917-917 (bg #0 + 917)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 1217-1232
Group 77: (Blocks 2523136-2555903) [INODE_UNINIT]
- Block bitmap at 750 (bg #0 + 750), Inode bitmap at 1262 (bg #0 + 1262)
- Inode table at 1774-1774 (bg #0 + 1774)
+ Block bitmap at 750 (bg #0 + 750), Inode bitmap at 834 (bg #0 + 834)
+ Inode table at 918-918 (bg #0 + 918)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 1233-1248
Group 78: (Blocks 2555904-2588671) [INODE_UNINIT]
- Block bitmap at 751 (bg #0 + 751), Inode bitmap at 1263 (bg #0 + 1263)
- Inode table at 1775-1775 (bg #0 + 1775)
+ Block bitmap at 751 (bg #0 + 751), Inode bitmap at 835 (bg #0 + 835)
+ Inode table at 919-919 (bg #0 + 919)
0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks:
Free inodes: 1249-1264
Group 79: (Blocks 2588672-2621439) [INODE_UNINIT]
- Block bitmap at 752 (bg #0 + 752), Inode bitmap at 1264 (bg #0 + 1264)
- Inode table at 1776-1776 (bg #0 + 1776)
+ Block bitmap at 752 (bg #0 + 752), Inode bitmap at 836 (bg #0 + 836)
+ Inode table at 920-920 (bg #0 + 920)
30047 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 2591393-2621439
Free inodes: 1265-1280
Group 80: (Blocks 2621440-2654207) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 753 (bg #0 + 753), Inode bitmap at 1265 (bg #0 + 1265)
- Inode table at 1777-1777 (bg #0 + 1777)
+ Block bitmap at 753 (bg #0 + 753), Inode bitmap at 837 (bg #0 + 837)
+ Inode table at 921-921 (bg #0 + 921)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 2621440-2654207
Free inodes: 1281-1296
Group 81: (Blocks 2654208-2686975) [INODE_UNINIT, BLOCK_UNINIT]
Backup superblock at 2654208, Group descriptors at 2654209-2654209
Reserved GDT blocks at 2654210-2654880
- Block bitmap at 754 (bg #0 + 754), Inode bitmap at 1266 (bg #0 + 1266)
- Inode table at 1778-1778 (bg #0 + 1778)
+ Block bitmap at 754 (bg #0 + 754), Inode bitmap at 838 (bg #0 + 838)
+ Inode table at 922-922 (bg #0 + 922)
32095 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 2654881-2686975
Free inodes: 1297-1312
Group 82: (Blocks 2686976-2719743) [INODE_UNINIT, BLOCK_UNINIT]
- Block bitmap at 755 (bg #0 + 755), Inode bitmap at 1267 (bg #0 + 1267)
- Inode table at 1779-1779 (bg #0 + 1779)
+ Block bitmap at 755 (bg #0 + 755), Inode bitmap at 839 (bg #0 + 839)
+ Inode table at 923-923 (bg #0 + 923)
32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 2686976-2719743
Free inodes: 1313-1328
Group 83: (Blocks 2719744-2749999) [INODE_UNINIT]
- Block bitmap at 756 (bg #0 + 756), Inode bitmap at 1268 (bg #0 + 1268)
- Inode table at 1780-1780 (bg #0 + 1780)
+ Block bitmap at 756 (bg #0 + 756), Inode bitmap at 840 (bg #0 + 840)
+ Inode table at 924-924 (bg #0 + 924)
30256 free blocks, 16 free inodes, 0 directories, 16 unused inodes
Free blocks: 2719744-2749999
Free inodes: 1329-1344
--
2.16.4

View File

@ -1,222 +0,0 @@
From 1e33a8b408123a4e02a6b9135807f6fd61f3e235 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Sat, 26 Jul 2014 07:40:36 -0400
Subject: [PATCH] Fix 32/64-bit overflow when multiplying by blocks/clusters
per group
References: bsc#1009532
There are a number of places where we need convert groups to blocks or
clusters by multiply the groups by blocks/clusters per group.
Unfortunately, both quantities are 32-bit, but the result needs to be
64-bit, and very often the cast to 64-bit gets lost.
Fix this by adding new macros, EXT2_GROUPS_TO_BLOCKS() and
EXT2_GROUPS_TO_CLUSTERS().
This should fix a bug where resizing a 64bit file system can result in
calculate_minimum_resize_size() looping forever.
Addresses-Launchpad-Bug: #1321958
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
e2fsck/pass5.c | 2 +-
e2fsck/super.c | 2 +-
lib/ext2fs/blknum.c | 2 +-
lib/ext2fs/ext2_fs.h | 5 +++++
lib/ext2fs/imager.c | 14 +++++++-------
lib/ext2fs/rw_bitmaps.c | 4 ++--
misc/tune2fs.c | 2 +-
resize/resize2fs.c | 11 +++++------
8 files changed, 23 insertions(+), 19 deletions(-)
diff --git a/e2fsck/pass5.c b/e2fsck/pass5.c
index d0b1ced512ce..bc9a32a321e0 100644
--- a/e2fsck/pass5.c
+++ b/e2fsck/pass5.c
@@ -776,7 +776,7 @@ static void check_block_end(e2fsck_t ctx)
clear_problem_context(&pctx);
end = ext2fs_get_block_bitmap_start2(fs->block_map) +
- ((blk64_t)EXT2_CLUSTERS_PER_GROUP(fs->super) * fs->group_desc_count) - 1;
+ EXT2_GROUPS_TO_CLUSTERS(fs->super, fs->group_desc_count) - 1;
pctx.errcode = ext2fs_fudge_block_bitmap_end2(fs->block_map, end,
&save_blocks_count);
if (pctx.errcode) {
diff --git a/e2fsck/super.c b/e2fsck/super.c
index 81503d4b9b70..8d468e63d517 100644
--- a/e2fsck/super.c
+++ b/e2fsck/super.c
@@ -421,7 +421,7 @@ void check_resize_inode(e2fsck_t ctx)
for (j = 1; j < fs->group_desc_count; j++) {
if (!ext2fs_bg_has_super(fs, j))
continue;
- expect = pblk + (j * fs->super->s_blocks_per_group);
+ expect = pblk + EXT2_GROUPS_TO_BLOCKS(fs->super, j);
if (ind_buf[ind_off] != expect)
goto resize_inode_invalid;
ind_off++;
diff --git a/lib/ext2fs/blknum.c b/lib/ext2fs/blknum.c
index 8ced1eec6838..7ce6053497f9 100644
--- a/lib/ext2fs/blknum.c
+++ b/lib/ext2fs/blknum.c
@@ -29,7 +29,7 @@ dgrp_t ext2fs_group_of_blk2(ext2_filsys fs, blk64_t blk)
blk64_t ext2fs_group_first_block2(ext2_filsys fs, dgrp_t group)
{
return fs->super->s_first_data_block +
- ((blk64_t)group * fs->super->s_blocks_per_group);
+ EXT2_GROUPS_TO_BLOCKS(fs->super, group);
}
/*
diff --git a/lib/ext2fs/ext2_fs.h b/lib/ext2fs/ext2_fs.h
index d9e14d7cee6c..6c3620cbe6e0 100644
--- a/lib/ext2fs/ext2_fs.h
+++ b/lib/ext2fs/ext2_fs.h
@@ -264,6 +264,11 @@ struct ext2_dx_countlimit {
#define EXT2_DESC_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / EXT2_DESC_SIZE(s))
#endif
+#define EXT2_GROUPS_TO_BLOCKS(s, g) ((blk64_t) EXT2_BLOCKS_PER_GROUP(s) * \
+ (g))
+#define EXT2_GROUPS_TO_CLUSTERS(s, g) ((blk64_t) EXT2_CLUSTERS_PER_GROUP(s) * \
+ (g))
+
/*
* Constants relative to the data blocks
*/
diff --git a/lib/ext2fs/imager.c b/lib/ext2fs/imager.c
index 378a3c885989..b643cc6f3fa0 100644
--- a/lib/ext2fs/imager.c
+++ b/lib/ext2fs/imager.c
@@ -286,8 +286,8 @@ errcode_t ext2fs_image_bitmap_write(ext2_filsys fs, int fd, int flags)
ext2fs_generic_bitmap bmap;
errcode_t retval;
ssize_t actual;
- __u32 itr, cnt, size;
- int c, total_size;
+ size_t c;
+ __u64 itr, cnt, size, total_size;
char buf[1024];
if (flags & IMAGER_FLAG_INODEMAP) {
@@ -308,7 +308,7 @@ errcode_t ext2fs_image_bitmap_write(ext2_filsys fs, int fd, int flags)
}
bmap = fs->block_map;
itr = fs->super->s_first_data_block;
- cnt = EXT2_BLOCKS_PER_GROUP(fs->super) * fs->group_desc_count;
+ cnt = EXT2_GROUPS_TO_BLOCKS(fs->super, fs->group_desc_count);
size = EXT2_BLOCKS_PER_GROUP(fs->super) / 8;
}
total_size = size * fs->group_desc_count;
@@ -342,9 +342,9 @@ errcode_t ext2fs_image_bitmap_write(ext2_filsys fs, int fd, int flags)
if (c > (int) sizeof(buf))
c = sizeof(buf);
actual = write(fd, buf, c);
- if (actual == -1)
+ if (actual < 0)
return errno;
- if (actual != c)
+ if ((size_t) actual != c)
return EXT2_ET_SHORT_WRITE;
size -= c;
}
@@ -360,7 +360,7 @@ errcode_t ext2fs_image_bitmap_read(ext2_filsys fs, int fd, int flags)
{
ext2fs_generic_bitmap bmap;
errcode_t retval;
- __u32 itr, cnt;
+ __u64 itr, cnt;
char buf[1024];
unsigned int size;
ssize_t actual;
@@ -383,7 +383,7 @@ errcode_t ext2fs_image_bitmap_read(ext2_filsys fs, int fd, int flags)
}
bmap = fs->block_map;
itr = fs->super->s_first_data_block;
- cnt = EXT2_BLOCKS_PER_GROUP(fs->super) * fs->group_desc_count;
+ cnt = EXT2_GROUPS_TO_BLOCKS(fs->super, fs->group_desc_count);
size = EXT2_BLOCKS_PER_GROUP(fs->super) / 8;
}
diff --git a/lib/ext2fs/rw_bitmaps.c b/lib/ext2fs/rw_bitmaps.c
index d24ba9a3feca..a07ecd579a77 100644
--- a/lib/ext2fs/rw_bitmaps.c
+++ b/lib/ext2fs/rw_bitmaps.c
@@ -262,8 +262,8 @@ static errcode_t read_bitmaps(ext2_filsys fs, int do_inode, int do_block)
}
blk = (fs->image_header->offset_blockmap /
fs->blocksize);
- blk_cnt = (blk64_t)EXT2_CLUSTERS_PER_GROUP(fs->super) *
- fs->group_desc_count;
+ blk_cnt = EXT2_GROUPS_TO_CLUSTERS(fs->super,
+ fs->group_desc_count);
while (block_nbytes > 0) {
retval = io_channel_read_blk64(fs->image_io, blk++,
1, block_bitmap);
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index 6b2123518240..ad0b05f1931b 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -1383,7 +1383,7 @@ static int ext2fs_is_block_in_group(ext2_filsys fs, dgrp_t group, blk64_t blk)
{
blk64_t start_blk, end_blk;
start_blk = fs->super->s_first_data_block +
- EXT2_BLOCKS_PER_GROUP(fs->super) * group;
+ EXT2_GROUPS_TO_BLOCKS(fs->super, group);
/*
* We cannot get new block beyond end_blk for for the last block group
* so we can check with EXT2_BLOCKS_PER_GROUP even for last block group
diff --git a/resize/resize2fs.c b/resize/resize2fs.c
index 6bd2e1c62f7b..9641b1e5807e 100644
--- a/resize/resize2fs.c
+++ b/resize/resize2fs.c
@@ -436,8 +436,7 @@ retry:
fs->inode_map);
if (retval) goto errout;
- real_end = (((blk64_t) EXT2_BLOCKS_PER_GROUP(fs->super) *
- fs->group_desc_count)) - 1 +
+ real_end = EXT2_GROUPS_TO_BLOCKS(fs->super, fs->group_desc_count) - 1 +
fs->super->s_first_data_block;
retval = ext2fs_resize_block_bitmap2(new_size - 1,
real_end, fs->block_map);
@@ -2318,7 +2317,7 @@ blk64_t calculate_minimum_resize_size(ext2_filsys fs, int flags)
fs->super->s_free_inodes_count;
blks_needed = ext2fs_div_ceil(inode_count,
fs->super->s_inodes_per_group) *
- EXT2_BLOCKS_PER_GROUP(fs->super);
+ (blk64_t) EXT2_BLOCKS_PER_GROUP(fs->super);
groups = ext2fs_div64_ceil(blks_needed,
EXT2_BLOCKS_PER_GROUP(fs->super));
#ifdef RESIZE2FS_DEBUG
@@ -2365,7 +2364,7 @@ blk64_t calculate_minimum_resize_size(ext2_filsys fs, int flags)
* figure out how many data blocks we have given the number of groups
* we need for our inodes
*/
- data_blocks = groups * EXT2_BLOCKS_PER_GROUP(fs->super);
+ data_blocks = EXT2_GROUPS_TO_BLOCKS(fs->super, groups);
last_start = 0;
for (grp = 0; grp < flex_groups; grp++) {
overhead = calc_group_overhead(fs, grp, old_desc_blocks);
@@ -2403,7 +2402,7 @@ blk64_t calculate_minimum_resize_size(ext2_filsys fs, int flags)
extra_grps = ext2fs_div64_ceil(remainder,
EXT2_BLOCKS_PER_GROUP(fs->super));
- data_blocks += extra_grps * EXT2_BLOCKS_PER_GROUP(fs->super);
+ data_blocks += EXT2_GROUPS_TO_BLOCKS(fs->super, extra_grps);
/* ok we have to account for the last group */
overhead = calc_group_overhead(fs, groups-1, old_desc_blocks);
@@ -2501,7 +2500,7 @@ blk64_t calculate_minimum_resize_size(ext2_filsys fs, int flags)
* blocks needed to handle the group descriptor metadata+data
* that we need
*/
- blks_needed = (groups-1) * EXT2_BLOCKS_PER_GROUP(fs->super);
+ blks_needed = EXT2_GROUPS_TO_BLOCKS(fs->super, groups - 1);
blks_needed += overhead;
/*
--
2.6.6