All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: linux-nvdimm@lists.01.org
Subject: How to fake a dax device for debugging purposes?
Date: Sun, 10 May 2020 21:54:04 -0400	[thread overview]
Message-ID: <20200511015404.GA1490816@mit.edu> (raw)

(Please keep me on the cc line since I'm not okn the linux-nvdimm list.)

Hi,

I used to fake up a dax-capable device for debugging ext4 by using
instructions similar to the ones that can be found here:

https://docs.pmem.io/persistent-memory/getting-started-guide/creating-development-environments/linux-environments/linux-memmap

The problem is that with more recent kernels, this is no longer
working for me.

Here are the relevant dmesg lines (from running "gce-xfstests -c dax
launch"):

[    0.000000] Linux version 5.7.0-rc4-xfstests-00002-g8867a85a3164-dirty (tytso@lambda) (gcc version 9.3.0 (Debian 9.3.0-11), GNU ld (GNU Binutils for Debian) 2.34) #1692 SMP Sun May 10 21:21:14 EDT 2020
[    0.000000] Command line: root=/dev/sda1 ro console=ttyS0,38400n8 elevator=noop net.ifnames=0 biosdevname=0 console=ttyS0 memmap=4G!9G memmap=9G!14G cmd=maint mem=26624M fstestcfg= fstestset= fstestexc= fstestopt= fstesttyp=ext4 fstestapi=1.5 fsteststr= nfssrv=
       ...
[    0.000000] user: [mem 0x0000000240000000-0x000000033fffffff] persistent (type 12)
[    0.000000] user: [mem 0x0000000340000000-0x000000037fffffff] usable
[    0.000000] user: [mem 0x0000000380000000-0x00000005bfffffff] persistent (type 12)
[    0.000000] user: [mem 0x00000005c0000000-0x000000067fffffff] usable
    ....
[    3.180904] nd_pmem namespace0.0: unable to guarantee persistence of writes
[    3.181750] nd_pmem namespace1.0: unable to guarantee persistence of writes
[    3.188025] pmem0: detected capacity change from 0 to 4294967296
[    3.189896] pmem1: detected capacity change from 0 to 9663676416

But when I try to mount a file system with: "mount -o dax -t ext4 /dev/pmem0 /mnt" I get:

[  168.136331] EXT4-fs (pmem0): DAX unsupported by block device.

Looking at drivers/dax/super.c, and changing a bunch of pr_debug to
pr_err, I found the following had triggered.

[  168.130603] pmem0: error: request queue doesn't support dax

So looks like drivers/nvdimm/pmem.c is failing to set QUEUE_FLAG_DAX
flag on its queue, and so in turn that's because pmem->pfn_flags
doesn't have PFN_MAP set.   And.... at that point, I'm lost.

How do I make a /dev/pmem0 via the memmap= boot command line options
be mountable as a dax mount file system?

							- Ted
							
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

             reply	other threads:[~2020-05-11  1:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11  1:54 Theodore Y. Ts'o [this message]
2020-05-11 18:38 ` How to fake a dax device for debugging purposes? Dan Williams
2020-05-14  1:25   ` Theodore Y. Ts'o

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=20200511015404.GA1490816@mit.edu \
    --to=tytso@mit.edu \
    --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.