[5/5] iomap: move struct iomap_page out of iomap.h
diff mbox series

Message ID 156444955325.2682520.4411161096506742768.stgit@magnolia
State New
Headers show
Series
  • xfs: use the iomap writeback code
Related show

Commit Message

Darrick J. Wong July 30, 2019, 1:19 a.m. UTC
From: Christoph Hellwig <hch@lst.de>

Now that all the writepage code is in the iomap code there is no
need to keep this structure public.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 fs/iomap/buffered-io.c |   17 +++++++++++++++++
 include/linux/iomap.h  |   17 -----------------
 2 files changed, 17 insertions(+), 17 deletions(-)

Comments

Carlos Maiolino Aug. 5, 2019, 12:53 p.m. UTC | #1
On Mon, Jul 29, 2019 at 06:19:13PM -0700, Darrick J. Wong wrote:
> From: Christoph Hellwig <hch@lst.de>
> 
> Now that all the writepage code is in the iomap code there is no
> need to keep this structure public.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---

Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>


>  fs/iomap/buffered-io.c |   17 +++++++++++++++++
>  include/linux/iomap.h  |   17 -----------------
>  2 files changed, 17 insertions(+), 17 deletions(-)
> 
> 
> diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
> index 1a7570c441c8..ba0511131868 100644
> --- a/fs/iomap/buffered-io.c
> +++ b/fs/iomap/buffered-io.c
> @@ -23,6 +23,23 @@
>  #define CREATE_TRACE_POINTS
>  #include <trace/events/iomap.h>
>  
> +/*
> + * Structure allocated for each page when block size < PAGE_SIZE to track
> + * sub-page uptodate status and I/O completions.
> + */
> +struct iomap_page {
> +	atomic_t		read_count;
> +	atomic_t		write_count;
> +	DECLARE_BITMAP(uptodate, PAGE_SIZE / 512);
> +};
> +
> +static inline struct iomap_page *to_iomap_page(struct page *page)
> +{
> +	if (page_has_private(page))
> +		return (struct iomap_page *)page_private(page);
> +	return NULL;
> +}
> +
>  static struct bio_set iomap_ioend_bioset;
>  
>  static struct iomap_page *
> diff --git a/include/linux/iomap.h b/include/linux/iomap.h
> index 834d3923e2f2..38464b8f34b9 100644
> --- a/include/linux/iomap.h
> +++ b/include/linux/iomap.h
> @@ -134,23 +134,6 @@ 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);
>  
> -/*
> - * Structure allocate for each page when block size < PAGE_SIZE to track
> - * sub-page uptodate status and I/O completions.
> - */
> -struct iomap_page {
> -	atomic_t		read_count;
> -	atomic_t		write_count;
> -	DECLARE_BITMAP(uptodate, PAGE_SIZE / 512);
> -};
> -
> -static inline struct iomap_page *to_iomap_page(struct page *page)
> -{
> -	if (page_has_private(page))
> -		return (struct iomap_page *)page_private(page);
> -	return NULL;
> -}
> -
>  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);
>

Patch
diff mbox series

diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 1a7570c441c8..ba0511131868 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -23,6 +23,23 @@ 
 #define CREATE_TRACE_POINTS
 #include <trace/events/iomap.h>
 
+/*
+ * Structure allocated for each page when block size < PAGE_SIZE to track
+ * sub-page uptodate status and I/O completions.
+ */
+struct iomap_page {
+	atomic_t		read_count;
+	atomic_t		write_count;
+	DECLARE_BITMAP(uptodate, PAGE_SIZE / 512);
+};
+
+static inline struct iomap_page *to_iomap_page(struct page *page)
+{
+	if (page_has_private(page))
+		return (struct iomap_page *)page_private(page);
+	return NULL;
+}
+
 static struct bio_set iomap_ioend_bioset;
 
 static struct iomap_page *
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index 834d3923e2f2..38464b8f34b9 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -134,23 +134,6 @@  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);
 
-/*
- * Structure allocate for each page when block size < PAGE_SIZE to track
- * sub-page uptodate status and I/O completions.
- */
-struct iomap_page {
-	atomic_t		read_count;
-	atomic_t		write_count;
-	DECLARE_BITMAP(uptodate, PAGE_SIZE / 512);
-};
-
-static inline struct iomap_page *to_iomap_page(struct page *page)
-{
-	if (page_has_private(page))
-		return (struct iomap_page *)page_private(page);
-	return NULL;
-}
-
 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);