diff options
author | Theodore Ts'o <tytso@mit.edu> | 2008-03-13 00:58:54 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-03-13 00:58:54 -0400 |
commit | 2cd12338395fda301826a88ec7005f4362cc756e (patch) | |
tree | 2f3240c7730c830693f4e51b2ca5ce1d507dca8e /tests/f_holedir | |
parent | 52b1dd5e496c199e9cbcc238f26fd2264a07a2cf (diff) | |
download | e2fsprogs-2cd12338395fda301826a88ec7005f4362cc756e.tar.gz |
e2fsck: Fix directory i_size handling
If a directory's i_size is bigger than the number of blocks, don't try
to allocate extra empty blocks to the end of the directory; there's no
real point to do that. Also, if a directory's i_size is not a
multiple of the blocksize, flag that as a mistake so it can be fixed.
This more elegantly addresses the problem which was found on Bas van
Schaik's filesystem.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'tests/f_holedir')
-rw-r--r-- | tests/f_holedir/expect.1 | 13 | ||||
-rw-r--r-- | tests/f_holedir/expect.2 | 2 |
2 files changed, 11 insertions, 4 deletions
diff --git a/tests/f_holedir/expect.1 b/tests/f_holedir/expect.1 index 05e0cbbc..ad74fa6d 100644 --- a/tests/f_holedir/expect.1 +++ b/tests/f_holedir/expect.1 @@ -15,12 +15,19 @@ Directory inode 11 has an unallocated block #3. Allocate? yes Directory inode 11 has an unallocated block #6. Allocate? yes -Directory inode 11 has an unallocated block #11. Allocate? yes - Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information +Block bitmap differences: -21 +Fix? yes + +Free blocks count wrong for group #0 (78, counted=79). +Fix? yes + +Free blocks count wrong (78, counted=79). +Fix? yes + test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** -test_filesys: 11/32 files (9.1% non-contiguous), 22/100 blocks +test_filesys: 11/32 files (9.1% non-contiguous), 21/100 blocks Exit status is 1 diff --git a/tests/f_holedir/expect.2 b/tests/f_holedir/expect.2 index a821f878..4c0b4f28 100644 --- a/tests/f_holedir/expect.2 +++ b/tests/f_holedir/expect.2 @@ -3,5 +3,5 @@ Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information -test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks +test_filesys: 11/32 files (0.0% non-contiguous), 21/100 blocks Exit status is 0 |