e2fsprogs icon indicating copy to clipboard operation
e2fsprogs copied to clipboard

tune2fs has inconsistent output when setting different fs options

Open drws opened this issue 1 year ago • 0 comments

Consider the following console output with 3 examples for setting several fs options:

# tune2fs -e remount-ro /dev/sda
tune2fs 1.47.1 (20-May-2024)
Setting error behavior to 2
# tune2fs -o journal_data /dev/sda
tune2fs 1.47.1 (20-May-2024)
# tune2fs -O metadata_csum /dev/sda
tune2fs 1.47.1 (20-May-2024)

The three operations are very similar, -e is option-specific while the other two are general option-setting operations. The issue is that -o/-O don't produce any output to indicate what was done. So the output is inconsistent between more or less equal operations.

The second issue is that if the same set of commands is ran again, the output is completely the same - while the fs options were already set before. tune2fs could tell the user an option was already set. For example printing Setting error behavior to... is somewhat misleading.

drws avatar Sep 18 '24 18:09 drws