From: Eliot Moss <moss@cs.umass.edu>
To: Dan Williams <dan.j.williams@intel.com>, vishal.l.verma@intel.com
Cc: nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org
Subject: Re: [PATCH] daxctl: Fix memblock enumeration off-by-one
Date: Fri, 3 Feb 2023 11:59:13 +1100 [thread overview]
Message-ID: <d59ee7a2-bb9b-81e4-a8b7-e266296a62a8@cs.umass.edu> (raw)
In-Reply-To: <63dc5116b95f1_ea2222941c@dwillia2-xfh.jf.intel.com.notmuch>
On 2/3/2023 11:11 AM, Dan Williams wrote:
> Eliot Moss wrote:
>> On 2/3/2023 7:56 AM, Dan Williams wrote:
>>> A memblock is an inclusive memory range. Bound the search by the last
>>> address in the memory block.
>>>
>>> Found by wondering why an offline 32-block (at 128MB == 4GB) range was
>>> reported as 33 blocks with one online.
>>>
>>> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
>>> ---
>>> daxctl/lib/libdaxctl.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/daxctl/lib/libdaxctl.c b/daxctl/lib/libdaxctl.c
>>> index 5703992f5b88..d990479d8585 100644
>>> --- a/daxctl/lib/libdaxctl.c
>>> +++ b/daxctl/lib/libdaxctl.c
>>> @@ -1477,7 +1477,7 @@ static int memblock_in_dev(struct daxctl_memory *mem, const char *memblock)
>>> err(ctx, "%s: Unable to determine resource\n", devname);
>>> return -EACCES;
>>> }
>>> - dev_end = dev_start + daxctl_dev_get_size(dev);
>>> + dev_end = dev_start + daxctl_dev_get_size(dev) - 1;
>>>
>>> memblock_size = daxctl_memory_get_block_size(mem);
>>> if (!memblock_size) {
>>
>> Might this address the bug I reported?
>
> This one?
>
> http://lore.kernel.org/r/558d0ff1-4658-a11b-5a6d-0be0a3a6799c@cs.umass.edu
>
> I don't think so, that one seems to have something to do with the file
> extent layout that causes fs/dax.c to fallback to 4K mappings.
That was the one - I think you're right; it's not immediately related.
EM
next prev parent reply other threads:[~2023-02-03 0:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-02 20:56 [PATCH] daxctl: Fix memblock enumeration off-by-one Dan Williams
2023-02-03 0:03 ` Eliot Moss
2023-02-03 0:11 ` Dan Williams
2023-02-03 0:59 ` Eliot Moss [this message]
2023-02-03 23:07 ` Verma, Vishal L
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=d59ee7a2-bb9b-81e4-a8b7-e266296a62a8@cs.umass.edu \
--to=moss@cs.umass.edu \
--cc=dan.j.williams@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
--cc=vishal.l.verma@intel.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