From: Shiyang Ruan <ruansy.fnst@fujitsu.com>
To: <linux-fsdevel@vger.kernel.org>, <nvdimm@lists.linux.dev>,
<linux-xfs@vger.kernel.org>, <linux-mm@kvack.org>
Cc: <dan.j.williams@intel.com>, <willy@infradead.org>, <jack@suse.cz>,
<akpm@linux-foundation.org>, <djwong@kernel.org>
Subject: [PATCH v11 0/2] mm, pmem, xfs: Introduce MF_MEM_REMOVE for unbind
Date: Tue, 28 Mar 2023 09:41:44 +0000 [thread overview]
Message-ID: <1679996506-2-1-git-send-email-ruansy.fnst@fujitsu.com> (raw)
This patchset is to add gracefully unbind support for pmem.
Patch1 corrects the calculation of length and end of a given range.
Patch2 introduces a new flag call MF_MEM_REMOVE, to let dax holder know
it is a remove event. With the help of notify_failure mechanism, we are
able to shutdown the filesystem on the pmem gracefully.
Changes since v10:
Patch1:
1. correct the count calculation in xfs_failure_pgcnt().
Patch2:
2. drop the patch which introduces super_drop_pagecache().
3. in mf_dax_kill_procs(), don't SetPageHWPoison() and search for all
tasks while mf_flags has MF_MEM_PRE_REMOVE.
4. only do mf_dax_kill_procs() on dax mapping.
5. do invalidate_inode_pages2_range() for each file found during rmap,
to make sure the dax entry are disassociated before pmem is gone.
Otherwise, umount filesystem after unbind will cause crash because
the dax entries have to be disassociated but now the pmem is not
exist.
For detail analysis of this change, please refer this link[1].
[1] https://lore.kernel.org/linux-xfs/b1d9fc03-1a71-a75f-f87b-5819991e4eb2@fujitsu.com/
Shiyang Ruan (2):
xfs: fix the calculation of length and end
mm, pmem, xfs: Introduce MF_MEM_REMOVE for unbind
drivers/dax/super.c | 3 +-
fs/xfs/xfs_notify_failure.c | 66 +++++++++++++++++++++++++++++++------
include/linux/mm.h | 1 +
mm/memory-failure.c | 17 +++++++---
4 files changed, 72 insertions(+), 15 deletions(-)
--
2.39.2
next reply other threads:[~2023-03-28 9:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 9:41 Shiyang Ruan [this message]
2023-03-28 9:41 ` [PATCH v11 1/2] xfs: fix the calculation of length and end Shiyang Ruan
2023-03-28 9:41 ` [PATCH v11 2/2] mm, pmem, xfs: Introduce MF_MEM_REMOVE for unbind Shiyang Ruan
2023-04-04 17:45 ` Darrick J. Wong
2023-04-05 1:28 ` Yasunori Gotou (Fujitsu)
2023-04-05 4:36 ` Dan Williams
2023-04-06 10:50 ` Shiyang Ruan
2023-04-06 14:54 ` Darrick J. Wong
2023-04-07 2:07 ` Shiyang Ruan
2023-04-12 10:52 ` [RFC PATCH v11.1 " Shiyang Ruan
2023-04-20 2:07 ` Shiyang Ruan
2023-04-20 12:09 ` Jan Kara
2023-04-25 12:47 ` Shiyang Ruan
2023-04-25 13:23 ` Jan Kara
2023-04-25 15:18 ` Darrick J. Wong
2023-04-26 2:27 ` Shiyang Ruan
2023-04-26 2:37 ` Darrick J. Wong
2023-04-04 4:33 ` [PATCH v11 0/2] " Shiyang Ruan
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=1679996506-2-1-git-send-email-ruansy.fnst@fujitsu.com \
--to=ruansy.fnst@fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=djwong@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-xfs@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
--cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox