Re: BUG_ON(!mapping_empty(>i_data))

2021-04-02 Thread Hugh Dickins
On Fri, 2 Apr 2021, Hugh Dickins wrote: > > There is a "Put holes back where they were" xas_store(, NULL) on > the failure path, which I think we would expect to delete empty nodes. > But it only goes as far as nr_none. Is it ok to xas_store(, NULL) > where there was no non-NULL entry before? I

Re: BUG_ON(!mapping_empty(>i_data))

2021-04-02 Thread Hugh Dickins
On Fri, 2 Apr 2021, Matthew Wilcox wrote: > OK, more competent testing, and that previous bug now detected and fixed. > I have a reasonable amount of confidence this will solve your problem. > If you do apply this patch, don't enable CONFIG_TEST_XARRAY as the new > tests assume that attempting to

Re: BUG_ON(!mapping_empty(>i_data))

2021-04-02 Thread Matthew Wilcox
OK, more competent testing, and that previous bug now detected and fixed. I have a reasonable amount of confidence this will solve your problem. If you do apply this patch, don't enable CONFIG_TEST_XARRAY as the new tests assume that attempting to allocate with a GFP flags of 0 will definitely

Re: BUG_ON(!mapping_empty(>i_data))

2021-04-02 Thread Matthew Wilcox
On Fri, Apr 02, 2021 at 04:13:05AM +0100, Matthew Wilcox wrote: > + for (;;) { > + xas_load(xas); > + if (!xas_is_node(xas)) > + break; > + xas_delete_node(xas); > + xas->xa_index -= XA_CHUNK_SIZE; > + if

Re: BUG_ON(!mapping_empty(>i_data))

2021-04-01 Thread Matthew Wilcox
On Thu, Apr 01, 2021 at 06:06:15PM +0100, Matthew Wilcox wrote: > On Wed, Mar 31, 2021 at 02:58:12PM -0700, Hugh Dickins wrote: > > I suspect there's a bug in the XArray handling in collapse_file(), > > which sometimes leaves empty nodes behind. > > Urp, yes, that can easily happen. > >

Re: BUG_ON(!mapping_empty(>i_data))

2021-04-01 Thread Matthew Wilcox
On Wed, Mar 31, 2021 at 02:58:12PM -0700, Hugh Dickins wrote: > I suspect there's a bug in the XArray handling in collapse_file(), > which sometimes leaves empty nodes behind. Urp, yes, that can easily happen. /* This will be less messy when we use multi-index entries */ do {

Re: BUG_ON(!mapping_empty(>i_data))

2021-03-31 Thread Hugh Dickins
lear_inode()'s BUG_ON(!mapping_empty(>i_data)); on two > > machines, within an hour or few, repeatably though not to order. > > > > The stack backtrace has always been clear_inode < ext4_clear_inode < > > ext4_evict_inode < evict < dispose_list < prune_icache

Re: BUG_ON(!mapping_empty(>i_data))

2021-03-30 Thread Matthew Wilcox
On Tue, Mar 30, 2021 at 06:30:22PM -0700, Hugh Dickins wrote: > Running my usual tmpfs kernel builds swapping load, on Sunday's rc4-mm1 > mmotm (I never got to try rc3-mm1 but presume it behaved the same way), > I hit clear_inode()'s BUG_ON(!mapping_empty(>i_data)); on two > m

BUG_ON(!mapping_empty(>i_data))

2021-03-30 Thread Hugh Dickins
Running my usual tmpfs kernel builds swapping load, on Sunday's rc4-mm1 mmotm (I never got to try rc3-mm1 but presume it behaved the same way), I hit clear_inode()'s BUG_ON(!mapping_empty(>i_data)); on two machines, within an hour or few, repeatably though not to order. The stack backtrace