[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <x49r30yg116.fsf@segfault.boston.devel.redhat.com>
Date: Tue, 11 Apr 2017 16:08:37 -0400
From: Jeff Moyer <jmoyer@...hat.com>
To: Dan Williams <dan.j.williams@...el.com>
Cc: linux-nvdimm@...ts.01.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH] libnvdimm: fix btt vs clear poison locking
Dan Williams <dan.j.williams@...el.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
Powered by blists - more mailing lists