From: Dan Williams <dan.j.williams@intel.com>
To: linux-nvdimm@lists.01.org
Subject: [ndctl PATCH 2/4] test/dax.sh: Fix xfs 2M alignment
Date: Sat, 19 Oct 2019 09:39:49 -0700 [thread overview]
Message-ID: <157150318904.3940762.5575454752395795101.stgit@dwillia2-desk3.amr.corp.intel.com> (raw)
In-Reply-To: <157150317870.3940762.5638079137146963300.stgit@dwillia2-desk3.amr.corp.intel.com>
Update the mkfs parameters for the xfs test to ensure 2M aligned
extents, and validate proper alignment in dax-pmd.c.
Link: https://lkml.kernel.org/r/CAPcyv4g2U6YYj6BO_nMgUYPfE2d04pZvKP0JQwNAMy9HZ3UNvg@mail.gmail.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
test/dax-pmd.c | 3 ++-
test/dax.sh | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/test/dax-pmd.c b/test/dax-pmd.c
index 8ed3e9b764f9..0c95b20707c2 100644
--- a/test/dax-pmd.c
+++ b/test/dax-pmd.c
@@ -234,10 +234,11 @@ static int test_pmd(struct ndctl_test *test, int fd)
for (i = 0; i < map->fm_mapped_extents; i++) {
ext = &map->fm_extents[i];
+ p_align = ALIGN(ext->fe_physical, HPAGE_SIZE) - ext->fe_physical;
fprintf(stderr, "[%ld]: l: %llx p: %llx len: %llx flags: %x\n",
i, ext->fe_logical, ext->fe_physical,
ext->fe_length, ext->fe_flags);
- if (ext->fe_length > 2 * HPAGE_SIZE) {
+ if (ext->fe_length > 2 * HPAGE_SIZE && p_align == 0) {
fprintf(stderr, "found potential huge extent\n");
break;
}
diff --git a/test/dax.sh b/test/dax.sh
index b8eb4ce54e10..59d5eafadae8 100755
--- a/test/dax.sh
+++ b/test/dax.sh
@@ -69,7 +69,7 @@ json=$($NDCTL create-namespace -m raw -f -e $dev)
eval $(json2var <<< "$json")
[ $mode != "fsdax" ] && echo "fail: $LINENO" && exit 1
-mkfs.xfs -f /dev/$blockdev -m reflink=0
+mkfs.xfs -f -d su=2m,sw=1,agcount=2 -m reflink=0 /dev/$blockdev
mount /dev/$blockdev $MNT -o dax
fallocate -l 1GiB $MNT/$FILE
run_test $LINENO
@@ -80,7 +80,7 @@ json=$($NDCTL create-namespace -m fsdax -M dev -f -e $dev)
eval $(json2var <<< "$json")
[ $mode != "fsdax" ] && echo "fail: $LINENO" && exit 1
-mkfs.xfs -f /dev/$blockdev -m reflink=0
+mkfs.xfs -f -d su=2m,sw=1,agcount=2 -m reflink=0 /dev/$blockdev
mount /dev/$blockdev $MNT -o dax
fallocate -l 1GiB $MNT/$FILE
run_test $LINENO
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
next prev parent reply other threads:[~2019-10-19 16:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-19 16:39 [ndctl PATCH 0/4] test/dax.sh: Add huge page fault validation Dan Williams
2019-10-19 16:39 ` [ndctl PATCH 1/4] test/dax.sh: Fix failure reporting / handling Dan Williams
2019-10-19 16:39 ` Dan Williams [this message]
2019-10-19 16:39 ` [ndctl PATCH 3/4] test/dax.sh: Validate huge page mappings Dan Williams
2019-10-23 19:33 ` Verma, Vishal L
2019-10-23 19:41 ` Verma, Vishal L
2019-10-25 22:44 ` Verma, Vishal L
2019-10-25 23:26 ` Dan Williams
2019-10-19 16:39 ` [ndctl PATCH 4/4] test/dax.sh: Split into ext4 and xfs tests Dan Williams
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=157150318904.3940762.5575454752395795101.stgit@dwillia2-desk3.amr.corp.intel.com \
--to=dan.j.williams@intel.com \
--cc=linux-nvdimm@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.