linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RFC: use the iomap writepage path in gfs2
@ 2019-07-01 21:54 Christoph Hellwig
  2019-07-01 21:54 ` [PATCH 01/15] FOLD: iomap: make the discard_page method optional Christoph Hellwig
                   ` (16 more replies)
  0 siblings, 17 replies; 26+ messages in thread
From: Christoph Hellwig @ 2019-07-01 21:54 UTC (permalink / raw)
  To: Andreas Gruenbacher
  Cc: Darrick J . Wong, linux-xfs, linux-fsdevel, cluster-devel

Hi all,

in this straight from the jetplane edition I present the series to
convert gfs2 to full iomap usage for the ordered and writeback mode,
that is we use iomap_page everywhere and entirely get rid of
buffer_heads in the data path.  This has only seen basic testing
which ensured neither 4k or 1k blocksize in ordered mode regressed
vs the xfstests baseline, although that baseline tends to look
pretty bleak.

The series is to be applied on top of my "lift the xfs writepage code
into iomap v2" series.

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: [PATCH 15/15] gfs2: use iomap for buffered I/O in ordered and writeback mode
@ 2019-12-10 10:19 Andreas Gruenbacher
  2019-12-12 10:42 ` Christoph Hellwig
  0 siblings, 1 reply; 26+ messages in thread
From: Andreas Gruenbacher @ 2019-12-10 10:19 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Andreas Gruenbacher, Darrick J . Wong, linux-xfs, linux-fsdevel,
	cluster-devel

Hi Christoph,

On Mon, Sep 30, 2019 at 10:49 PM Andreas Gruenbacher <agruenba@redhat.com> wrote:
> On Tue, Aug 6, 2019 at 7:30 AM Christoph Hellwig <hch@lst.de> wrote:
> > On Mon, Aug 05, 2019 at 02:27:21PM +0200, Andreas Gruenbacher wrote:
> here are the changes we currently need on top of what you've posted on
> July 1.  [...]

again, thank you for this patch.  After fixing some related bugs around this
change, it seems I've finally got this to work properly.  Below are the minor
changes I needed to make on top of your version.

This requires functions iomap_page_create and iomap_set_range_uptodate to be
exported; i'll post a patch for that sepatately.

The result can be found here:

git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git for-next.iomap

Thanks,
Andreas

---
 fs/gfs2/bmap.c | 6 ++++--
 fs/gfs2/file.c | 2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index 168ac5147dd0..fcd2043fc466 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -75,13 +75,12 @@ static int gfs2_unstuffer_page(struct gfs2_inode *ip, struct buffer_head *dibh,
 		memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode), dsize);
 		memset(kaddr + dsize, 0, PAGE_SIZE - dsize);
 		kunmap(page);
-
-		SetPageUptodate(page);
 	}
 
 	if (gfs2_is_jdata(ip)) {
 		struct buffer_head *bh;
 
+		SetPageUptodate(page);
 		if (!page_has_buffers(page))
 			create_empty_buffers(page, BIT(inode->i_blkbits),
 					     BIT(BH_Uptodate));
@@ -93,6 +92,9 @@ static int gfs2_unstuffer_page(struct gfs2_inode *ip, struct buffer_head *dibh,
 		set_buffer_uptodate(bh);
 		gfs2_trans_add_data(ip->i_gl, bh);
 	} else {
+		iomap_page_create(inode, page);
+		iomap_set_range_uptodate(page, 0, i_blocksize(inode));
+		set_page_dirty(page);
 		gfs2_ordered_add_inode(ip);
 	}
 
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 9d58295ccf7a..9af352ebc904 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -555,6 +555,8 @@ static vm_fault_t gfs2_page_mkwrite(struct vm_fault *vmf)
 out_uninit:
 	gfs2_holder_uninit(&gh);
 	if (ret == 0) {
+		if (!gfs2_is_jdata(ip))
+			iomap_page_create(inode, page);
 		set_page_dirty(page);
 		wait_for_stable_page(page);
 	}
-- 
2.20.1


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

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

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-01 21:54 RFC: use the iomap writepage path in gfs2 Christoph Hellwig
2019-07-01 21:54 ` [PATCH 01/15] FOLD: iomap: make the discard_page method optional Christoph Hellwig
2019-07-01 21:54 ` [PATCH 02/15] FOLD: iomap: make ->submit_ioend optional Christoph Hellwig
2019-07-01 21:54 ` [PATCH 03/15] iomap: zero newly allocated mapped blocks Christoph Hellwig
2019-07-01 21:54 ` [PATCH 04/15] iomap: warn on inline maps iomap_writepage_map Christoph Hellwig
2019-07-01 21:54 ` [PATCH 05/15] iomap: move struct iomap_page to iomap.c Christoph Hellwig
2019-07-01 21:54 ` [PATCH 06/15] HACK: disable lockdep annotation in iomap_dio_rw Christoph Hellwig
2019-07-01 21:54 ` [PATCH 07/15] gfs2: use page_offset in gfs2_page_mkwrite Christoph Hellwig
2019-07-01 21:54 ` [PATCH 08/15] gfs2: remove the unused gfs2_stuffed_write_end function Christoph Hellwig
2019-07-01 21:54 ` [PATCH 09/15] gfs2: merge gfs2_writeback_aops and gfs2_ordered_aops Christoph Hellwig
2019-07-01 21:54 ` [PATCH 10/15] gfs2: merge gfs2_writepage_common into gfs2_writepage Christoph Hellwig
2019-07-01 21:54 ` [PATCH 11/15] gfs2: mark stuffed_readpage static Christoph Hellwig
2019-07-01 21:54 ` [PATCH 12/15] gfs2: use iomap_bmap instead of generic_block_bmap Christoph Hellwig
2019-07-01 21:54 ` [PATCH 13/15] gfs2: implement gfs2_block_zero_range using iomap_zero_range Christoph Hellwig
2019-07-01 21:54 ` [PATCH 14/15] gfs2: don't use buffer_heads in gfs2_allocate_page_backing Christoph Hellwig
2019-07-01 21:54 ` [PATCH 15/15] gfs2: use iomap for buffered I/O in ordered and writeback mode Christoph Hellwig
2019-08-05 12:27   ` Andreas Gruenbacher
2019-08-06  5:30     ` Christoph Hellwig
2019-09-30 20:49       ` Andreas Gruenbacher
2019-07-03 22:35 ` RFC: use the iomap writepage path in gfs2 Andreas Gruenbacher
2019-07-08 16:03   ` Christoph Hellwig
2019-07-08 17:29     ` Andreas Gruenbacher
2019-07-08  0:01 ` Dave Chinner
2019-07-08 16:19   ` Christoph Hellwig
2019-12-10 10:19 [PATCH 15/15] gfs2: use iomap for buffered I/O in ordered and writeback mode Andreas Gruenbacher
2019-12-12 10:42 ` 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).