summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/iomap.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index e180dacf434c..1fd66bc29cc1 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -220,9 +220,8 @@ struct iomap_ops {
* It is updated at the same time as @pos.
* @iter_start_pos: The original start pos for the current iomap. Used for
* incremental iter advance.
- * @processed: The number of bytes the most recent iteration needs iomap_iter()
- * to advance the iter, zero if the iter was already advanced, or a
- * negative errno for an error during the operation.
+ * @status: Status of the most recent iteration. Zero on success or a negative
+ * errno on error.
* @flags: Zero or more of the iomap_begin flags above.
* @iomap: Map describing the I/O iteration
* @srcmap: Source map for COW operations
@@ -232,7 +231,7 @@ struct iomap_iter {
loff_t pos;
u64 len;
loff_t iter_start_pos;
- s64 processed;
+ int status;
unsigned flags;
struct iomap iomap;
struct iomap srcmap;
@@ -273,6 +272,16 @@ static inline u64 iomap_length(const struct iomap_iter *iter)
}
/**
+ * iomap_iter_advance_full - advance by the full length of current map
+ */
+static inline int iomap_iter_advance_full(struct iomap_iter *iter)
+{
+ u64 length = iomap_length(iter);
+
+ return iomap_iter_advance(iter, &length);
+}
+
+/**
* iomap_iter_srcmap - return the source map for the current iomap iteration
* @i: iteration structure
*