mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-11-27 12:04:43 +08:00
tune2fs: explain why an fsck is needed
Currently tune2fs just says without any explanation, "run fsck -f". Add a short explanation that a freshly checked file system is required to reduce user confusion. (We could add even more details, but hopefully this is enough.) Addresses-Debian-Bug: #857336 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
9667504178
commit
a120a5da24
@ -116,6 +116,8 @@ struct blk_move {
|
|||||||
|
|
||||||
errcode_t ext2fs_run_ext3_journal(ext2_filsys *fs);
|
errcode_t ext2fs_run_ext3_journal(ext2_filsys *fs);
|
||||||
|
|
||||||
|
static const char *fsck_explain = N_("\nThis operation requires a freshly checked filesystem.\n");
|
||||||
|
|
||||||
static const char *please_fsck = N_("Please run e2fsck -f on the filesystem.\n");
|
static const char *please_fsck = N_("Please run e2fsck -f on the filesystem.\n");
|
||||||
static const char *please_dir_fsck =
|
static const char *please_dir_fsck =
|
||||||
N_("Please run e2fsck -fD on the filesystem.\n");
|
N_("Please run e2fsck -fD on the filesystem.\n");
|
||||||
@ -419,7 +421,8 @@ static void check_fsck_needed(ext2_filsys fs, const char *prompt)
|
|||||||
if (!(fs->super->s_state & EXT2_VALID_FS) ||
|
if (!(fs->super->s_state & EXT2_VALID_FS) ||
|
||||||
(fs->super->s_state & EXT2_ERROR_FS) ||
|
(fs->super->s_state & EXT2_ERROR_FS) ||
|
||||||
(fs->super->s_lastcheck < fs->super->s_mtime)) {
|
(fs->super->s_lastcheck < fs->super->s_mtime)) {
|
||||||
printf("\n%s\n", _(please_fsck));
|
puts(_(fsck_explain));
|
||||||
|
puts(_(please_fsck));
|
||||||
if (mount_flags & EXT2_MF_READONLY)
|
if (mount_flags & EXT2_MF_READONLY)
|
||||||
printf("%s", _("(and reboot afterwards!)\n"));
|
printf("%s", _("(and reboot afterwards!)\n"));
|
||||||
exit(1);
|
exit(1);
|
||||||
@ -441,7 +444,8 @@ static void request_dir_fsck_afterwards(ext2_filsys fs)
|
|||||||
return;
|
return;
|
||||||
fsck_requested++;
|
fsck_requested++;
|
||||||
fs->super->s_state &= ~EXT2_VALID_FS;
|
fs->super->s_state &= ~EXT2_VALID_FS;
|
||||||
printf("\n%s\n", _(please_dir_fsck));
|
puts(_(fsck_explain));
|
||||||
|
puts(_(please_dir_fsck));
|
||||||
if (mount_flags & EXT2_MF_READONLY)
|
if (mount_flags & EXT2_MF_READONLY)
|
||||||
printf("%s", _("(and reboot afterwards!)\n"));
|
printf("%s", _("(and reboot afterwards!)\n"));
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,8 @@ Writing superblocks and filesystem accounting information: done
|
|||||||
|
|
||||||
tune2fs -O metadata_csum test.img
|
tune2fs -O metadata_csum test.img
|
||||||
|
|
||||||
|
This operation requires a freshly checked filesystem.
|
||||||
|
|
||||||
Please run e2fsck -f on the filesystem.
|
Please run e2fsck -f on the filesystem.
|
||||||
|
|
||||||
Exit status is 1
|
Exit status is 1
|
||||||
@ -57,6 +59,8 @@ Exit status is 0
|
|||||||
tune2fs -O metadata_csum test.img
|
tune2fs -O metadata_csum test.img
|
||||||
Enabling checksums could take some time.
|
Enabling checksums could take some time.
|
||||||
Proceed anyway (or wait 5 seconds) ? (y,N)
|
Proceed anyway (or wait 5 seconds) ? (y,N)
|
||||||
|
This operation requires a freshly checked filesystem.
|
||||||
|
|
||||||
Please run e2fsck -fD on the filesystem.
|
Please run e2fsck -fD on the filesystem.
|
||||||
|
|
||||||
Exit status is 0
|
Exit status is 0
|
||||||
|
@ -18,6 +18,8 @@ Pass 5: Checking group summary information
|
|||||||
Exit status is 0
|
Exit status is 0
|
||||||
tune2fs -O metadata_csum test.img
|
tune2fs -O metadata_csum test.img
|
||||||
|
|
||||||
|
This operation requires a freshly checked filesystem.
|
||||||
|
|
||||||
Please run e2fsck -fD on the filesystem.
|
Please run e2fsck -fD on the filesystem.
|
||||||
|
|
||||||
Exit status is 0
|
Exit status is 0
|
||||||
|
@ -18,6 +18,8 @@ Pass 5: Checking group summary information
|
|||||||
Exit status is 0
|
Exit status is 0
|
||||||
tune2fs -O metadata_csum test.img
|
tune2fs -O metadata_csum test.img
|
||||||
|
|
||||||
|
This operation requires a freshly checked filesystem.
|
||||||
|
|
||||||
Please run e2fsck -fD on the filesystem.
|
Please run e2fsck -fD on the filesystem.
|
||||||
|
|
||||||
Exit status is 0
|
Exit status is 0
|
||||||
|
@ -19,6 +19,8 @@ Exit status is 0
|
|||||||
tune2fs -I 256 -O metadata_csum test.img
|
tune2fs -I 256 -O metadata_csum test.img
|
||||||
Setting inode size 256
|
Setting inode size 256
|
||||||
|
|
||||||
|
This operation requires a freshly checked filesystem.
|
||||||
|
|
||||||
Please run e2fsck -fD on the filesystem.
|
Please run e2fsck -fD on the filesystem.
|
||||||
|
|
||||||
Exit status is 0
|
Exit status is 0
|
||||||
|
Loading…
Reference in New Issue
Block a user