From: Ross Zwisler <ross.zwisler-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Soccer Liu <soccer_liu-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>,
linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: "linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org"
<linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org>
Subject: Re: Unexpected writes seen on a Read-only, DAX enabled EXT4 fs
Date: Mon, 11 Sep 2017 12:21:12 -0600 [thread overview]
Message-ID: <20170911182112.GA20005@linux.intel.com> (raw)
In-Reply-To: <2036030243.251059.1504977026265-sAHhhX/85wgbqTNvkayDYw@public.gmane.org>
On Sat, Sep 09, 2017 at 05:10:26PM +0000, Soccer Liu wrote:
> Hi:
> I was surprised to see a few write operations called into
> ext4_dax_huge_fault with FAULT_FLAG_WRITE set on vmf->flags
> Are those writes expected at all?
> static int ext4_dax_huge_fault(struct vm_fault *vmf,
> enum page_entry_size pe_size)
> {
> ...
> bool write = vmf->flags & FAULT_FLAG_WRITE;
> Based on the following Mount documentation below, I did mount this ext fs
> with ro and noloadAre there any other options that I could use to totally
> eliminate those unexpected writes?
>
> - -r, --read-only
> - Mount the filesystem read-only. A synonym is -o ro.Note that,
> depending on the filesystem type, state and kernel behavior, the
> system may still write to the device. For example, Ext3 or ext4 will
> replay itsjournal if the filesystem is dirty. To prevent this kind of
> write access, you may want to mount ext3 or ext4 filesystem with
> "ro,noload" mount options or setthe block device to read-only mode,
> see command blockdev(8). -
>
> Related DMESG output...
>
> [ 0.891653] EXT4-fs (pmem0): DAX enabled. Warning: EXPERIMENTAL, use at your own risk
> [ 0.892736] EXT4-fs (pmem0): mounted filesystem without journal. Opts: noload,dax
> [ 0.898293] EXT4-fs (sda): mounted filesystem without journal. Opts: (null)
> [ 0.902574] random: fast init done
> [ 0.926157] IPVS: ftp: loaded support on port[0] = 21
> // My private debug messages
> [ 0.997224] EXT4-fs (pmem0): write is 1 handle = 0xffffffffffffffe2 <--read-only device
> [ 0.998052] EXT4-fs (pmem0): write is 1 handle = 0xffffffffffffffe2
> [ 0.998787] EXT4-fs (pmem0): write is 1 handle = 0xffffffffffffffe2
> [ 0.999720] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 1.004626] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 1.005359] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 1.006128] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 1.006824] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 1.007499] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 1.008149] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 7.320626] random: crng init done
> [ 18.780447] EXT4-fs: 53 callbacks suppressed
> [ 18.781900] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 18.783392] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 18.790661] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 18.792042] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 18.793321] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 18.795005] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 18.795204] EXT4-fs (pmem0): write is 1 handle = 0xffffffffffffffe2
> [ 18.795209] EXT4-fs (pmem0): write is 1 handle = 0xffffffffffffffe2
> [ 18.795213] EXT4-fs (pmem0): write is 1 handle = 0xffffffffffffffe2
> [ 18.795257] EXT4-fs (pmem0): write is 0 handle = 0x0
Adding the ext4 list.
I'm pretty sure that this is ext4/mm behavior that is independent of DAX. DAX
doesn't really have any impact on whether or not write page faults happen on a
RO ext4 filesystem, though this fix from Randy Dodgen:
https://www.spinics.net/lists/linux-ext4/msg58075.html
shows that FAULT_FLAG_WRITE can be set on DAX read-only ext4 mounts when
executing binaries, though in this case the write is going to a COW page.
- Ross
WARNING: multiple messages have this Message-ID (diff)
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Soccer Liu <soccer_liu@yahoo.com>, linux-ext4@vger.kernel.org
Cc: "linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>
Subject: Re: Unexpected writes seen on a Read-only, DAX enabled EXT4 fs
Date: Mon, 11 Sep 2017 12:21:12 -0600 [thread overview]
Message-ID: <20170911182112.GA20005@linux.intel.com> (raw)
In-Reply-To: <2036030243.251059.1504977026265@mail.yahoo.com>
On Sat, Sep 09, 2017 at 05:10:26PM +0000, Soccer Liu wrote:
> Hi:
> I was surprised to see a few write operations called into
> ext4_dax_huge_fault with FAULT_FLAG_WRITE set on vmf->flags
> Are those writes expected at all?
> static int ext4_dax_huge_fault(struct vm_fault *vmf,
> enum page_entry_size pe_size)
> {
> ...
> bool write = vmf->flags & FAULT_FLAG_WRITE;
> Based on the following Mount documentation below, I did mount this ext fs
> with ro and noloadAre there any other options that I could use to totally
> eliminate those unexpected writes?
>
> - -r, --read-only
> - Mount the filesystem read-only. A synonym is -o ro.Note that,
> depending on the filesystem type, state and kernel behavior, the
> system may still write to the device. For example, Ext3 or ext4 will
> replay itsjournal if the filesystem is dirty. To prevent this kind of
> write access, you may want to mount ext3 or ext4 filesystem with
> "ro,noload" mount options or setthe block device to read-only mode,
> see command blockdev(8). -
>
> Related DMESG output...
>
> [ 0.891653] EXT4-fs (pmem0): DAX enabled. Warning: EXPERIMENTAL, use at your own risk
> [ 0.892736] EXT4-fs (pmem0): mounted filesystem without journal. Opts: noload,dax
> [ 0.898293] EXT4-fs (sda): mounted filesystem without journal. Opts: (null)
> [ 0.902574] random: fast init done
> [ 0.926157] IPVS: ftp: loaded support on port[0] = 21
> // My private debug messages
> [ 0.997224] EXT4-fs (pmem0): write is 1 handle = 0xffffffffffffffe2 <--read-only device
> [ 0.998052] EXT4-fs (pmem0): write is 1 handle = 0xffffffffffffffe2
> [ 0.998787] EXT4-fs (pmem0): write is 1 handle = 0xffffffffffffffe2
> [ 0.999720] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 1.004626] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 1.005359] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 1.006128] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 1.006824] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 1.007499] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 1.008149] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 7.320626] random: crng init done
> [ 18.780447] EXT4-fs: 53 callbacks suppressed
> [ 18.781900] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 18.783392] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 18.790661] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 18.792042] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 18.793321] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 18.795005] EXT4-fs (pmem0): write is 0 handle = 0x0
> [ 18.795204] EXT4-fs (pmem0): write is 1 handle = 0xffffffffffffffe2
> [ 18.795209] EXT4-fs (pmem0): write is 1 handle = 0xffffffffffffffe2
> [ 18.795213] EXT4-fs (pmem0): write is 1 handle = 0xffffffffffffffe2
> [ 18.795257] EXT4-fs (pmem0): write is 0 handle = 0x0
Adding the ext4 list.
I'm pretty sure that this is ext4/mm behavior that is independent of DAX. DAX
doesn't really have any impact on whether or not write page faults happen on a
RO ext4 filesystem, though this fix from Randy Dodgen:
https://www.spinics.net/lists/linux-ext4/msg58075.html
shows that FAULT_FLAG_WRITE can be set on DAX read-only ext4 mounts when
executing binaries, though in this case the write is going to a COW page.
- Ross
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
next prev parent reply other threads:[~2017-09-11 18:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2036030243.251059.1504977026265.ref@mail.yahoo.com>
2017-09-09 17:10 ` Unexpected writes seen on a Read-only, DAX enabled EXT4 fs Soccer Liu
[not found] ` <2036030243.251059.1504977026265-sAHhhX/85wgbqTNvkayDYw@public.gmane.org>
2017-09-11 18:21 ` Ross Zwisler [this message]
2017-09-11 18:21 ` Ross Zwisler
2017-09-11 20:31 ` Andreas Dilger
2017-09-12 9:03 ` Simon Ruderich
[not found] ` <20170912090349.6ow4bv56px2uoqw3-Ezk2jvNqUrNg9hUCZPvPmw@public.gmane.org>
2017-09-15 0:45 ` Soccer Liu
2017-09-13 14:48 ` Jan Kara
2017-09-13 14:48 ` Jan Kara
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=20170911182112.GA20005@linux.intel.com \
--to=ross.zwisler-vuqaysv1563yd54fqh9/ca@public.gmane.org \
--cc=linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org \
--cc=soccer_liu-/E1597aS9LQAvxtiuMwx3w@public.gmane.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.