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>
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
_("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."),