* remove iomap_writepage
@ 2022-07-11 4:14 ` Christoph Hellwig
0 siblings, 0 replies; 24+ messages in thread
From: Christoph Hellwig @ 2022-07-11 4:14 UTC (permalink / raw)
To: Bob Peterson, Andreas Gruenbacher, Darrick J. Wong,
Damien Le Moal, Naohiro Aota
Cc: Johannes Thumshirn, cluster-devel, linux-xfs, linux-fsdevel
Hi all,
this series removes iomap_writepage and it's callers, following what xfs
has been doing for a long time.
Diffstat:
fs/gfs2/aops.c | 26 --------------------------
fs/gfs2/log.c | 2 +-
fs/iomap/buffered-io.c | 15 ---------------
fs/zonefs/super.c | 8 --------
include/linux/iomap.h | 3 ---
5 files changed, 1 insertion(+), 53 deletions(-)
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Cluster-devel] remove iomap_writepage
@ 2022-07-11 4:14 ` Christoph Hellwig
0 siblings, 0 replies; 24+ messages in thread
From: Christoph Hellwig @ 2022-07-11 4:14 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi all,
this series removes iomap_writepage and it's callers, following what xfs
has been doing for a long time.
Diffstat:
fs/gfs2/aops.c | 26 --------------------------
fs/gfs2/log.c | 2 +-
fs/iomap/buffered-io.c | 15 ---------------
fs/zonefs/super.c | 8 --------
include/linux/iomap.h | 3 ---
5 files changed, 1 insertion(+), 53 deletions(-)
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 1/4] gfs2: stop using generic_writepages in gfs2_ail1_start_one
2022-07-11 4:14 ` [Cluster-devel] " Christoph Hellwig
@ 2022-07-11 4:14 ` Christoph Hellwig
-1 siblings, 0 replies; 24+ messages in thread
From: Christoph Hellwig @ 2022-07-11 4:14 UTC (permalink / raw)
To: Bob Peterson, Andreas Gruenbacher, Darrick J. Wong,
Damien Le Moal, Naohiro Aota
Cc: Johannes Thumshirn, cluster-devel, linux-xfs, linux-fsdevel
Use filemap_fdatawrite_wbc instead of generic_writepages in
gfs2_ail1_start_one so that the functin can also cope with address_space
operations that only implement ->writepages and to properly account
for cgroup writeback.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/gfs2/log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index f0ee3ff6f9a87..624dffc96136b 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -131,7 +131,7 @@ __acquires(&sdp->sd_ail_lock)
if (!mapping)
continue;
spin_unlock(&sdp->sd_ail_lock);
- ret = generic_writepages(mapping, wbc);
+ ret = filemap_fdatawrite_wbc(mapping, wbc);
if (need_resched()) {
blk_finish_plug(plug);
cond_resched();
--
2.30.2
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [Cluster-devel] [PATCH 1/4] gfs2: stop using generic_writepages in gfs2_ail1_start_one
@ 2022-07-11 4:14 ` Christoph Hellwig
0 siblings, 0 replies; 24+ messages in thread
From: Christoph Hellwig @ 2022-07-11 4:14 UTC (permalink / raw)
To: cluster-devel.redhat.com
Use filemap_fdatawrite_wbc instead of generic_writepages in
gfs2_ail1_start_one so that the functin can also cope with address_space
operations that only implement ->writepages and to properly account
for cgroup writeback.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/gfs2/log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index f0ee3ff6f9a87..624dffc96136b 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -131,7 +131,7 @@ __acquires(&sdp->sd_ail_lock)
if (!mapping)
continue;
spin_unlock(&sdp->sd_ail_lock);
- ret = generic_writepages(mapping, wbc);
+ ret = filemap_fdatawrite_wbc(mapping, wbc);
if (need_resched()) {
blk_finish_plug(plug);
cond_resched();
--
2.30.2
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 2/4] gfs2: remove ->writepage
2022-07-11 4:14 ` [Cluster-devel] " Christoph Hellwig
@ 2022-07-11 4:14 ` Christoph Hellwig
-1 siblings, 0 replies; 24+ messages in thread
From: Christoph Hellwig @ 2022-07-11 4:14 UTC (permalink / raw)
To: Bob Peterson, Andreas Gruenbacher, Darrick J. Wong,
Damien Le Moal, Naohiro Aota
Cc: Johannes Thumshirn, cluster-devel, linux-xfs, linux-fsdevel
->writepage is only used for single page writeback from memory reclaim,
and not called at all for cgroup writeback. Follow the lead of XFS
and remove ->writepage and rely entirely on ->writepages.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/gfs2/aops.c | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index 106e90a365838..0240a1a717f56 100644
--- a/fs/gfs2/aops.c
+++ b/fs/gfs2/aops.c
@@ -81,31 +81,6 @@ static int gfs2_get_block_noalloc(struct inode *inode, sector_t lblock,
return 0;
}
-/**
- * gfs2_writepage - Write page for writeback mappings
- * @page: The page
- * @wbc: The writeback control
- */
-static int gfs2_writepage(struct page *page, struct writeback_control *wbc)
-{
- struct inode *inode = page->mapping->host;
- struct gfs2_inode *ip = GFS2_I(inode);
- struct gfs2_sbd *sdp = GFS2_SB(inode);
- struct iomap_writepage_ctx wpc = { };
-
- if (gfs2_assert_withdraw(sdp, gfs2_glock_is_held_excl(ip->i_gl)))
- goto out;
- if (current->journal_info)
- goto redirty;
- return iomap_writepage(page, wbc, &wpc, &gfs2_writeback_ops);
-
-redirty:
- redirty_page_for_writepage(wbc, page);
-out:
- unlock_page(page);
- return 0;
-}
-
/**
* gfs2_write_jdata_page - gfs2 jdata-specific version of block_write_full_page
* @page: The page to write
@@ -765,7 +740,6 @@ bool gfs2_release_folio(struct folio *folio, gfp_t gfp_mask)
}
static const struct address_space_operations gfs2_aops = {
- .writepage = gfs2_writepage,
.writepages = gfs2_writepages,
.read_folio = gfs2_read_folio,
.readahead = gfs2_readahead,
--
2.30.2
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [Cluster-devel] [PATCH 2/4] gfs2: remove ->writepage
@ 2022-07-11 4:14 ` Christoph Hellwig
0 siblings, 0 replies; 24+ messages in thread
From: Christoph Hellwig @ 2022-07-11 4:14 UTC (permalink / raw)
To: cluster-devel.redhat.com
->writepage is only used for single page writeback from memory reclaim,
and not called at all for cgroup writeback. Follow the lead of XFS
and remove ->writepage and rely entirely on ->writepages.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/gfs2/aops.c | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index 106e90a365838..0240a1a717f56 100644
--- a/fs/gfs2/aops.c
+++ b/fs/gfs2/aops.c
@@ -81,31 +81,6 @@ static int gfs2_get_block_noalloc(struct inode *inode, sector_t lblock,
return 0;
}
-/**
- * gfs2_writepage - Write page for writeback mappings
- * @page: The page
- * @wbc: The writeback control
- */
-static int gfs2_writepage(struct page *page, struct writeback_control *wbc)
-{
- struct inode *inode = page->mapping->host;
- struct gfs2_inode *ip = GFS2_I(inode);
- struct gfs2_sbd *sdp = GFS2_SB(inode);
- struct iomap_writepage_ctx wpc = { };
-
- if (gfs2_assert_withdraw(sdp, gfs2_glock_is_held_excl(ip->i_gl)))
- goto out;
- if (current->journal_info)
- goto redirty;
- return iomap_writepage(page, wbc, &wpc, &gfs2_writeback_ops);
-
-redirty:
- redirty_page_for_writepage(wbc, page);
-out:
- unlock_page(page);
- return 0;
-}
-
/**
* gfs2_write_jdata_page - gfs2 jdata-specific version of block_write_full_page
* @page: The page to write
@@ -765,7 +740,6 @@ bool gfs2_release_folio(struct folio *folio, gfp_t gfp_mask)
}
static const struct address_space_operations gfs2_aops = {
- .writepage = gfs2_writepage,
.writepages = gfs2_writepages,
.read_folio = gfs2_read_folio,
.readahead = gfs2_readahead,
--
2.30.2
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 3/4] zonefs: remove ->writepage
2022-07-11 4:14 ` [Cluster-devel] " Christoph Hellwig
@ 2022-07-11 4:14 ` Christoph Hellwig
-1 siblings, 0 replies; 24+ messages in thread
From: Christoph Hellwig @ 2022-07-11 4:14 UTC (permalink / raw)
To: Bob Peterson, Andreas Gruenbacher, Darrick J. Wong,
Damien Le Moal, Naohiro Aota
Cc: Johannes Thumshirn, cluster-devel, linux-xfs, linux-fsdevel
->writepage is only used for single page writeback from memory reclaim,
and not called at all for cgroup writeback. Follow the lead of XFS
and remove ->writepage and rely entirely on ->writepages.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/zonefs/super.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c
index 053299758deb9..062c3f1da0327 100644
--- a/fs/zonefs/super.c
+++ b/fs/zonefs/super.c
@@ -232,13 +232,6 @@ static const struct iomap_writeback_ops zonefs_writeback_ops = {
.map_blocks = zonefs_write_map_blocks,
};
-static int zonefs_writepage(struct page *page, struct writeback_control *wbc)
-{
- struct iomap_writepage_ctx wpc = { };
-
- return iomap_writepage(page, wbc, &wpc, &zonefs_writeback_ops);
-}
-
static int zonefs_writepages(struct address_space *mapping,
struct writeback_control *wbc)
{
@@ -266,7 +259,6 @@ static int zonefs_swap_activate(struct swap_info_struct *sis,
static const struct address_space_operations zonefs_file_aops = {
.read_folio = zonefs_read_folio,
.readahead = zonefs_readahead,
- .writepage = zonefs_writepage,
.writepages = zonefs_writepages,
.dirty_folio = filemap_dirty_folio,
.release_folio = iomap_release_folio,
--
2.30.2
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [Cluster-devel] [PATCH 3/4] zonefs: remove ->writepage
@ 2022-07-11 4:14 ` Christoph Hellwig
0 siblings, 0 replies; 24+ messages in thread
From: Christoph Hellwig @ 2022-07-11 4:14 UTC (permalink / raw)
To: cluster-devel.redhat.com
->writepage is only used for single page writeback from memory reclaim,
and not called at all for cgroup writeback. Follow the lead of XFS
and remove ->writepage and rely entirely on ->writepages.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/zonefs/super.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c
index 053299758deb9..062c3f1da0327 100644
--- a/fs/zonefs/super.c
+++ b/fs/zonefs/super.c
@@ -232,13 +232,6 @@ static const struct iomap_writeback_ops zonefs_writeback_ops = {
.map_blocks = zonefs_write_map_blocks,
};
-static int zonefs_writepage(struct page *page, struct writeback_control *wbc)
-{
- struct iomap_writepage_ctx wpc = { };
-
- return iomap_writepage(page, wbc, &wpc, &zonefs_writeback_ops);
-}
-
static int zonefs_writepages(struct address_space *mapping,
struct writeback_control *wbc)
{
@@ -266,7 +259,6 @@ static int zonefs_swap_activate(struct swap_info_struct *sis,
static const struct address_space_operations zonefs_file_aops = {
.read_folio = zonefs_read_folio,
.readahead = zonefs_readahead,
- .writepage = zonefs_writepage,
.writepages = zonefs_writepages,
.dirty_folio = filemap_dirty_folio,
.release_folio = iomap_release_folio,
--
2.30.2
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 4/4] iomap: remove iomap_writepage
2022-07-11 4:14 ` [Cluster-devel] " Christoph Hellwig
@ 2022-07-11 4:14 ` Christoph Hellwig
-1 siblings, 0 replies; 24+ messages in thread
From: Christoph Hellwig @ 2022-07-11 4:14 UTC (permalink / raw)
To: Bob Peterson, Andreas Gruenbacher, Darrick J. Wong,
Damien Le Moal, Naohiro Aota
Cc: Johannes Thumshirn, cluster-devel, linux-xfs, linux-fsdevel
Unused now.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/iomap/buffered-io.c | 15 ---------------
include/linux/iomap.h | 3 ---
2 files changed, 18 deletions(-)
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index d2a9f699e17ed..1bac8bda40d0c 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -1518,21 +1518,6 @@ iomap_do_writepage(struct page *page, struct writeback_control *wbc, void *data)
return 0;
}
-int
-iomap_writepage(struct page *page, struct writeback_control *wbc,
- struct iomap_writepage_ctx *wpc,
- const struct iomap_writeback_ops *ops)
-{
- int ret;
-
- wpc->ops = ops;
- ret = iomap_do_writepage(page, wbc, wpc);
- if (!wpc->ioend)
- return ret;
- return iomap_submit_ioend(wpc, wpc->ioend, ret);
-}
-EXPORT_SYMBOL_GPL(iomap_writepage);
-
int
iomap_writepages(struct address_space *mapping, struct writeback_control *wbc,
struct iomap_writepage_ctx *wpc,
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index e552097c67e0b..911888560d3eb 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -303,9 +303,6 @@ 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 iomap_sort_ioends(struct list_head *ioend_list);
-int iomap_writepage(struct page *page, struct writeback_control *wbc,
- struct iomap_writepage_ctx *wpc,
- const struct iomap_writeback_ops *ops);
int iomap_writepages(struct address_space *mapping,
struct writeback_control *wbc, struct iomap_writepage_ctx *wpc,
const struct iomap_writeback_ops *ops);
--
2.30.2
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [Cluster-devel] [PATCH 4/4] iomap: remove iomap_writepage
@ 2022-07-11 4:14 ` Christoph Hellwig
0 siblings, 0 replies; 24+ messages in thread
From: Christoph Hellwig @ 2022-07-11 4:14 UTC (permalink / raw)
To: cluster-devel.redhat.com
Unused now.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/iomap/buffered-io.c | 15 ---------------
include/linux/iomap.h | 3 ---
2 files changed, 18 deletions(-)
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index d2a9f699e17ed..1bac8bda40d0c 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -1518,21 +1518,6 @@ iomap_do_writepage(struct page *page, struct writeback_control *wbc, void *data)
return 0;
}
-int
-iomap_writepage(struct page *page, struct writeback_control *wbc,
- struct iomap_writepage_ctx *wpc,
- const struct iomap_writeback_ops *ops)
-{
- int ret;
-
- wpc->ops = ops;
- ret = iomap_do_writepage(page, wbc, wpc);
- if (!wpc->ioend)
- return ret;
- return iomap_submit_ioend(wpc, wpc->ioend, ret);
-}
-EXPORT_SYMBOL_GPL(iomap_writepage);
-
int
iomap_writepages(struct address_space *mapping, struct writeback_control *wbc,
struct iomap_writepage_ctx *wpc,
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index e552097c67e0b..911888560d3eb 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -303,9 +303,6 @@ 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 iomap_sort_ioends(struct list_head *ioend_list);
-int iomap_writepage(struct page *page, struct writeback_control *wbc,
- struct iomap_writepage_ctx *wpc,
- const struct iomap_writeback_ops *ops);
int iomap_writepages(struct address_space *mapping,
struct writeback_control *wbc, struct iomap_writepage_ctx *wpc,
const struct iomap_writeback_ops *ops);
--
2.30.2
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH 3/4] zonefs: remove ->writepage
2022-07-11 4:14 ` [Cluster-devel] " Christoph Hellwig
@ 2022-07-11 4:47 ` Damien Le Moal
-1 siblings, 0 replies; 24+ messages in thread
From: Damien Le Moal @ 2022-07-11 4:47 UTC (permalink / raw)
To: Christoph Hellwig, Bob Peterson, Andreas Gruenbacher,
Darrick J. Wong, Naohiro Aota
Cc: Johannes Thumshirn, cluster-devel, linux-xfs, linux-fsdevel
On 7/11/22 13:14, Christoph Hellwig wrote:
> ->writepage is only used for single page writeback from memory reclaim,
> and not called at all for cgroup writeback. Follow the lead of XFS
> and remove ->writepage and rely entirely on ->writepages.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> fs/zonefs/super.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c
> index 053299758deb9..062c3f1da0327 100644
> --- a/fs/zonefs/super.c
> +++ b/fs/zonefs/super.c
> @@ -232,13 +232,6 @@ static const struct iomap_writeback_ops zonefs_writeback_ops = {
> .map_blocks = zonefs_write_map_blocks,
> };
>
> -static int zonefs_writepage(struct page *page, struct writeback_control *wbc)
> -{
> - struct iomap_writepage_ctx wpc = { };
> -
> - return iomap_writepage(page, wbc, &wpc, &zonefs_writeback_ops);
> -}
> -
> static int zonefs_writepages(struct address_space *mapping,
> struct writeback_control *wbc)
> {
> @@ -266,7 +259,6 @@ static int zonefs_swap_activate(struct swap_info_struct *sis,
> static const struct address_space_operations zonefs_file_aops = {
> .read_folio = zonefs_read_folio,
> .readahead = zonefs_readahead,
> - .writepage = zonefs_writepage,
> .writepages = zonefs_writepages,
> .dirty_folio = filemap_dirty_folio,
> .release_folio = iomap_release_folio,
Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Cluster-devel] [PATCH 3/4] zonefs: remove ->writepage
@ 2022-07-11 4:47 ` Damien Le Moal
0 siblings, 0 replies; 24+ messages in thread
From: Damien Le Moal @ 2022-07-11 4:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
On 7/11/22 13:14, Christoph Hellwig wrote:
> ->writepage is only used for single page writeback from memory reclaim,
> and not called at all for cgroup writeback. Follow the lead of XFS
> and remove ->writepage and rely entirely on ->writepages.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> fs/zonefs/super.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c
> index 053299758deb9..062c3f1da0327 100644
> --- a/fs/zonefs/super.c
> +++ b/fs/zonefs/super.c
> @@ -232,13 +232,6 @@ static const struct iomap_writeback_ops zonefs_writeback_ops = {
> .map_blocks = zonefs_write_map_blocks,
> };
>
> -static int zonefs_writepage(struct page *page, struct writeback_control *wbc)
> -{
> - struct iomap_writepage_ctx wpc = { };
> -
> - return iomap_writepage(page, wbc, &wpc, &zonefs_writeback_ops);
> -}
> -
> static int zonefs_writepages(struct address_space *mapping,
> struct writeback_control *wbc)
> {
> @@ -266,7 +259,6 @@ static int zonefs_swap_activate(struct swap_info_struct *sis,
> static const struct address_space_operations zonefs_file_aops = {
> .read_folio = zonefs_read_folio,
> .readahead = zonefs_readahead,
> - .writepage = zonefs_writepage,
> .writepages = zonefs_writepages,
> .dirty_folio = filemap_dirty_folio,
> .release_folio = iomap_release_folio,
Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 4/4] iomap: remove iomap_writepage
2022-07-11 4:14 ` [Cluster-devel] " Christoph Hellwig
@ 2022-07-11 4:48 ` Damien Le Moal
-1 siblings, 0 replies; 24+ messages in thread
From: Damien Le Moal @ 2022-07-11 4:48 UTC (permalink / raw)
To: Christoph Hellwig, Bob Peterson, Andreas Gruenbacher,
Darrick J. Wong, Naohiro Aota
Cc: Johannes Thumshirn, cluster-devel, linux-xfs, linux-fsdevel
On 7/11/22 13:14, Christoph Hellwig wrote:
> Unused now.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> fs/iomap/buffered-io.c | 15 ---------------
> include/linux/iomap.h | 3 ---
> 2 files changed, 18 deletions(-)
>
> diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
> index d2a9f699e17ed..1bac8bda40d0c 100644
> --- a/fs/iomap/buffered-io.c
> +++ b/fs/iomap/buffered-io.c
> @@ -1518,21 +1518,6 @@ iomap_do_writepage(struct page *page, struct writeback_control *wbc, void *data)
> return 0;
> }
>
> -int
> -iomap_writepage(struct page *page, struct writeback_control *wbc,
> - struct iomap_writepage_ctx *wpc,
> - const struct iomap_writeback_ops *ops)
> -{
> - int ret;
> -
> - wpc->ops = ops;
> - ret = iomap_do_writepage(page, wbc, wpc);
> - if (!wpc->ioend)
> - return ret;
> - return iomap_submit_ioend(wpc, wpc->ioend, ret);
> -}
> -EXPORT_SYMBOL_GPL(iomap_writepage);
> -
> int
> iomap_writepages(struct address_space *mapping, struct writeback_control *wbc,
> struct iomap_writepage_ctx *wpc,
> diff --git a/include/linux/iomap.h b/include/linux/iomap.h
> index e552097c67e0b..911888560d3eb 100644
> --- a/include/linux/iomap.h
> +++ b/include/linux/iomap.h
> @@ -303,9 +303,6 @@ 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 iomap_sort_ioends(struct list_head *ioend_list);
> -int iomap_writepage(struct page *page, struct writeback_control *wbc,
> - struct iomap_writepage_ctx *wpc,
> - const struct iomap_writeback_ops *ops);
> int iomap_writepages(struct address_space *mapping,
> struct writeback_control *wbc, struct iomap_writepage_ctx *wpc,
> const struct iomap_writeback_ops *ops);
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Cluster-devel] [PATCH 4/4] iomap: remove iomap_writepage
@ 2022-07-11 4:48 ` Damien Le Moal
0 siblings, 0 replies; 24+ messages in thread
From: Damien Le Moal @ 2022-07-11 4:48 UTC (permalink / raw)
To: cluster-devel.redhat.com
On 7/11/22 13:14, Christoph Hellwig wrote:
> Unused now.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> fs/iomap/buffered-io.c | 15 ---------------
> include/linux/iomap.h | 3 ---
> 2 files changed, 18 deletions(-)
>
> diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
> index d2a9f699e17ed..1bac8bda40d0c 100644
> --- a/fs/iomap/buffered-io.c
> +++ b/fs/iomap/buffered-io.c
> @@ -1518,21 +1518,6 @@ iomap_do_writepage(struct page *page, struct writeback_control *wbc, void *data)
> return 0;
> }
>
> -int
> -iomap_writepage(struct page *page, struct writeback_control *wbc,
> - struct iomap_writepage_ctx *wpc,
> - const struct iomap_writeback_ops *ops)
> -{
> - int ret;
> -
> - wpc->ops = ops;
> - ret = iomap_do_writepage(page, wbc, wpc);
> - if (!wpc->ioend)
> - return ret;
> - return iomap_submit_ioend(wpc, wpc->ioend, ret);
> -}
> -EXPORT_SYMBOL_GPL(iomap_writepage);
> -
> int
> iomap_writepages(struct address_space *mapping, struct writeback_control *wbc,
> struct iomap_writepage_ctx *wpc,
> diff --git a/include/linux/iomap.h b/include/linux/iomap.h
> index e552097c67e0b..911888560d3eb 100644
> --- a/include/linux/iomap.h
> +++ b/include/linux/iomap.h
> @@ -303,9 +303,6 @@ 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 iomap_sort_ioends(struct list_head *ioend_list);
> -int iomap_writepage(struct page *page, struct writeback_control *wbc,
> - struct iomap_writepage_ctx *wpc,
> - const struct iomap_writeback_ops *ops);
> int iomap_writepages(struct address_space *mapping,
> struct writeback_control *wbc, struct iomap_writepage_ctx *wpc,
> const struct iomap_writeback_ops *ops);
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/4] zonefs: remove ->writepage
2022-07-11 4:14 ` [Cluster-devel] " Christoph Hellwig
@ 2022-07-11 9:12 ` Johannes Thumshirn
-1 siblings, 0 replies; 24+ messages in thread
From: Johannes Thumshirn @ 2022-07-11 9:12 UTC (permalink / raw)
To: Christoph Hellwig, Bob Peterson, Andreas Gruenbacher,
Darrick J. Wong, Damien Le Moal, Naohiro Aota
Cc: Johannes Thumshirn, cluster-devel, linux-xfs, linux-fsdevel
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Cluster-devel] [PATCH 3/4] zonefs: remove ->writepage
@ 2022-07-11 9:12 ` Johannes Thumshirn
0 siblings, 0 replies; 24+ messages in thread
From: Johannes Thumshirn @ 2022-07-11 9:12 UTC (permalink / raw)
To: cluster-devel.redhat.com
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 1/4] gfs2: stop using generic_writepages in gfs2_ail1_start_one
2022-07-11 4:14 ` [Cluster-devel] " Christoph Hellwig
@ 2022-07-11 10:27 ` Andreas Gruenbacher
-1 siblings, 0 replies; 24+ messages in thread
From: Andreas Gruenbacher @ 2022-07-11 10:27 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Andreas Gruenbacher, Bob Peterson, Darrick J. Wong,
Damien Le Moal, Naohiro Aota, Johannes Thumshirn, cluster-devel,
linux-xfs, linux-fsdevel
Hello,
On Mon, Jul 11, 2022 at 7:27 AM Christoph Hellwig <hch@lst.de> wrote:
>
> Use filemap_fdatawrite_wbc instead of generic_writepages in
> gfs2_ail1_start_one so that the functin can also cope with address_space
> operations that only implement ->writepages and to properly account
> for cgroup writeback.
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
I assume you want to push this through the xfs tree.
Can you add the below follow-up cleanup?
Thanks,
Andreas
---
fs/gfs2/log.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index 624dffc96136..7fc6cb95dec8 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -222,8 +222,7 @@ void gfs2_ail1_flush(struct gfs2_sbd *sdp, struct writeback_control *wbc)
spin_unlock(&sdp->sd_ail_lock);
blk_finish_plug(&plug);
if (ret) {
- gfs2_lm(sdp, "gfs2_ail1_start_one (generic_writepages) "
- "returned: %d\n", ret);
+ gfs2_lm(sdp, "gfs2_ail1_start_one returned %d\n", ret);
gfs2_withdraw(sdp);
}
trace_gfs2_ail_flush(sdp, wbc, 0);
--
2.36.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [Cluster-devel] [PATCH 1/4] gfs2: stop using generic_writepages in gfs2_ail1_start_one
@ 2022-07-11 10:27 ` Andreas Gruenbacher
0 siblings, 0 replies; 24+ messages in thread
From: Andreas Gruenbacher @ 2022-07-11 10:27 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hello,
On Mon, Jul 11, 2022 at 7:27 AM Christoph Hellwig <hch@lst.de> wrote:
>
> Use filemap_fdatawrite_wbc instead of generic_writepages in
> gfs2_ail1_start_one so that the functin can also cope with address_space
> operations that only implement ->writepages and to properly account
> for cgroup writeback.
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
I assume you want to push this through the xfs tree.
Can you add the below follow-up cleanup?
Thanks,
Andreas
---
fs/gfs2/log.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index 624dffc96136..7fc6cb95dec8 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -222,8 +222,7 @@ void gfs2_ail1_flush(struct gfs2_sbd *sdp, struct writeback_control *wbc)
spin_unlock(&sdp->sd_ail_lock);
blk_finish_plug(&plug);
if (ret) {
- gfs2_lm(sdp, "gfs2_ail1_start_one (generic_writepages) "
- "returned: %d\n", ret);
+ gfs2_lm(sdp, "gfs2_ail1_start_one returned %d\n", ret);
gfs2_withdraw(sdp);
}
trace_gfs2_ail_flush(sdp, wbc, 0);
--
2.36.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH 1/4] gfs2: stop using generic_writepages in gfs2_ail1_start_one
2022-07-11 10:27 ` [Cluster-devel] " Andreas Gruenbacher
@ 2022-07-11 14:30 ` Christoph Hellwig
-1 siblings, 0 replies; 24+ messages in thread
From: Christoph Hellwig @ 2022-07-11 14:30 UTC (permalink / raw)
To: Andreas Gruenbacher
Cc: Christoph Hellwig, Bob Peterson, Darrick J. Wong, Damien Le Moal,
Naohiro Aota, Johannes Thumshirn, cluster-devel, linux-xfs,
linux-fsdevel
On Mon, Jul 11, 2022 at 12:27:47PM +0200, Andreas Gruenbacher wrote:
> Can you add the below follow-up cleanup?
> - gfs2_lm(sdp, "gfs2_ail1_start_one (generic_writepages) "
> - "returned: %d\n", ret);
> + gfs2_lm(sdp, "gfs2_ail1_start_one returned %d\n", ret);
The cleanup looks fine to me, yes.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Cluster-devel] [PATCH 1/4] gfs2: stop using generic_writepages in gfs2_ail1_start_one
@ 2022-07-11 14:30 ` Christoph Hellwig
0 siblings, 0 replies; 24+ messages in thread
From: Christoph Hellwig @ 2022-07-11 14:30 UTC (permalink / raw)
To: cluster-devel.redhat.com
On Mon, Jul 11, 2022 at 12:27:47PM +0200, Andreas Gruenbacher wrote:
> Can you add the below follow-up cleanup?
> - gfs2_lm(sdp, "gfs2_ail1_start_one (generic_writepages) "
> - "returned: %d\n", ret);
> + gfs2_lm(sdp, "gfs2_ail1_start_one returned %d\n", ret);
The cleanup looks fine to me, yes.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/4] gfs2: remove ->writepage
2022-07-11 4:14 ` [Cluster-devel] " Christoph Hellwig
@ 2022-07-11 23:22 ` Andreas Grünbacher
-1 siblings, 0 replies; 24+ messages in thread
From: Andreas Grünbacher @ 2022-07-11 23:22 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Bob Peterson, Andreas Gruenbacher, Darrick J. Wong,
Damien Le Moal, Naohiro Aota, Johannes Thumshirn, cluster-devel,
linux-xfs, Linux FS-devel Mailing List
Am Mo., 11. Juli 2022 um 06:16 Uhr schrieb Christoph Hellwig <hch@lst.de>:
> ->writepage is only used for single page writeback from memory reclaim,
> and not called at all for cgroup writeback. Follow the lead of XFS
> and remove ->writepage and rely entirely on ->writepages.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> fs/gfs2/aops.c | 26 --------------------------
> 1 file changed, 26 deletions(-)
>
> diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
> index 106e90a365838..0240a1a717f56 100644
> --- a/fs/gfs2/aops.c
> +++ b/fs/gfs2/aops.c
> @@ -81,31 +81,6 @@ static int gfs2_get_block_noalloc(struct inode *inode, sector_t lblock,
> return 0;
> }
>
> -/**
> - * gfs2_writepage - Write page for writeback mappings
> - * @page: The page
> - * @wbc: The writeback control
> - */
> -static int gfs2_writepage(struct page *page, struct writeback_control *wbc)
> -{
> - struct inode *inode = page->mapping->host;
> - struct gfs2_inode *ip = GFS2_I(inode);
> - struct gfs2_sbd *sdp = GFS2_SB(inode);
> - struct iomap_writepage_ctx wpc = { };
> -
> - if (gfs2_assert_withdraw(sdp, gfs2_glock_is_held_excl(ip->i_gl)))
> - goto out;
> - if (current->journal_info)
> - goto redirty;
> - return iomap_writepage(page, wbc, &wpc, &gfs2_writeback_ops);
> -
> -redirty:
> - redirty_page_for_writepage(wbc, page);
> -out:
> - unlock_page(page);
> - return 0;
> -}
> -
> /**
> * gfs2_write_jdata_page - gfs2 jdata-specific version of block_write_full_page
> * @page: The page to write
> @@ -765,7 +740,6 @@ bool gfs2_release_folio(struct folio *folio, gfp_t gfp_mask)
> }
>
> static const struct address_space_operations gfs2_aops = {
> - .writepage = gfs2_writepage,
> .writepages = gfs2_writepages,
> .read_folio = gfs2_read_folio,
> .readahead = gfs2_readahead,
> --
> 2.30.2
>
This is looking fine, and it has survived a moderate amount of testing already.
Tested-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
It should be possible to remove the .writepage operation in
gfs2_jdata_aops as well, but I must be overlooking something because
that actually breaks things.
Thanks,
Andreas
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Cluster-devel] [PATCH 2/4] gfs2: remove ->writepage
@ 2022-07-11 23:22 ` Andreas Grünbacher
0 siblings, 0 replies; 24+ messages in thread
From: Andreas Grünbacher @ 2022-07-11 23:22 UTC (permalink / raw)
To: cluster-devel.redhat.com
Am Mo., 11. Juli 2022 um 06:16 Uhr schrieb Christoph Hellwig <hch@lst.de>:
> ->writepage is only used for single page writeback from memory reclaim,
> and not called at all for cgroup writeback. Follow the lead of XFS
> and remove ->writepage and rely entirely on ->writepages.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> fs/gfs2/aops.c | 26 --------------------------
> 1 file changed, 26 deletions(-)
>
> diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
> index 106e90a365838..0240a1a717f56 100644
> --- a/fs/gfs2/aops.c
> +++ b/fs/gfs2/aops.c
> @@ -81,31 +81,6 @@ static int gfs2_get_block_noalloc(struct inode *inode, sector_t lblock,
> return 0;
> }
>
> -/**
> - * gfs2_writepage - Write page for writeback mappings
> - * @page: The page
> - * @wbc: The writeback control
> - */
> -static int gfs2_writepage(struct page *page, struct writeback_control *wbc)
> -{
> - struct inode *inode = page->mapping->host;
> - struct gfs2_inode *ip = GFS2_I(inode);
> - struct gfs2_sbd *sdp = GFS2_SB(inode);
> - struct iomap_writepage_ctx wpc = { };
> -
> - if (gfs2_assert_withdraw(sdp, gfs2_glock_is_held_excl(ip->i_gl)))
> - goto out;
> - if (current->journal_info)
> - goto redirty;
> - return iomap_writepage(page, wbc, &wpc, &gfs2_writeback_ops);
> -
> -redirty:
> - redirty_page_for_writepage(wbc, page);
> -out:
> - unlock_page(page);
> - return 0;
> -}
> -
> /**
> * gfs2_write_jdata_page - gfs2 jdata-specific version of block_write_full_page
> * @page: The page to write
> @@ -765,7 +740,6 @@ bool gfs2_release_folio(struct folio *folio, gfp_t gfp_mask)
> }
>
> static const struct address_space_operations gfs2_aops = {
> - .writepage = gfs2_writepage,
> .writepages = gfs2_writepages,
> .read_folio = gfs2_read_folio,
> .readahead = gfs2_readahead,
> --
> 2.30.2
>
This is looking fine, and it has survived a moderate amount of testing already.
Tested-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
It should be possible to remove the .writepage operation in
gfs2_jdata_aops as well, but I must be overlooking something because
that actually breaks things.
Thanks,
Andreas
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/4] gfs2: remove ->writepage
2022-07-11 23:22 ` [Cluster-devel] " Andreas Grünbacher
@ 2022-07-12 4:57 ` Christoph Hellwig
-1 siblings, 0 replies; 24+ messages in thread
From: Christoph Hellwig @ 2022-07-12 4:57 UTC (permalink / raw)
To: Andreas Grünbacher
Cc: Christoph Hellwig, Bob Peterson, Andreas Gruenbacher,
Darrick J. Wong, Damien Le Moal, Naohiro Aota,
Johannes Thumshirn, cluster-devel, linux-xfs,
Linux FS-devel Mailing List
On Tue, Jul 12, 2022 at 01:22:48AM +0200, Andreas Grünbacher wrote:
> It should be possible to remove the .writepage operation in
> gfs2_jdata_aops as well, but I must be overlooking something because
> that actually breaks things.
We'll need to wire up ->migratepage for it first to not lose any memory
migration functinality. But yes, the plan is to eventually kill off
->writepage. If I can get you to look into gfs2_jdata_aops,
gfs2_meta_aops and gfs2_rgrp_aops, that would be awesome.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Cluster-devel] [PATCH 2/4] gfs2: remove ->writepage
@ 2022-07-12 4:57 ` Christoph Hellwig
0 siblings, 0 replies; 24+ messages in thread
From: Christoph Hellwig @ 2022-07-12 4:57 UTC (permalink / raw)
To: cluster-devel.redhat.com
On Tue, Jul 12, 2022 at 01:22:48AM +0200, Andreas Gr?nbacher wrote:
> It should be possible to remove the .writepage operation in
> gfs2_jdata_aops as well, but I must be overlooking something because
> that actually breaks things.
We'll need to wire up ->migratepage for it first to not lose any memory
migration functinality. But yes, the plan is to eventually kill off
->writepage. If I can get you to look into gfs2_jdata_aops,
gfs2_meta_aops and gfs2_rgrp_aops, that would be awesome.
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2022-07-12 4:57 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-11 4:14 remove iomap_writepage Christoph Hellwig
2022-07-11 4:14 ` [Cluster-devel] " Christoph Hellwig
2022-07-11 4:14 ` [PATCH 1/4] gfs2: stop using generic_writepages in gfs2_ail1_start_one Christoph Hellwig
2022-07-11 4:14 ` [Cluster-devel] " Christoph Hellwig
2022-07-11 10:27 ` Andreas Gruenbacher
2022-07-11 10:27 ` [Cluster-devel] " Andreas Gruenbacher
2022-07-11 14:30 ` Christoph Hellwig
2022-07-11 14:30 ` [Cluster-devel] " Christoph Hellwig
2022-07-11 4:14 ` [PATCH 2/4] gfs2: remove ->writepage Christoph Hellwig
2022-07-11 4:14 ` [Cluster-devel] " Christoph Hellwig
2022-07-11 23:22 ` Andreas Grünbacher
2022-07-11 23:22 ` [Cluster-devel] " Andreas Grünbacher
2022-07-12 4:57 ` Christoph Hellwig
2022-07-12 4:57 ` [Cluster-devel] " Christoph Hellwig
2022-07-11 4:14 ` [PATCH 3/4] zonefs: " Christoph Hellwig
2022-07-11 4:14 ` [Cluster-devel] " Christoph Hellwig
2022-07-11 4:47 ` Damien Le Moal
2022-07-11 4:47 ` [Cluster-devel] " Damien Le Moal
2022-07-11 9:12 ` Johannes Thumshirn
2022-07-11 9:12 ` [Cluster-devel] " Johannes Thumshirn
2022-07-11 4:14 ` [PATCH 4/4] iomap: remove iomap_writepage Christoph Hellwig
2022-07-11 4:14 ` [Cluster-devel] " Christoph Hellwig
2022-07-11 4:48 ` Damien Le Moal
2022-07-11 4:48 ` [Cluster-devel] " Damien Le Moal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.