Bug 194689 - tune2fs: bugs in handling resize inode/undo file handling
Summary: tune2fs: bugs in handling resize inode/undo file handling
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: ext4 (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: fs_ext4@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-24 07:15 UTC by Thorsten Otto
Modified: 2017-02-24 07:15 UTC (History)
0 users

See Also:
Kernel Version: 2.6.37
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Thorsten Otto 2017-02-24 07:15:42 UTC
There seem to be some bugs in handling the combination of resizing inodes and specifying an undo file with the -z option. Before each run, i have created a test image with the command:

$ mke2fs -F -o Linux -I 128 test.img 512
mke2fs 1.43.5-WIP (17-Feb-2017)
test.img contains a ext2 file system
        created on Fri Feb 24 07:54:45 2017
Creating filesystem with 512 1k blocks and 64 inodes

Allocating group tables: done                            
Writing inode tables: done                            
Writing superblocks and filesystem accounting information: done


Then, when running 

$ E2FSPROGS_UNDO_DIR=. tune2fs -f -I 256 -z my.e2undo test.img

I get the following output

tune2fs 1.43.5-WIP (17-Feb-2017)
Resizing inodes could take some time.
Proceed anyway (or wait 5 seconds) ? (y,N) <proceeding>
Overwriting existing filesystem; this can be undone using the command:
    e2undo ./tune2fs-test.img.e2undo test.img

Resizing inodes could take some time.
Proceed anyway (or wait 5 seconds) ? (y,N) n

./tune2fs-test.img.e2undo: while force-closing undo file


It asked two times. I let the first question timeout, but the second time it waited forever. Also, the last line looks a bit confusing, apparently it got an error but does not tell which one.


Next, i tried
$ E2FSPROGS_UNDO_DIR=/nonexisting tune2fs -f -I 256 -z my.e2undo test.img

tune2fs 1.43.5-WIP (17-Feb-2017)
Resizing inodes could take some time.
Proceed anyway (or wait 5 seconds) ? (y,N) y
Setting inode size 256

i.e. it happily proceeded without ever creating an undo file.


And last, when i run
$ E2FSPROGS_UNDO_DIR=. tune2fs -f -I 256 -z my.e2undo test.img

I get

tune2fs 1.43.5-WIP (17-Feb-2017)
Resizing inodes could take some time.
Proceed anyway (or wait 5 seconds) ? (y,N) y
Overwriting existing filesystem; this can be undone using the command:
    e2undo ./tune2fs-test.img.e2undo test.img

Resizing inodes could take some time.
Proceed anyway (or wait 5 seconds) ? (y,N) y
Setting inode size 256

It created an undo file, but this is the default, ignoring the commandline option.

Note You need to log in before you can comment on or make changes to this bug.