linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iomap: Export iomap_page_create and iomap_set_range_uptodate
@ 2019-12-10 10:29 Andreas Gruenbacher
  2019-12-10 20:32 ` Darrick J. Wong
  2019-12-12  9:55 ` Christoph Hellwig
  0 siblings, 2 replies; 6+ messages in thread
From: Andreas Gruenbacher @ 2019-12-10 10:29 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: Andreas Gruenbacher, linux-xfs, linux-fsdevel, linux-kernel,
	cluster-devel

These two functions are needed by filesystems for converting inline
("stuffed") inodes into non-inline inodes.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
 fs/iomap/buffered-io.c | 6 ++++--
 include/linux/iomap.h  | 5 +++++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 828444e14d09..e8f6d7ba4e3c 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -41,7 +41,7 @@ static inline struct iomap_page *to_iomap_page(struct page *page)
 
 static struct bio_set iomap_ioend_bioset;
 
-static struct iomap_page *
+struct iomap_page *
 iomap_page_create(struct inode *inode, struct page *page)
 {
 	struct iomap_page *iop = to_iomap_page(page);
@@ -64,6 +64,7 @@ iomap_page_create(struct inode *inode, struct page *page)
 	SetPagePrivate(page);
 	return iop;
 }
+EXPORT_SYMBOL(iomap_page_create);
 
 static void
 iomap_page_release(struct page *page)
@@ -164,7 +165,7 @@ iomap_iop_set_range_uptodate(struct page *page, unsigned off, unsigned len)
 	spin_unlock_irqrestore(&iop->uptodate_lock, flags);
 }
 
-static void
+void
 iomap_set_range_uptodate(struct page *page, unsigned off, unsigned len)
 {
 	if (PageError(page))
@@ -175,6 +176,7 @@ iomap_set_range_uptodate(struct page *page, unsigned off, unsigned len)
 	else
 		SetPageUptodate(page);
 }
+EXPORT_SYMBOL(iomap_set_range_uptodate);
 
 static void
 iomap_read_finish(struct iomap_page *iop, struct page *page)
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index 8b09463dae0d..b00f9bc396b1 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -13,6 +13,7 @@
 struct address_space;
 struct fiemap_extent_info;
 struct inode;
+struct iomap_page;
 struct iomap_writepage_ctx;
 struct iov_iter;
 struct kiocb;
@@ -152,6 +153,10 @@ loff_t iomap_apply(struct inode *inode, loff_t pos, loff_t length,
 		unsigned flags, const struct iomap_ops *ops, void *data,
 		iomap_actor_t actor);
 
+struct iomap_page *iomap_page_create(struct inode *inode, struct page *page);
+void iomap_set_range_uptodate(struct page *page, unsigned off, unsigned len);
+
+
 ssize_t iomap_file_buffered_write(struct kiocb *iocb, struct iov_iter *from,
 		const struct iomap_ops *ops);
 int iomap_readpage(struct page *page, const struct iomap_ops *ops);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] iomap: Export iomap_page_create and iomap_set_range_uptodate
  2019-12-10 10:29 [PATCH] iomap: Export iomap_page_create and iomap_set_range_uptodate Andreas Gruenbacher
