From: Dan Williams <dan.j.williams@intel.com>
To: Shiyang Ruan <ruansy.fnst@fujitsu.com>,
<linux-kernel@vger.kernel.org>, <linux-xfs@vger.kernel.org>,
<nvdimm@lists.linux.dev>, <linux-fsdevel@vger.kernel.org>
Cc: <djwong@kernel.org>, <david@fromorbit.com>, <dan.j.williams@intel.com>
Subject: RE: [PATCH 1/2] fsdax,xfs: fix warning messages at dax_[dis]associate_entry()
Date: Tue, 29 Nov 2022 20:12:16 -0800 [thread overview]
Message-ID: <6386d82011018_c95729485@dwillia2-mobl3.amr.corp.intel.com.notmuch> (raw)
In-Reply-To: <1669301694-16-2-git-send-email-ruansy.fnst@fujitsu.com>
Shiyang Ruan wrote:
> This patch fixes the warning message reported in dax_associate_entry()
> and dax_disassociate_entry().
Can you include the xfstest test number and a snippet of the warning
message.
> 1. reset page->mapping and ->index when refcount counting down to 0.
> 2. set IOMAP_F_SHARED flag when iomap read to allow one dax page to be
> associated more than once for not only write but also read.
> 3. should zero the edge (when not aligned) if srcmap is HOLE or
> UNWRITTEN.
> 4. iterator of two files in dedupe should be executed side by side, not
> nested.
> 5. use xfs_dax_write_iomap_ops for xfs zero and truncate.
Do these all need to be done at once, or is this 5 patches?
>
> Signed-off-by: Shiyang Ruan <ruansy.fnst@fujitsu.com>
> ---
> fs/dax.c | 114 ++++++++++++++++++++++++++-------------------
> fs/xfs/xfs_iomap.c | 6 +--
> 2 files changed, 69 insertions(+), 51 deletions(-)
>
> diff --git a/fs/dax.c b/fs/dax.c
> index 1c6867810cbd..5ea7c0926b7f 100644
> --- a/fs/dax.c
> +++ b/fs/dax.c
> @@ -398,7 +398,7 @@ static void dax_disassociate_entry(void *entry, struct address_space *mapping,
> WARN_ON_ONCE(trunc && page_ref_count(page) > 1);
> if (dax_mapping_is_cow(page->mapping)) {
> /* keep the CoW flag if this page is still shared */
> - if (page->index-- > 0)
> + if (page->index-- > 1)
I think this wants either a helper function to make it clear that
->index is being used as a share count, or go ahead and rename that
field in this context with something like:
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 910d880e67eb..1a409288f39d 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -103,7 +103,10 @@ struct page {
};
/* See page-flags.h for PAGE_MAPPING_FLAGS */
struct address_space *mapping;
- pgoff_t index; /* Our offset within mapping. */
+ union {
+ pgoff_t index; /* Our offset within mapping. */
+ unsigned long share;
+ };
/**
* @private: Mapping-private opaque data.
* Usually used for buffer_heads if PagePrivate.
next prev parent reply other threads:[~2022-11-30 4:12 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-24 14:54 [PATCH 0/2] fsdax,xfs: fix warning messages Shiyang Ruan
2022-11-24 14:54 ` [PATCH 1/2] fsdax,xfs: fix warning messages at dax_[dis]associate_entry() Shiyang Ruan
2022-11-30 4:08 ` Darrick J. Wong
2022-11-30 8:58 ` Shiyang Ruan
2022-11-30 16:28 ` Darrick J. Wong
2022-11-30 4:12 ` Dan Williams [this message]
2022-11-24 14:54 ` [PATCH 2/2] fsdax,xfs: port unshare to fsdax Shiyang Ruan
2022-11-30 3:28 ` Darrick J. Wong
2022-11-27 18:38 ` [PATCH 0/2] fsdax,xfs: fix warning messages Darrick J. Wong
2022-11-28 2:16 ` Shiyang Ruan
2022-11-28 23:08 ` Darrick J. Wong
2022-11-30 3:59 ` Dan Williams
2022-11-30 4:16 ` Darrick J. Wong
2022-11-30 7:05 ` Dan Williams
2022-11-30 21:08 ` Darrick J. Wong
2022-12-01 15:39 ` Shiyang Ruan
2022-12-01 17:47 ` Darrick J. Wong
2022-11-30 21:27 ` Andrew Morton
2022-11-30 21:48 ` Dan Williams
2022-11-30 23:08 ` Darrick J. Wong
2022-11-30 23:58 ` Dan Williams
2022-11-30 10:30 ` [PATCH 0/2] fsdax,xfs: fix warning messages #forregzbot Thorsten Leemhuis
2022-12-12 7:06 ` Thorsten Leemhuis
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=6386d82011018_c95729485@dwillia2-mobl3.amr.corp.intel.com.notmuch \
--to=dan.j.williams@intel.com \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
--cc=ruansy.fnst@fujitsu.com \
/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).