* [PATCH v2 5/5] iomap: remove unused private field from ioend [not found] <20210409141210.1000155-1-bfoster@redhat.com> @ 2021-04-09 14:12 ` Brian Foster 2021-04-09 16:40 ` Darrick J. Wong 0 siblings, 1 reply; 2+ messages in thread From: Brian Foster @ 2021-04-09 14:12 UTC (permalink / raw) To: linux-xfs; +Cc: linux-fsdevel The only remaining user of ->io_private is the generic ioend merging infrastructure. The only user of that is XFS, which no longer sets ->io_private or passes an associated merge callback. Remove the unused parameter and the ->io_private field. CC: linux-fsdevel@vger.kernel.org Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> --- fs/iomap/buffered-io.c | 7 +------ fs/xfs/xfs_aops.c | 2 +- include/linux/iomap.h | 5 +---- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 414769a6ad11..b7753a7907e2 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -1134,9 +1134,7 @@ iomap_ioend_can_merge(struct iomap_ioend *ioend, struct iomap_ioend *next) } void -iomap_ioend_try_merge(struct iomap_ioend *ioend, struct list_head *more_ioends, - void (*merge_private)(struct iomap_ioend *ioend, - struct iomap_ioend *next)) +iomap_ioend_try_merge(struct iomap_ioend *ioend, struct list_head *more_ioends) { struct iomap_ioend *next; @@ -1148,8 +1146,6 @@ iomap_ioend_try_merge(struct iomap_ioend *ioend, struct list_head *more_ioends, break; list_move_tail(&next->io_list, &ioend->io_list); ioend->io_size += next->io_size; - if (next->io_private && merge_private) - merge_private(ioend, next); } } EXPORT_SYMBOL_GPL(iomap_ioend_try_merge); @@ -1235,7 +1231,6 @@ iomap_alloc_ioend(struct inode *inode, struct iomap_writepage_ctx *wpc, ioend->io_inode = inode; ioend->io_size = 0; ioend->io_offset = offset; - ioend->io_private = NULL; ioend->io_bio = bio; return ioend; } diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 8540180bd106..8275ee09733d 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -146,7 +146,7 @@ xfs_end_io( while ((ioend = list_first_entry_or_null(&tmp, struct iomap_ioend, io_list))) { list_del_init(&ioend->io_list); - iomap_ioend_try_merge(ioend, &tmp, NULL); + iomap_ioend_try_merge(ioend, &tmp); xfs_end_ioend(ioend); } } diff --git a/include/linux/iomap.h b/include/linux/iomap.h index d202fd2d0f91..c87d0cb0de6d 100644 --- a/include/linux/iomap.h +++ b/include/linux/iomap.h @@ -198,7 +198,6 @@ struct iomap_ioend { struct inode *io_inode; /* file being written to */ size_t io_size; /* size of the extent */ loff_t io_offset; /* offset in the file */ - void *io_private; /* file system private data */ struct bio *io_bio; /* bio being built */ struct bio io_inline_bio; /* MUST BE LAST! */ }; @@ -234,9 +233,7 @@ struct iomap_writepage_ctx { void iomap_finish_ioends(struct iomap_ioend *ioend, int error); void iomap_ioend_try_merge(struct iomap_ioend *ioend, - struct list_head *more_ioends, - void (*merge_private)(struct iomap_ioend *ioend, - struct iomap_ioend *next)); + struct list_head *more_ioends); void iomap_sort_ioends(struct list_head *ioend_list); int iomap_writepage(struct page *page, struct writeback_control *wbc, struct iomap_writepage_ctx *wpc, -- 2.26.3 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 5/5] iomap: remove unused private field from ioend 2021-04-09 14:12 ` [PATCH v2 5/5] iomap: remove unused private field from ioend Brian Foster @ 2021-04-09 16:40 ` Darrick J. Wong 0 siblings, 0 replies; 2+ messages in thread From: Darrick J. Wong @ 2021-04-09 16:40 UTC (permalink / raw) To: Brian Foster; +Cc: linux-xfs, linux-fsdevel On Fri, Apr 09, 2021 at 10:12:10AM -0400, Brian Foster wrote: > The only remaining user of ->io_private is the generic ioend merging > infrastructure. The only user of that is XFS, which no longer sets > ->io_private or passes an associated merge callback. Remove the > unused parameter and the ->io_private field. > > CC: linux-fsdevel@vger.kernel.org > Signed-off-by: Brian Foster <bfoster@redhat.com> > Reviewed-by: Christoph Hellwig <hch@lst.de> Looks good to me. If anyone actually wants to start using io_private, the time to holler is _right now_. Reviewed-by: Darrick J. Wong <djwong@kernel.org> --D > --- > fs/iomap/buffered-io.c | 7 +------ > fs/xfs/xfs_aops.c | 2 +- > include/linux/iomap.h | 5 +---- > 3 files changed, 3 insertions(+), 11 deletions(-) > > diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c > index 414769a6ad11..b7753a7907e2 100644 > --- a/fs/iomap/buffered-io.c > +++ b/fs/iomap/buffered-io.c > @@ -1134,9 +1134,7 @@ iomap_ioend_can_merge(struct iomap_ioend *ioend, struct iomap_ioend *next) > } > > void > -iomap_ioend_try_merge(struct iomap_ioend *ioend, struct list_head *more_ioends, > - void (*merge_private)(struct iomap_ioend *ioend, > - struct iomap_ioend *next)) > +iomap_ioend_try_merge(struct iomap_ioend *ioend, struct list_head *more_ioends) > { > struct iomap_ioend *next; > > @@ -1148,8 +1146,6 @@ iomap_ioend_try_merge(struct iomap_ioend *ioend, struct list_head *more_ioends, > break; > list_move_tail(&next->io_list, &ioend->io_list); > ioend->io_size += next->io_size; > - if (next->io_private && merge_private) > - merge_private(ioend, next); > } > } > EXPORT_SYMBOL_GPL(iomap_ioend_try_merge); > @@ -1235,7 +1231,6 @@ iomap_alloc_ioend(struct inode *inode, struct iomap_writepage_ctx *wpc, > ioend->io_inode = inode; > ioend->io_size = 0; > ioend->io_offset = offset; > - ioend->io_private = NULL; > ioend->io_bio = bio; > return ioend; > } > diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c > index 8540180bd106..8275ee09733d 100644 > --- a/fs/xfs/xfs_aops.c > +++ b/fs/xfs/xfs_aops.c > @@ -146,7 +146,7 @@ xfs_end_io( > while ((ioend = list_first_entry_or_null(&tmp, struct iomap_ioend, > io_list))) { > list_del_init(&ioend->io_list); > - iomap_ioend_try_merge(ioend, &tmp, NULL); > + iomap_ioend_try_merge(ioend, &tmp); > xfs_end_ioend(ioend); > } > } > diff --git a/include/linux/iomap.h b/include/linux/iomap.h > index d202fd2d0f91..c87d0cb0de6d 100644 > --- a/include/linux/iomap.h > +++ b/include/linux/iomap.h > @@ -198,7 +198,6 @@ struct iomap_ioend { > struct inode *io_inode; /* file being written to */ > size_t io_size; /* size of the extent */ > loff_t io_offset; /* offset in the file */ > - void *io_private; /* file system private data */ > struct bio *io_bio; /* bio being built */ > struct bio io_inline_bio; /* MUST BE LAST! */ > }; > @@ -234,9 +233,7 @@ struct iomap_writepage_ctx { > > void iomap_finish_ioends(struct iomap_ioend *ioend, int error); > void iomap_ioend_try_merge(struct iomap_ioend *ioend, > - struct list_head *more_ioends, > - void (*merge_private)(struct iomap_ioend *ioend, > - struct iomap_ioend *next)); > + struct list_head *more_ioends); > void iomap_sort_ioends(struct list_head *ioend_list); > int iomap_writepage(struct page *page, struct writeback_control *wbc, > struct iomap_writepage_ctx *wpc, > -- > 2.26.3 > ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-09 16:40 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20210409141210.1000155-1-bfoster@redhat.com> 2021-04-09 14:12 ` [PATCH v2 5/5] iomap: remove unused private field from ioend Brian Foster 2021-04-09 16:40 ` Darrick J. Wong
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).