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
Showing the changes to include/linux (1 of 11 files). Show all
Unified · Split
| @@ -54,6 +54,7 @@ struct dax_device *alloc_dax(void *private, const struct dax_operations *ops); · 53 unmodified lines | ||
| 54 | 54 | void *dax_holder(struct dax_device *dax_dev); |
| 55 | 55 | void put_dax(struct dax_device *dax_dev); |
| 56 | 56 | void kill_dax(struct dax_device *dax_dev); |
| 57 | +struct dax_device *dax_dev_get(dev_t devt); | |
| 57 | 58 | void dax_write_cache(struct dax_device *dax_dev, bool wc); |
| 58 | 59 | bool dax_write_cache_enabled(struct dax_device *dax_dev); |
| 59 | 60 | 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 | ||
| 130 | 131 | void dax_remove_host(struct gendisk *disk); |
| 131 | 132 | struct dax_device *fs_dax_get_by_bdev(struct block_device *bdev, u64 *start_off, |
| 132 | 133 | void *holder, const struct dax_holder_operations *ops); |
| 133 | −void fs_put_dax(struct dax_device *dax_dev, void *holder); | |
| 134 | 134 | #else |
| 135 | 135 | static inline int dax_add_host(struct dax_device *dax_dev, struct gendisk *disk) |
| 136 | 136 | { |
| @@ -145,14 +145,15 @@ static inline struct dax_device *fs_dax_get_by_bdev(struct block_device *bdev, · 8 unmodified lines | ||
| 145 | 145 | { |
| 146 | 146 | return NULL; |
| 147 | 147 | } |
| 148 | −static inline void fs_put_dax(struct dax_device *dax_dev, void *holder) | |
| 149 | −{ | |
| 150 | −} | |
| 151 | 148 | #endif /* CONFIG_BLOCK && CONFIG_FS_DAX */ |
| 152 | 149 | |
| 153 | 150 | #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); | |
| 154 | 154 | int dax_writeback_mapping_range(struct address_space *mapping, |
| 155 | 155 | struct dax_device *dax_dev, struct writeback_control *wbc); |
| 156 | +int dax_folio_reset_order(struct folio *folio); | |
| 156 | 157 | |
| 157 | 158 | struct page *dax_layout_busy_page(struct address_space *mapping); |
| 158 | 159 | 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 | ||
| 163 | 164 | void dax_unlock_mapping_entry(struct address_space *mapping, |
| 164 | 165 | unsigned long index, dax_entry_t cookie); |
| 165 | 166 | #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 | +} | |
| 166 | 176 | static inline struct page *dax_layout_busy_page(struct address_space *mapping) |
| 167 | 177 | { |
| 168 | 178 | return NULL; |
| @@ -242,6 +252,7 @@ static inline void dax_break_layout_final(struct inode *inode) · 73 unmodified lines | ||
| 242 | 252 | |
| 243 | 253 | bool dax_alive(struct dax_device *dax_dev); |
| 244 | 254 | void *dax_get_private(struct dax_device *dax_dev); |
| 255 | +int dax_set_ops(struct dax_device *dax_dev, const struct dax_operations *ops); | |
| 245 | 256 | long dax_direct_access(struct dax_device *dax_dev, pgoff_t pgoff, long nr_pages, |
| 246 | 257 | enum dax_access_mode mode, void **kaddr, unsigned long *pfn); |
| 247 | 258 | size_t dax_copy_from_iter(struct dax_device *dax_dev, pgoff_t pgoff, void *addr, |