From: Abhijith Das <adas@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 PATCH] GFS2: flush log and pages for jdata in gfs2_write_inode
Date: Mon, 16 Oct 2017 14:46:00 -0400 (EDT) [thread overview]
Message-ID: <1641040490.21239316.1508179560680.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <31134666.17705827.1507297101989.JavaMail.zimbra@redhat.com>
Hi,
Looks good to me. ACK.
Cheers!
--Abhi
----- Original Message -----
> From: "Bob Peterson" <rpeterso@redhat.com>
> To: "cluster-devel" <cluster-devel@redhat.com>
> Sent: Friday, October 6, 2017 8:38:21 AM
> Subject: [Cluster-devel] [GFS2 PATCH] GFS2: flush log and pages for jdata in gfs2_write_inode
>
> Hi,
>
> In function gfs2_write_inode, starting with patch a9185b41a4f84, we
> only flush the log and call filemap_fdatawait if we're passed in a
> wbc sync_mode of WB_SYNC_ALL. We also need to do these things if
> we're evicting a jdata inode, because we might have jdata pages
> still attached to bufdata descriptors that need to be revoked, but
> by the time it gets to evict() it's too late to start a new
> transaction. This patch changes it to treat jdata inodes as if
> WB_SYNC_ALL had been specified.
>
> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
> ---
> diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
> index 769841185ce5..ac78e72de790 100644
> --- a/fs/gfs2/super.c
> +++ b/fs/gfs2/super.c
> @@ -754,14 +754,15 @@ static int gfs2_write_inode(struct inode *inode, struct
> writeback_control *wbc)
> struct address_space *metamapping = gfs2_glock2aspace(ip->i_gl);
> struct backing_dev_info *bdi = inode_to_bdi(metamapping->host);
> int ret = 0;
> + bool flush_all = (wbc->sync_mode == WB_SYNC_ALL || gfs2_is_jdata(ip));
>
> - if (wbc->sync_mode == WB_SYNC_ALL)
> + if (flush_all)
> gfs2_log_flush(GFS2_SB(inode), ip->i_gl, NORMAL_FLUSH);
> if (bdi->wb.dirty_exceeded)
> gfs2_ail1_flush(sdp, wbc);
> else
> filemap_fdatawrite(metamapping);
> - if (wbc->sync_mode == WB_SYNC_ALL)
> + if (flush_all)
> ret = filemap_fdatawait(metamapping);
> if (ret)
> mark_inode_dirty_sync(inode);
>
>
prev parent reply other threads:[~2017-10-16 18:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <294896425.17705817.1507297095411.JavaMail.zimbra@redhat.com>
2017-10-06 13:38 ` [Cluster-devel] [GFS2 PATCH] GFS2: flush log and pages for jdata in gfs2_write_inode Bob Peterson
2017-10-16 18:46 ` Abhijith Das [this message]
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=1641040490.21239316.1508179560680.JavaMail.zimbra@redhat.com \
--to=adas@redhat.com \
/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).