History

Merge tag 'libnvdimm-for-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm

Pull dax updates from Ira Weiny: "The series adds DAX support required for the upcoming fuse/famfs file system.[1] The support here is required because famfs is backed by devdax rather than pmem. This all lays the groundwork for using shared memory as a file system" Link: https://lore.kernel.org/all/0100019d43e5f632-f5862a3e-361c-4b54-a9a6-96c242a8f17a-000000@email.amazonses.com/ [1] * tag 'libnvdimm-for-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: dax/fsdev: fix uninitialized kaddr in fsdev_dax_zero_page_range() dax: export dax_dev_get() dax: Add fs_dax_get() func to prepare dax for fs-dax usage dax: Add dax_set_ops() for setting dax_operations at bind time dax: Add dax_operations for use by fs-dax on fsdev dax dax: Save the kva from memremap dax: add fsdev.c driver for fs-dax on character dax dax: Factor out dax_folio_reset_order() helper dax: move dax_pgoff_to_phys from [drivers/dax/] device.c to bus.c

Linus Torvalds committed 6 months ago

Commit bb0bc492 parents c94faa7 45df91111 files · +566 −50Browse files

Showing the changes to include/linux (1 of 11 files). Show all

Unified · Split

include/linux/dax.h+15−4
@@ -54,6 +54,7 @@ struct dax_device *alloc_dax(void *private, const struct dax_operations *ops); · 53 unmodified lines
5454 void *dax_holder(struct dax_device *dax_dev);
5555 void put_dax(struct dax_device *dax_dev);
5656 void kill_dax(struct dax_device *dax_dev);
57+struct dax_device *dax_dev_get(dev_t devt);
5758 void dax_write_cache(struct dax_device *dax_dev, bool wc);
5859 bool dax_write_cache_enabled(struct dax_device *dax_dev);
5960 bool dax_synchronous(struct dax_device *dax_dev);
@@ -130,7 +131,6 @@ int dax_add_host(struct dax_device *dax_dev, struct gendisk *disk); · 70 unmodified lines
130131 void dax_remove_host(struct gendisk *disk);
131132 struct dax_device *fs_dax_get_by_bdev(struct block_device *bdev, u64 *start_off,
132133 void *holder, const struct dax_holder_operations *ops);
133−void fs_put_dax(struct dax_device *dax_dev, void *holder);
134134 #else
135135 static inline int dax_add_host(struct dax_device *dax_dev, struct gendisk *disk)
136136 {
@@ -145,14 +145,15 @@ static inline struct dax_device *fs_dax_get_by_bdev(struct block_device *bdev, · 8 unmodified lines
145145 {
146146 return NULL;
147147 }
148−static inline void fs_put_dax(struct dax_device *dax_dev, void *holder)
149−{
150−}
151148 #endif /* CONFIG_BLOCK && CONFIG_FS_DAX */
152149
153150 #if IS_ENABLED(CONFIG_FS_DAX)
151+void fs_put_dax(struct dax_device *dax_dev, void *holder);
152+int fs_dax_get(struct dax_device *dax_dev, void *holder,
153+ const struct dax_holder_operations *hops);
154154 int dax_writeback_mapping_range(struct address_space *mapping,
155155 struct dax_device *dax_dev, struct writeback_control *wbc);
156+int dax_folio_reset_order(struct folio *folio);
156157
157158 struct page *dax_layout_busy_page(struct address_space *mapping);
158159 struct page *dax_layout_busy_page_range(struct address_space *mapping, loff_t start, loff_t end);
@@ -163,6 +164,15 @@ dax_entry_t dax_lock_mapping_entry(struct address_space *mapping, · 4 unmodified lines
163164 void dax_unlock_mapping_entry(struct address_space *mapping,
164165 unsigned long index, dax_entry_t cookie);
165166 #else
167+static inline void fs_put_dax(struct dax_device *dax_dev, void *holder)
168+{
169+}
170+
171+static inline int fs_dax_get(struct dax_device *dax_dev, void *holder,
172+ const struct dax_holder_operations *hops)
173+{
174+ return -EOPNOTSUPP;
175+}
166176 static inline struct page *dax_layout_busy_page(struct address_space *mapping)
167177 {
168178 return NULL;
@@ -242,6 +252,7 @@ static inline void dax_break_layout_final(struct inode *inode) · 73 unmodified lines
242252
243253 bool dax_alive(struct dax_device *dax_dev);
244254 void *dax_get_private(struct dax_device *dax_dev);
255+int dax_set_ops(struct dax_device *dax_dev, const struct dax_operations *ops);
245256 long dax_direct_access(struct dax_device *dax_dev, pgoff_t pgoff, long nr_pages,
246257 enum dax_access_mode mode, void **kaddr, unsigned long *pfn);
247258 size_t dax_copy_from_iter(struct dax_device *dax_dev, pgoff_t pgoff, void *addr,