public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Zorro Lang <zlang@redhat.com>
To: xfs@oss.sgi.com
Cc: sandeen@redhat.com, Zorro Lang <zlang@redhat.com>
Subject: [PATCH] xfs_repair: don't mark the fs dirty just because memory possibly be low
Date: Sat,  2 Jul 2016 00:36:08 +0800	[thread overview]
Message-ID: <1467390968-1422-1-git-send-email-zlang@redhat.com> (raw)

When I run "xfs_repair -n" on a 500T device with 16G memory,
xfs_repair print warning as below:

  Memory available for repair (11798MB) may not be sufficient.
  At least 64048MB is needed to repair this filesystem efficiently
  If repair fails due to lack of memory, please
  turn prefetching off (-P) to reduce the memory footprint.

And it return 1 at last. But xfs_repair didn't hit any error, it
just feel the memory maybe too low(not real), then return error.
There is no reason to mark the fs dirty just because it thinks it
might *possibly* be low on memory.

do_warn() will set fs_is_dirty=1, if we only want to print warning
message(not real failure), turn to use do_log() will be better.

Signed-off-by: Zorro Lang <zlang@redhat.com>
---
 repair/xfs_repair.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c
index 9d91f2d..bbf0edc 100644
--- a/repair/xfs_repair.c
+++ b/repair/xfs_repair.c
@@ -851,16 +851,16 @@ main(int argc, char **argv)
 	  "with the -m option. Please increase it to at least %lu.\n"),
 					mem_used / 1024);
 			}
-			do_warn(
+			do_log(
 	_("Memory available for repair (%luMB) may not be sufficient.\n"
 	  "At least %luMB is needed to repair this filesystem efficiently\n"
 	  "If repair fails due to lack of memory, please\n"),
 				max_mem / 1024, mem_used / 1024);
 			if (do_prefetch)
-				do_warn(
+				do_log(
 	_("turn prefetching off (-P) to reduce the memory footprint.\n"));
 			else
-				do_warn(
+				do_log(
 	_("increase system RAM and/or swap space to at least %luMB.\n"),
 			mem_used * 2 / 1024);
 
-- 
2.5.5

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

             reply	other threads:[~2016-07-01 16:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-01 16:36 Zorro Lang [this message]
2016-07-01 16:43 ` [PATCH] xfs_repair: don't mark the fs dirty just because memory possibly be low Eric Sandeen

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=1467390968-1422-1-git-send-email-zlang@redhat.com \
    --to=zlang@redhat.com \
    --cc=sandeen@redhat.com \
    --cc=xfs@oss.sgi.com \
    /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