Re: [RFC 05/10] fs/dax: Refactor wait for dax idle page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux