iomap: add a io_private field to struct iomap_ioend
authorChristoph Hellwig <hch@lst.de>
Thu, 6 Feb 2025 06:40:06 +0000 (07:40 +0100)
committerChristian Brauner <brauner@kernel.org>
Thu, 6 Feb 2025 12:02:15 +0000 (13:02 +0100)
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>
fs/iomap/ioend.c
include/linux/iomap.h

index 44f254ecab5591d9675711e98ff91b4e3356829a..18894ebba6db1e47ecefe1a4bed0d33e77c9b48a 100644 (file)
@@ -23,6 +23,7 @@ struct iomap_ioend *iomap_init_ioend(struct inode *inode,
        ioend->io_offset = file_offset;
        ioend->io_size = bio->bi_iter.bi_size;
        ioend->io_sector = bio->bi_iter.bi_sector;
+       ioend->io_private = NULL;
        return ioend;
 }
 EXPORT_SYMBOL_GPL(iomap_init_ioend);
index 5768b9f2a1cc39bfdb9e0fcca97751b9f7eeb835..b4be07e8ec94dcfeaa9e5860ad0ff4f75c42d932 100644 (file)
@@ -370,6 +370,7 @@ struct iomap_ioend {
        struct iomap_ioend      *io_parent;     /* parent for completions */
        loff_t                  io_offset;      /* offset in the file */
        sector_t                io_sector;      /* start sector of ioend */
+       void                    *io_private;    /* file system private data */
        struct bio              io_bio;         /* MUST BE LAST! */
 };