From: Jeff Moyer <jmoyer@redhat.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: linux-nvdimm@ml01.01.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] libnvdimm: fix btt vs clear poison locking
Date: Tue, 11 Apr 2017 16:08:37 -0400 [thread overview]
Message-ID: <x49r30yg116.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <149159694856.26101.16830021017958812113.stgit@dwillia2-desk3.amr.corp.intel.com> (Dan Williams's message of "Fri, 07 Apr 2017 13:29:08 -0700")
Dan Williams <dan.j.williams@intel.com> writes:
> As a minimal fix, disable error clearing when the BTT is enabled. For
> the final fix a larger rework of the poison list locking is needed.
> @@ -243,7 +243,15 @@ static int nsio_rw_bytes(struct nd_namespace_common *ndns,
> }
>
> if (unlikely(is_bad_pmem(&nsio->bb, sector, sz_align))) {
> - if (IS_ALIGNED(offset, 512) && IS_ALIGNED(size, 512)) {
> + /*
> + * FIXME: nsio_rw_bytes() may be called from atomic
> + * context in the BTT case and nvdimm_clear_poison()
> + * takes a sleeping lock. Until the locking can be
> + * reworked this capability depends on !BTT or BROKEN.
> + */
> + if ((!IS_ENABLED(CONFIG_BTT) || IS_ENABLED(CONFIG_BROKEN))
> + && IS_ALIGNED(offset, 512)
> + && IS_ALIGNED(size, 512)) {
I don't like that you've disabled clear error just because the btt
driver was enabled. Can't you do something like this, instead?
disable_clear_poison = (ndns->claim && is_nd_btt(ndns->claim));
if (!disable_clear_poison && IS_ALIGNED(offset, 512)...
-Jeff
next prev parent reply other threads:[~2017-04-11 20:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-07 20:29 Dan Williams
2017-04-11 20:08 ` Jeff Moyer [this message]
2017-04-11 20:10 ` Dan Williams
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=x49r30yg116.fsf@segfault.boston.devel.redhat.com \
--to=jmoyer@redhat.com \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@ml01.01.org \
--cc=stable@vger.kernel.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
all inboxes | Powered by JetHome®