Skip to content

Commit d06244c

Browse files
Christoph Hellwigbrauner
authored andcommitted
iomap: add a io_private field to struct iomap_ioend
Add a private data field to struct iomap_ioend so that the file system can attach information to it. Zoned XFS will use this for a pointer to the open zone. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250206064035.2323428-9-hch@lst.de Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent e523f2d commit d06244c

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

fs/iomap/ioend.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ struct iomap_ioend *iomap_init_ioend(struct inode *inode,
2323
ioend->io_offset = file_offset;
2424
ioend->io_size = bio->bi_iter.bi_size;
2525
ioend->io_sector = bio->bi_iter.bi_sector;
26+
ioend->io_private = NULL;
2627
return ioend;
2728
}
2829
EXPORT_SYMBOL_GPL(iomap_init_ioend);

include/linux/iomap.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ struct iomap_ioend {
370370
struct iomap_ioend *io_parent; /* parent for completions */
371371
loff_t io_offset; /* offset in the file */
372372
sector_t io_sector; /* start sector of ioend */
373+
void *io_private; /* file system private data */
373374
struct bio io_bio; /* MUST BE LAST! */
374375
};
375376

0 commit comments

Comments
 (0)