From: Christoph Hellwig <hch@infradead.org>
To: Andreas Gruenbacher <agruenba@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>,
"Darrick J . Wong" <darrick.wong@oracle.com>,
linux-xfs@vger.kernel.org,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
cluster-devel <cluster-devel@redhat.com>
Subject: Re: [PATCH 15/15] gfs2: use iomap for buffered I/O in ordered and writeback mode
Date: Thu, 12 Dec 2019 02:42:52 -0800 [thread overview]
Message-ID: <20191212104252.GA3956@infradead.org> (raw)
In-Reply-To: <20191210101938.495-1-agruenba@redhat.com>
On Tue, Dec 10, 2019 at 11:19:38AM +0100, Andreas Gruenbacher wrote:
> @@ -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);
> }
Can you create a helper that copies the data from a passed in kernel
pointer, length pair into the page, then marks it uptodate and dirty,
please?
> @@ -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);
What is this one for? The iomap_page is supposed to use lazy
allocation, that is we only allocate it once it is used. What code
expects the structure but doesn't see it without this hunk? I
guess it is iomap_writepage_map, which should probably just switch
to call iomap_page_create.
That being said is there any way we can get gfs2 to use
iomap_page_mkwrite for the !jdata case?
next prev parent reply other threads:[~2019-12-12 10:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
-- strict thread matches above, loose matches on Subject: below --
2019-07-01 21:54 RFC: use the iomap writepage path in gfs2 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191212104252.GA3956@infradead.org \
--to=hch@infradead.org \
--cc=agruenba@redhat.com \
--cc=cluster-devel@redhat.com \
--cc=darrick.wong@oracle.com \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).