[prev in list] [next in list] [prev in thread] [next in thread]
List: kvm-ppc
Subject: Re: [PATCH 1/2] ext4/xfs: add page refcount helper
From: Ralph Campbell <rcampbell () nvidia ! com>
Date: 2020-09-28 22:20:48
Message-ID: e56a1de5-6bd7-9f18-60ce-0493bcdc6413 () nvidia ! com
[Download RAW message or body]
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(page),
>> TASK_INTERRUPTIBLE, 0, 0,
>> ext4_wait_dax_page(ei));
>
>> +++ b/fs/xfs/xfs_file.c
>> @@ -750,7 +750,7 @@ xfs_break_dax_layouts(
>>
>> *retry = true;
>> return ___wait_var_event(&page->_refcount,
>> - atomic_read(&page->_refcount) == 1, TASK_INTERRUPTIBLE,
>> + dax_layout_is_idle_page(page), TASK_INTERRUPTIBLE,
>> 0, 0, xfs_wait_dax_page(inode));
>> }
>
> I still think a litte helper macro would be nice here:
>
> #define dax_wait_page(_inode, _page, _wait_cb) \
> ___wait_var_event(&(_page)->_refcount, \
> atomic_read(&(_page)->_refcount) == 1, \
> TASK_INTERRUPTIBLE, dax_layout_is_idle_page(_page), \
> TASK_INTERRUPTIBLE, 0, 0, _wait_cb(_inode));
OK, I'll add it in v3.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic