tytso / e2fsprogs

Ext2/3/4 file system utilities
http://ext4.wiki.kernel.org
383 stars 224 forks source link

tune2fs has inconsistent output when setting different fs options #195

Open drws opened 2 months ago

drws commented 2 months ago

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.