]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
mkfs: add a config file for x86_64 pmem filesystems
authorDarrick J. Wong <djwong@kernel.org>
Tue, 1 Mar 2022 18:45:40 +0000 (13:45 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Tue, 1 Mar 2022 18:45:40 +0000 (13:45 -0500)
We have a handful of users who continually ping the maintainer with
questions about why pmem and dax don't work quite the way they want
(which is to say 2MB extents and PMD mappings) because they copy-pasted
some garbage from Google that's wrong.  Encode the correct defaults into
a mkfs config file and ship that.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
mkfs/Makefile
mkfs/dax_x86_64.conf [new file with mode: 0644]

index 0aaf9d069f8df7eec63c491f17975d7e45b78e9d..55d9362f6b6b1cfd4d7c74831be7b109c1beb43b 100644 (file)
@@ -10,6 +10,7 @@ LTCOMMAND = mkfs.xfs
 HFILES =
 CFILES = proto.c xfs_mkfs.c
 CFGFILES = \
+       dax_x86_64.conf \
        lts_4.19.conf \
        lts_5.4.conf \
        lts_5.10.conf \
diff --git a/mkfs/dax_x86_64.conf b/mkfs/dax_x86_64.conf
new file mode 100644 (file)
index 0000000..3a6ae98
--- /dev/null
@@ -0,0 +1,19 @@
+# mkfs.xfs configuration file for persistent memory on x86_64.
+# Block size must match page size (4K) and we require V5 for the DAX inode
+# flag.  Set extent size hints and stripe units to encourage the filesystem to
+# allocate PMD sized (2MB) blocks.
+
+[block]
+size=4096
+
+[metadata]
+crc=1
+
+[data]
+su=2m
+sw=1
+extszinherit=512
+daxinherit=1
+
+[realtime]
+extsize=2097152