linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 06/15] xfs: Pass a page to xfs_finish_page_writeback
@ 2019-10-05  1:21 Hillf Danton
  0 siblings, 0 replies; 4+ messages in thread
From: Hillf Danton @ 2019-10-05  1:21 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: fsdevl, mm, linux


On Sat, 5 Oct 2019 03:35:36 +0800 Matthew Wilcox wrote:
> 
> On Thu, Oct 03, 2019 at 12:08:46PM +0800, Hillf Danton wrote:
> >
> > On Tue, 24 Sep 2019 17:52:02 -0700 From: Matthew Wilcox (Oracle)
> > >
> > > The only part of the bvec we were accessing was the bv_page, so just
> > > pass that instead of the whole bvec.
> >
> > Change is added in ABI without a bit of win.
> > Changes like this are not needed.
> 
> ABI?  This is a static function.  The original recommendation to do this
> came from Christoph, who I would trust over you as a referee of what
> changes to make to XFS.

Hehe, I try to see your point, nice code will never be able to
escape standing ovation.



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

* Re: [PATCH 06/15] xfs: Pass a page to xfs_finish_page_writeback
  2019-10-03  4:08 ` Hillf Danton
@ 2019-10-04 19:35   ` Matthew Wilcox
  0 siblings, 0 replies; 4+ messages in thread
From: Matthew Wilcox @ 2019-10-04 19:35 UTC (permalink / raw)
  To: Hillf Danton; +Cc: linux-fsdevel, linux-mm, linux-kernel

On Thu, Oct 03, 2019 at 12:08:46PM +0800, Hillf Danton wrote:
> 
> On Tue, 24 Sep 2019 17:52:02 -0700 From: Matthew Wilcox (Oracle)
> > 
> > The only part of the bvec we were accessing was the bv_page, so just
> > pass that instead of the whole bvec.
> 
> Change is added in ABI without a bit of win.
> Changes like this are not needed.

ABI?  This is a static function.  The original recommendation to do this
came from Christoph, who I would trust over you as a referee of what
changes to make to XFS.


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

* Re: [PATCH 06/15] xfs: Pass a page to xfs_finish_page_writeback
  2019-09-25  0:51 [RFC 00/15] Large pages in the page-cache Matthew Wilcox
  2019-09-25  0:52 ` [PATCH 06/15] xfs: Pass a page to xfs_finish_page_writeback Matthew Wilcox
@ 2019-10-03  4:08 ` Hillf Danton
  2019-10-04 19:35   ` Matthew Wilcox
  1 sibling, 1 reply; 4+ messages in thread
From: Hillf Danton @ 2019-10-03  4:08 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: linux-fsdevel, linux-mm, linux-kernel


On Tue, 24 Sep 2019 17:52:02 -0700 From: Matthew Wilcox (Oracle)
> 
> The only part of the bvec we were accessing was the bv_page, so just
> pass that instead of the whole bvec.

Change is added in ABI without a bit of win.
Changes like this are not needed.



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

* [PATCH 06/15] xfs: Pass a page to xfs_finish_page_writeback
  2019-09-25  0:51 [RFC 00/15] Large pages in the page-cache Matthew Wilcox
@ 2019-09-25  0:52 ` Matthew Wilcox
  2019-10-03  4:08 ` Hillf Danton
  1 sibling, 0 replies; 4+ messages in thread
From: Matthew Wilcox @ 2019-09-25  0:52 UTC (permalink / raw)
  To: linux-fsdevel, linux-mm, linux-kernel; +Cc: Matthew Wilcox (Oracle)

From: "Matthew Wilcox (Oracle)" <willy@infradead.org>

The only part of the bvec we were accessing was the bv_page, so just
pass that instead of the whole bvec.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/xfs/xfs_aops.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index 1a26e9ca626b..edcb4797fcc2 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -58,21 +58,21 @@ xfs_find_daxdev_for_inode(
 static void
 xfs_finish_page_writeback(
 	struct inode		*inode,
-	struct bio_vec	*bvec,
+	struct page		*page,
 	int			error)
 {
-	struct iomap_page	*iop = to_iomap_page(bvec->bv_page);
+	struct iomap_page	*iop = to_iomap_page(page);
 
 	if (error) {
-		SetPageError(bvec->bv_page);
+		SetPageError(page);
 		mapping_set_error(inode->i_mapping, -EIO);
 	}
 
-	ASSERT(iop || i_blocks_per_page(inode, bvec->bv_page) <= 1);
+	ASSERT(iop || i_blocks_per_page(inode, page) <= 1);
 	ASSERT(!iop || atomic_read(&iop->write_count) > 0);
 
 	if (!iop || atomic_dec_and_test(&iop->write_count))
-		end_page_writeback(bvec->bv_page);
+		end_page_writeback(page);
 }
 
 /*
@@ -106,7 +106,7 @@ xfs_destroy_ioend(
 
 		/* walk each page on bio, ending page IO on them */
 		bio_for_each_segment_all(bvec, bio, iter_all)
-			xfs_finish_page_writeback(inode, bvec, error);
+			xfs_finish_page_writeback(inode, bvec->bv_page, error);
 		bio_put(bio);
 	}
 
-- 
2.23.0



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

end of thread, other threads:[~2019-10-05  1:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-05  1:21 [PATCH 06/15] xfs: Pass a page to xfs_finish_page_writeback Hillf Danton
  -- strict thread matches above, loose matches on Subject: below --
2019-09-25  0:51 [RFC 00/15] Large pages in the page-cache Matthew Wilcox
2019-09-25  0:52 ` [PATCH 06/15] xfs: Pass a page to xfs_finish_page_writeback Matthew Wilcox
2019-10-03  4:08 ` Hillf Danton
2019-10-04 19:35   ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox