On Mon, May 21, 2018 at 03:25:24AM -0700, Matthew Wilcox wrote: > On Sun, May 20, 2018 at 10:47:56PM -0600, Ross Zwisler wrote: > > On Sat, Apr 14, 2018 at 07:13:07AM -0700, Matthew Wilcox wrote: > > > From: Matthew Wilcox <mawilcox@xxxxxxxxxxxxx> > > > > > > Since the XArray is embedded in the struct address_space, this contains > > > exactly as much entropy as the address of the mapping. > > > > I agree that they both have the same amount of entropy, but what's the > > benefit? It doesn't seem like this changes any behavior, fixes any bugs or > > makes things any simpler? > > This is a preparatory patch for some of the changes later in the series. > It has no benefit in and of itself; the benefit comes later when we > switch from dax_wake_mapping_entry() to dax_wake_entry(): > > static void dax_wake_entry(struct xa_state *xas, bool wake_all) > > This switch could be left until the end; I can introduce dax_wake_entry() > without this change: > > +static void dax_wake_entry(struct xa_state *xas, bool wake_all) > +{ > + struct address_space *mapping = container_of(xas->xa, > + struct address_space, i_pages); > + return dax_wake_mapping_entry_waiter(mapping, xas->xa_index, NULL, > + wake_all); > +} > > and then cut everybody over in the final step. > > Or I can just explain in the changelog that it's a preparatory step. Sure, just a note in the changelog saying that it's a preparatory step would be good enough for me.