mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 19:13:47 +02:00
iomap: pass the iomap_iter to ->submit_read
This provides additional context for file systems. Rename the fuse instance to match the method name while we're at it. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://patch.msgid.link/20260223132021.292832-10-hch@lst.de Tested-by: Anuj Gupta <anuj20.g@samsung.com> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
2580a0095f
commit
4d25c7d688
|
|
@ -947,7 +947,8 @@ static int fuse_iomap_read_folio_range_async(const struct iomap_iter *iter,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void fuse_iomap_read_submit(struct iomap_read_folio_ctx *ctx)
|
||||
static void fuse_iomap_submit_read(const struct iomap_iter *iter,
|
||||
struct iomap_read_folio_ctx *ctx)
|
||||
{
|
||||
struct fuse_fill_read_data *data = ctx->read_ctx;
|
||||
|
||||
|
|
@ -958,7 +959,7 @@ static void fuse_iomap_read_submit(struct iomap_read_folio_ctx *ctx)
|
|||
|
||||
static const struct iomap_read_ops fuse_iomap_read_ops = {
|
||||
.read_folio_range = fuse_iomap_read_folio_range_async,
|
||||
.submit_read = fuse_iomap_read_submit,
|
||||
.submit_read = fuse_iomap_submit_read,
|
||||
};
|
||||
|
||||
static int fuse_read_folio(struct file *file, struct folio *folio)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ static void iomap_read_end_io(struct bio *bio)
|
|||
bio_put(bio);
|
||||
}
|
||||
|
||||
static void iomap_bio_submit_read(struct iomap_read_folio_ctx *ctx)
|
||||
static void iomap_bio_submit_read(const struct iomap_iter *iter,
|
||||
struct iomap_read_folio_ctx *ctx)
|
||||
{
|
||||
struct bio *bio = ctx->read_ctx;
|
||||
|
||||
|
|
|
|||
|
|
@ -597,7 +597,7 @@ void iomap_read_folio(const struct iomap_ops *ops,
|
|||
&bytes_submitted);
|
||||
|
||||
if (ctx->ops->submit_read)
|
||||
ctx->ops->submit_read(ctx);
|
||||
ctx->ops->submit_read(&iter, ctx);
|
||||
|
||||
if (ctx->cur_folio)
|
||||
iomap_read_end(ctx->cur_folio, bytes_submitted);
|
||||
|
|
@ -664,7 +664,7 @@ void iomap_readahead(const struct iomap_ops *ops,
|
|||
&cur_bytes_submitted);
|
||||
|
||||
if (ctx->ops->submit_read)
|
||||
ctx->ops->submit_read(ctx);
|
||||
ctx->ops->submit_read(&iter, ctx);
|
||||
|
||||
if (ctx->cur_folio)
|
||||
iomap_read_end(ctx->cur_folio, cur_bytes_submitted);
|
||||
|
|
|
|||
|
|
@ -651,7 +651,8 @@ static int ntfs_iomap_bio_read_folio_range(const struct iomap_iter *iter,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void ntfs_iomap_bio_submit_read(struct iomap_read_folio_ctx *ctx)
|
||||
static void ntfs_iomap_bio_submit_read(const struct iomap_iter *iter,
|
||||
struct iomap_read_folio_ctx *ctx)
|
||||
{
|
||||
struct bio *bio = ctx->read_ctx;
|
||||
|
||||
|
|
|
|||
|
|
@ -512,7 +512,8 @@ struct iomap_read_ops {
|
|||
*
|
||||
* This is optional.
|
||||
*/
|
||||
void (*submit_read)(struct iomap_read_folio_ctx *ctx);
|
||||
void (*submit_read)(const struct iomap_iter *iter,
|
||||
struct iomap_read_folio_ctx *ctx);
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user