hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/include/linux/dm-bufio.h
....@@ -119,6 +119,11 @@
119119 int dm_bufio_issue_flush(struct dm_bufio_client *c);
120120
121121 /*
122
+ * Send a discard request to the underlying device.
123
+ */
124
+int dm_bufio_issue_discard(struct dm_bufio_client *c, sector_t block, sector_t count);
125
+
126
+/*
122127 * Like dm_bufio_release but also move the buffer to the new
123128 * block. dm_bufio_write_dirty_buffers is needed to commit the new block.
124129 */
....@@ -132,6 +137,13 @@
132137 void dm_bufio_forget(struct dm_bufio_client *c, sector_t block);
133138
134139 /*
140
+ * Free the given range of buffers.
141
+ * This is just a hint, if the buffer is in use or dirty, this function
142
+ * does nothing.
143
+ */
144
+void dm_bufio_forget_buffers(struct dm_bufio_client *c, sector_t block, sector_t n_blocks);
145
+
146
+/*
135147 * Set the minimum number of buffers before cleanup happens.
136148 */
137149 void dm_bufio_set_minimum_buffers(struct dm_bufio_client *c, unsigned n);