@ 2019-12-10 20:32 ` Darrick J. Wong
  2019-12-10 20:39   ` Andreas Grünbacher
  2019-12-12  9:55 ` Christoph Hellwig
  1 sibling, 1 reply; 6+ messages in thread
From: Darrick J. Wong @ 2019-12-10 20:32 UTC (permalink / raw)
  To: Andreas Gruenbacher; +Cc: linux-xfs, linux-fsdevel, linux-kernel, cluster-devel

On Tue, Dec 10, 2019 at 11:29:16AM +0100, Andreas Gruenbacher wrote:
> These two functions are needed by filesystems for converting inline
> ("stuffed") inodes into non-inline inodes.
> 
> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>

Looks fine to me... this is a 5.6 change, correct?

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
>  fs/iomap/buffered-io.c | 6 ++++--
>  include/linux/iomap.h  | 5 +++++
>  2 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
> index 828444e14d09..e8f6d7ba4e3c 100644
> --- a/fs/iomap/buffered-io.c
> +++ b/fs/iomap/buffered-io.c
> @@ -41,7 +41,7 @@ static inline struct iomap_page *to_iomap_page(struct page *page)
>  
>  static struct bio_set iomap_ioend_bioset;
>  
> -static struct iomap_page *
> +struct iomap_page *
>  iomap_page_create(struct inode *inode, struct page *page)
>  {
>  	struct iomap_page *iop = to_iomap_page(page);
> @@ -64,6 +64,7 @@ iomap_page_create(struct inode *inode, struct page *page)
>  	SetPagePrivate(page);
>  	return iop;
>  }
> +EXPORT_SYMBOL(iomap_page_create);
>  
>  static void
>  iomap_page_release(struct page *page)
> @@ -164,7 +165,7 @@ iomap_iop_set_range_uptodate(struct page *page, unsigned off, unsigned len)
>  	spin_unlock_irqrestore(&iop->uptodate_lock, flags);
>  }
>  
> -static void
> +void
>  iomap_set_range_uptodate(struct page *page, unsigned off, unsigned len)
>  {
>  	if (PageError(page))
> @@ -175,6 +176,7 @@ iomap_set_range_uptodate(struct page *page, unsigned off, unsigned len)
>  	else
>  		SetPageUptodate(page);
>  }
> +EXPORT_SYMBOL(iomap_set_range_uptodate);
>  
>  static void
>  iomap_read_finish(struct iomap_page *iop, struct page *page)
> diff --git a/include/linux/iomap.h b/include/linux/iomap.h
> index 8b09463dae0d..b00f9bc396b1 100644
> --- a/include/linux/iomap.h
> +++ b/include/linux/iomap.h
> @@ -13,6 +13,7 @@
>  struct address_space;
>  struct fiemap_extent_info;
>  struct inode;
> +struct iomap_page;
>  struct iomap_writepage_ctx;
>  struct iov_iter;
>  struct kiocb;
> @@ -152,6 +153,10 @@ loff_t iomap_apply(struct inode *inode, loff_t pos, loff_t length,
>  		unsigned flags, const struct iomap_ops *ops, void *data,
>  		iomap_actor_t actor);
>  
> +struct iomap_page *iomap_page_create(struct inode *inode, struct page *page);
> +void iomap_set_range_uptodate(struct page *page, unsigned off, unsigned len);
> +
> +
>  ssize_t iomap_file_buffered_write(struct kiocb *iocb, struct iov_iter *from,
>  		const struct iomap_ops *ops);
>  int iomap_readpage(struct page *page, const struct iomap_ops *ops);
> -- 
> 2.20.1
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] iomap: Export iomap_page_create and iomap_set_range_uptodate
  2019-12-10 20:32 ` Darrick J. Wong
@ 2019-12-10 20:39   ` Andreas Grünbacher
  2019-12-10 21:25     ` Darrick J. Wong
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Grünbacher @ 2019-12-10 20:39 UTC (permalink / raw)
  To: Darrick J. Wong, Christoph Hellwig
  Cc: Andreas Gruenbacher, linux-xfs, Linux FS-devel Mailing List,
	Linux Kernel Mailing List, cluster-devel

Am Di., 10. Dez. 2019 um 21:33 Uhr schrieb Darrick J. Wong
<darrick.wong@oracle.com>:
> On Tue, Dec 10, 2019 at 11:29:16AM +0100, Andreas Gruenbacher wrote:
> > These two functions are needed by filesystems for converting inline
> > ("stuffed") inodes into non-inline inodes.
> >
> > Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
>
> Looks fine to me... this is a 5.6 change, correct?

Yes, so there's still plenty of time to get things in place until
then. I'd like to hear from Christoph if he has any objections. In any
case, this patch isn't going to break anything.

