device_name);
exit(1);
}
- printf("Resizing the filesystem on %s to %u (%dk) blocks.\n",
+ printf(_("Resizing the filesystem on "
+ "%s to %u (%dk) blocks.\n"),
device_name, new_size, fs->blocksize / 1024);
retval = resize_fs(fs, &new_size, flags,
((flags & RESIZE_PERCENT_COMPLETE) ?
if (retval) {
com_err(program_name, retval, _("while trying to resize %s"),
device_name);
- ext2fs_close (fs);
+ fprintf(stderr,
+ _("Please run 'e2fsck -fy %s' to fix the filesystem\n"
+ "after the aborted resize operation.\n"),
+ device_name);
+ ext2fs_close(fs);
exit(1);
}
printf(_("The filesystem on %s is now %u blocks long.\n\n"),
if (retval)
return retval;
+ fs->super->s_state |= EXT2_ERROR_FS;
+ ext2fs_mark_super_dirty(fs);
+ ext2fs_flush(fs);
+
/*
* Create the data structure
*/
if (retval)
goto errout;
+ rfs->new_fs->super->s_state &= ~EXT2_ERROR_FS;
rfs->new_fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
retval = ext2fs_close(rfs->new_fs);
if (retval)