linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] resize2fs: If resize2fs fails, tell the user to run e2fsck
Date: Fri, 10 Jul 2009 13:09:48 -0500	[thread overview]
Message-ID: <4A5783EC.90601@redhat.com> (raw)
In-Reply-To: <1247249267-25715-1-git-send-email-tytso@mit.edu>

Theodore Ts'o wrote:
> If the resize operation fails in the middle of the operation, mark the
> filesystem as needing to be checked, and tell the user that they
> should run e2fsck -fy on the device.
> 
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

Good plan.

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  resize/main.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/resize/main.c b/resize/main.c
> index 2dae161..990a967 100644
> --- a/resize/main.c
> +++ b/resize/main.c
> @@ -455,7 +455,12 @@ int main (int argc, char ** argv)
>  	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"), device_name);
> +		fs->super->s_state |= EXT2_ERROR_FS;
> +		ext2fs_mark_super_dirty(fs);
> +		ext2fs_close(fs);
>  		exit(1);
>  	}
>  	printf(_("The filesystem on %s is now %u blocks long.\n\n"),


  reply	other threads:[~2009-07-10 18:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-10 18:07 [PATCH] resize2fs: If resize2fs fails, tell the user to run e2fsck Theodore Ts'o
2009-07-10 18:09 ` Eric Sandeen [this message]
2009-07-10 18:42 ` Andreas Dilger
2009-07-11 18:25   ` Theodore Tso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A5783EC.90601@redhat.com \
    --to=sandeen@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).