From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Gruenbacher Date: Tue, 23 May 2023 14:46:07 +0200 Subject: [Cluster-devel] [PATCH 5/6] gfs2: Support ludicrously large folios in gfs2_trans_add_databufs() In-Reply-To: <20230517032442.1135379-6-willy@infradead.org> References: <20230517032442.1135379-1-willy@infradead.org> <20230517032442.1135379-6-willy@infradead.org> Message-ID: List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Wed, May 17, 2023 at 5:24?AM Matthew Wilcox (Oracle) wrote: > We may someday support folios larger than 4GB, so use a size_t for > the byte count within a folio to prevent unpleasant truncations. > > Signed-off-by: Matthew Wilcox (Oracle) > --- > fs/gfs2/aops.c | 2 +- > fs/gfs2/aops.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c > index e97462a5302e..8da4397aafc6 100644 > --- a/fs/gfs2/aops.c > +++ b/fs/gfs2/aops.c > @@ -38,7 +38,7 @@ > > > void gfs2_trans_add_databufs(struct gfs2_inode *ip, struct folio *folio, > - unsigned int from, unsigned int len) > + size_t from, size_t len) > { > struct buffer_head *head = folio_buffers(folio); > unsigned int bsize = head->b_size; This only makes sense if the to, start, and end variables in gfs2_trans_add_databufs() are changed from unsigned int to size_t as well. > diff --git a/fs/gfs2/aops.h b/fs/gfs2/aops.h > index 09db1914425e..f08322ef41cf 100644 > --- a/fs/gfs2/aops.h > +++ b/fs/gfs2/aops.h > @@ -10,6 +10,6 @@ > > extern void adjust_fs_space(struct inode *inode); > extern void gfs2_trans_add_databufs(struct gfs2_inode *ip, struct folio *folio, > - unsigned int from, unsigned int len); > + size_t from, size_t len); > > #endif /* __AOPS_DOT_H__ */ > -- > 2.39.2 > Thanks, Andreas