linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zorro Lang <zlang@redhat.com>
To: fstests@vger.kernel.org
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH] xfs/119: fix too small log size error
Date: Wed, 12 Sep 2018 19:04:04 +0800	[thread overview]
Message-ID: <20180912110404.32673-1-zlang@redhat.com> (raw)

xfs/119 fails on 4k hard sector size device if reflink (with/without
rmapbt) is enabled:

  # mkfs.xfs -f -m reflink=1,rmapbt=0 -l version=2,size=2560b,su=64k /dev/sdf
  log size 2560 blocks too small, minimum size is 2688 blocks
  # mkfs.xfs -f -m reflink=1,rmapbt=1 -l version=2,size=2560b,su=64k /dev/sdf
  log size 2560 blocks too small, minimum size is 4368 blocks

So remove log size parameter and run mkfs.xfs again if it fails.

Signed-off-by: Zorro Lang <zlang@redhat.com>
---

I saw Dave changed the log size once in commit:
  d0a3cc5a xfs/104: log size too small for 4k sector drives

But it's still not enough after we have reflink feature now. I don't
know why this case need "-l version=2,size=2560b,su=64k",
if someone learns about this case, please tell me how to change this
case properly. If the log size parameter is not necessary, I'd like
to remove it.

Thanks,
Zorro

 tests/xfs/119 | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tests/xfs/119 b/tests/xfs/119
index bf7f1ca8..d507aacf 100755
--- a/tests/xfs/119
+++ b/tests/xfs/119
@@ -40,7 +40,14 @@ sync
 
 export MKFS_OPTIONS="-l version=2,size=2560b,su=64k" 
 export MOUNT_OPTIONS="-o logbsize=64k"
-_scratch_mkfs_xfs >/dev/null
+_scratch_mkfs_xfs >/dev/null 2>&1
+# The specified log size maybe too small if new features (e.g: reflink
+# or/and rmapbt) is enabled. So if mkfs fails, don't specify log size
+# and try to mkfs again.
+if [ $? -ne 0 ]; then
+	export MKFS_OPTIONS="-l version=2,su=64k"
+	_scratch_mkfs_xfs >/dev/null
+fi
 
 _scratch_mount
 
-- 
2.14.4

             reply	other threads:[~2018-09-12 16:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12 11:04 Zorro Lang [this message]
2018-09-12 13:15 ` [PATCH] xfs/119: fix too small log size error Eryu Guan
2018-09-12 15:25   ` Zorro Lang
2018-09-13  8:32     ` Dave Chinner

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=20180912110404.32673-1-zlang@redhat.com \
    --to=zlang@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /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).