On Fri 01-03-19 11:12:41, Matthew Wilcox wrote: > The radix tree would rewind the index in an iterator to the lowest index > of a multi-slot entry. The XArray iterators instead leave the index > unchanged, but I overlooked that when converting DAX from the radix tree > to the XArray. Adjust the index that we use for flushing to the start > of the PMD range. > > Fixes: c1901cd33cf4 "page cache: Convert find_get_entries_tag to XArray" > Reported-by: Piotr Balcer <piotr.balcer@xxxxxxxxx> > Tested-by: Dan Williams <dan.j.williams@xxxxxxxxx> > Signed-off-by: Matthew Wilcox <willy@xxxxxxxxxxxxx> > --- ... > @@ -917,8 +917,7 @@ static int dax_writeback_one(struct xa_state *xas, struct dax_device *dax_dev, > xas_clear_mark(xas, PAGECACHE_TAG_DIRTY); > dax_wake_entry(xas, entry, false); > > - trace_dax_writeback_one(mapping->host, xas->xa_index, > - size >> PAGE_SHIFT); > + trace_dax_writeback_one(mapping->host, xas->xa_index, count); I think here should be 'index' as well, shouldn't it? Otherwise the tracing data will be somewhat misleading... Besides this the patch looks good to me now so feel free to add: Reviewed-by: Jan Kara <jack@xxxxxxx> Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR