Re: [PATCH 1/2] ext4/xfs: add page refcount helper

2020-09-28 Thread Ralph Campbell
On 9/25/20 11:35 PM, Christoph Hellwig wrote: On Fri, Sep 25, 2020 at 01:44:41PM -0700, Ralph Campbell wrote: error = ___wait_var_event(&page->_refcount, - atomic_read(&page->_refcount) == 1, + dax_layout_is_idle_page(

Re: [PATCH 1/2] ext4/xfs: add page refcount helper

2020-09-25 Thread Christoph Hellwig
On Fri, Sep 25, 2020 at 01:44:41PM -0700, Ralph Campbell wrote: > error = ___wait_var_event(&page->_refcount, > - atomic_read(&page->_refcount) == 1, > + dax_layout_is_idle_page(page), > TASK_INTERRU

Re: [PATCH 1/2] ext4/xfs: add page refcount helper

2020-09-25 Thread Ralph Campbell
On 9/25/20 1:51 PM, Dan Williams wrote: On Fri, Sep 25, 2020 at 1:45 PM Ralph Campbell wrote: There are several places where ZONE_DEVICE struct pages assume a reference count == 1 means the page is idle and free. Instead of open coding this, add a helper function to hide this detail. Signed

Re: [PATCH 1/2] ext4/xfs: add page refcount helper

2020-09-25 Thread Dan Williams
On Fri, Sep 25, 2020 at 1:45 PM Ralph Campbell wrote: > > There are several places where ZONE_DEVICE struct pages assume a reference > count == 1 means the page is idle and free. Instead of open coding this, > add a helper function to hide this detail. > > Signed-off-by: Ralph Campbell > --- > f

[PATCH 1/2] ext4/xfs: add page refcount helper

2020-09-25 Thread Ralph Campbell
There are several places where ZONE_DEVICE struct pages assume a reference count == 1 means the page is idle and free. Instead of open coding this, add a helper function to hide this detail. Signed-off-by: Ralph Campbell --- fs/dax.c| 8 fs/ext4/inode.c | 2 +- fs/xfs/xf