xfs
[Top] [All Lists]

Re: [PATCH] repair: warn if running in low memory mode

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH] repair: warn if running in low memory mode
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Tue, 4 Jan 2011 04:52:56 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1294121563-17150-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1294121563-17150-1-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Jan 04, 2011 at 05:12:43PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> When checking large filesystems, xfs_repair makes an estimate of how
> much RAM it will need to execute effectively. If the amount of RAM
> is less than this, it reduces the bhash size and turns of
> prefetching, which will substantially slow down the repair process.
> Add a warning that indicates this is happening, along with a
> recommendation of how much RAM repair calculates it needs to run
> with prefetching enabled.
> 
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>

Looks good,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>

> +                             do_warn(_("Not enough RAM available for repair "
> +                                     "to enable prefetching. This will be "
> +                                     "_slow_.\n"
> +                                     "You need at least %luMB RAM to run "
> +                                     "with prefetching enabled."),
> +                                     mem_used * 1280 / (1024 * 1024));

Maybe but the strings on a separate line to be easier readable and
greppable, e.g.:

                                do_warn(
        _("Not enough RAM available for repair to enable prefetching. "
          "This will be _slow_.\n"
          "You need at least %luMB RAM to run with prefetching enabled."),

<Prev in Thread] Current Thread [Next in Thread>