Thanks,
Andreas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] iomap: Export iomap_page_create and iomap_set_range_uptodate
  2019-12-10 20:39   ` Andreas Grünbacher
@ 2019-12-10 21:25     ` Darrick J. Wong
  2019-12-10 21:27       ` Andreas Grünbacher
  0 siblings, 1 reply; 6+ messages in thread
From: Darrick J. Wong @ 2019-12-10 21:25 UTC (permalink / raw)
  To: Andreas Grünbacher
  Cc: Christoph Hellwig, Andreas Gruenbacher, linux-xfs,
	Linux FS-devel Mailing List, Linux Kernel Mailing List,
	cluster-devel

On Tue, Dec 10, 2019 at 09:39:31PM +0100, Andreas Grünbacher wrote:
> Am Di., 10. Dez. 2019 um 21:33 Uhr schrieb Darrick J. Wong
> <darrick.wong@oracle.com>:
> > On Tue, Dec 10, 2019 at 11:29:16AM +0100, Andreas Gruenbacher wrote:
> > > These two functions are needed by filesystems for converting inline
> > > ("stuffed") inodes into non-inline inodes.
> > >
> > > Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
> >
> > Looks fine to me... this is a 5.6 change, correct?
> 
> Yes, so there's still plenty of time to get things in place until
> then. I'd like to hear from Christoph if he has any objections. In any
> case, this patch isn't going to break anything.

By the way, the other symbols in fs/iomap/ are all EXPORT_SYMBOL_GPL.
Does gfs2/RH/anyone have a particular requirement for EXPORT_SYMBOL, or
could we make the new exports _GPL to match the rest?

--D

> Thanks,
> Andreas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] iomap: Export iomap_page_create and iomap_set_range_uptodate
  2019-12-10 21:25     ` Darrick J. Wong
@ 2019-12-10 21:27       ` Andreas Grünbacher
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Grünbacher @ 2019-12-10 21:27 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: Christoph Hellwig, Andreas Gruenbacher, linux-xfs,
	Linux FS-devel Mailing List, Linux Kernel Mailing List,
	cluster-devel

Am Di., 10. Dez. 2019 um 22:25 Uhr schrieb Darrick J. Wong
<darrick.wong@oracle.com>:
> On Tue, Dec 10, 2019 at 09:39:31PM +0100, Andreas Grünbacher wrote:
> > Am Di., 10. Dez. 2019 um 21:33 Uhr schrieb Darrick J. Wong
> > <darrick.wong@oracle.com>:
> > > On Tue, Dec 10, 2019 at 11:29:16AM +0100, Andreas Gruenbacher wrote:
> > > > These two functions are needed by filesystems for converting inline
> > > > ("stuffed") inodes into non-inline inodes.
> > > >
> > > > Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
> > >
> > > Looks fine to me... this is a 5.6 change, correct?
> >
> > Yes, so there's still plenty of time to get things in place until
> > then. I'd like to hear from Christoph if he has any objections. In any
> > case, this patch isn't going to break anything.
>
> By the way, the other symbols in fs/iomap/ are all EXPORT_SYMBOL_GPL.
> Does gfs2/RH/anyone have a particular requirement for EXPORT_SYMBOL, or
> could we make the new exports _GPL to match the rest?

I don't mind EXPORT_SYMBOL_GPL.

Thanks,
Andreas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] iomap: Export iomap_page_create and iomap_set_range_uptodate
  2019-12-10 10:29 [PATCH] iomap: Export iomap_page_create and iomap_set_range_uptodate Andreas Gruenbacher
  2019-12-10 20:32 ` Darrick J. Wong
@ 2019-12-12  9:55 ` Christoph Hellwig
  1 sibling, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2019-12-12  9:55 UTC (permalink / raw)
  To: Andreas Gruenbacher
  Cc: Darrick J. Wong, linux-xfs, linux-fsdevel, linux-kernel, cluster-devel

At very least this needs to be a EXPORT_SYMBOL_GPL in sent in a series
with the actual user.  But I'm not all that happy about exporting such
low-level helpers.  Can't we come up with a useful higher level
primitive instead?

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-12-12  9:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10 10:29 [PATCH] iomap: Export iomap_page_create and iomap_set_range_uptodate Andreas Gruenbacher
2019-12-10 20:32 ` Darrick J. Wong
2019-12-10 20:39   ` Andreas Grünbacher
2019-12-10 21:25     ` Darrick J. Wong
2019-12-10 21:27       ` Andreas Grünbacher
2019-12-12  9:55 ` Christoph Hellwig

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).