[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <748fb175-3c5b-4571-9278-1580747a746a@nvidia.com>
Date: Sat, 13 Apr 2024 13:19:07 -0700
From: John Hubbard <jhubbard@...dia.com>
To: Alistair Popple <apopple@...dia.com>, <linux-mm@...ck.org>
CC: <david@...morbit.com>, <dan.j.williams@...el.com>, <rcampbell@...dia.com>,
<willy@...radead.org>, <jgg@...dia.com>, <linux-fsdevel@...r.kernel.org>,
<jack@...e.cz>, <djwong@...nel.org>, <hch@....de>, <david@...hat.com>,
<ruansy.fnst@...itsu.com>, <nvdimm@...ts.linux.dev>,
<linux-xfs@...r.kernel.org>, <linux-ext4@...r.kernel.org>,
<jglisse@...hat.com>
Subject: Re: [RFC 05/10] fs/dax: Refactor wait for dax idle page
On 4/10/24 5:57 PM, Alistair Popple wrote:
...
> diff --git a/include/linux/dax.h b/include/linux/dax.h
> index 22cd990..bced4d4 100644
> --- a/include/linux/dax.h
> +++ b/include/linux/dax.h
> @@ -212,6 +212,17 @@ int dax_zero_range(struct inode *inode, loff_t pos, loff_t len, bool *did_zero,
> int dax_truncate_page(struct inode *inode, loff_t pos, bool *did_zero,
> const struct iomap_ops *ops);
>
> +static inline int dax_wait_page_idle(struct page *page,
> + void (cb)(struct inode *),
> + struct inode *inode)
> +{
> + int ret;
> +
> + ret = ___wait_var_event(page, page_ref_count(page) == 1,
> + TASK_INTERRUPTIBLE, 0, 0, cb(inode));
> + return ret;
> +}
Or just:
{
return ___wait_var_event(page, page_ref_count(page) == 1,
TASK_INTERRUPTIBLE, 0, 0, cb(inode));
}
...yes?
thanks,
--
John Hubbard
NVIDIA
Powered by blists - more mailing lists