[PATCH] repair: warn if running in low memory mode
Christoph Hellwig
hch at infradead.org
Tue Jan 4 03:52:56 CST 2011
On Tue, Jan 04, 2011 at 05:12:43PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
>
> 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 at redhat.com>
Looks good,
Reviewed-by: Christoph Hellwig <hch at lst.de>
> + 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."),
More information about the xfs
mailing list