lkml.org 
[lkml]   [2020]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 5/9] XArray: entry in last level is not expected to be a node
On Mon, Apr 06, 2020 at 01:24:53AM +0000, Wei Yang wrote:
>On Mon, Mar 30, 2020 at 05:48:42AM -0700, Matthew Wilcox wrote:
>>On Mon, Mar 30, 2020 at 12:36:39PM +0000, Wei Yang wrote:
>>> If an entry is at the last level, whose parent's shift is 0, it is not
>>> expected to be a node. We can just leverage the xa_is_node() check to
>>> break the loop instead of check shift additionally.
>>
>>I know you didn't run the test suite after making this change.
>

Matthew

Have you got my mail?

>Well, I got your point finally. From commit 76b4e5299565 ('XArray: Permit
>storing 2-byte-aligned pointers'), xa_is_node() will not be *ACURATE*. Those
>2-byte align pointers will be treated as node too.
>
>Well, I found another thing, but not sure whether you have fixed this or not.
>
>If applying following change
>
>@@ -1461,6 +1461,11 @@ static void check_align_1(struct xarray *xa, char *name)
> GFP_KERNEL) != 0);
> XA_BUG_ON(xa, id != i);
> }
>+ XA_STATE_ORDER(xas, xa, 0, 0);
>+ entry = xas_find_conflict(&xas);
> xa_for_each(xa, index, entry)
> XA_BUG_ON(xa, xa_is_err(entry));
> xa_destroy(xa);
>
>We trigger an error message. The reason is the same. And we can fix this with
>the same approach in xas_find_conflict().
>
>If you think this is the proper way, I would add a patch for this.
>
>--
>Wei Yang
>Help you, Help me

--
Wei Yang
Help you, Help me

\
 
 \ /
  Last update: 2020-04-11 15:57    [W:0.300 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site