diff for duplicates of <1182178478593-git-send-email-swhiteho@redhat.com> diff --git a/a/1.txt b/N1/1.txt index ac16824..b31b5b6 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,34 +1 @@ - -Fix for bz #231910 -When filemap_fdatawrite() is called on the inode mapping in data=ordered mode, -it will add the glock to the log. In inode_go_sync(), if you do the -gfs2_log_flush() before this, after the filemap_fdatawrite() call, the glock -and its associated data buffers will be on the log again. This means you can -demote a lock from exclusive, without having it flushed from the log. The -attached patch simply moves the gfs2_log_flush up to after the -filemap_fdatawrite() call. - -Originally, I tried moving the gfs2_log_flush to after gfs2_meta_sync(), but -that caused me to trip the following assert. - -GFS2: fsid=cypher-36:test.0: fatal: assertion "!buffer_busy(bh)" failed -GFS2: fsid=cypher-36:test.0: function = gfs2_ail_empty_gl, file = fs/gfs2/glops.c, line = 61 - -It appears that gfs2_log_flush() puts some of the glocks buffers in the busy -state and the filemap_fdatawrite() call is necessary to flush them. This makes -me worry slightly that a related problem could happen because of moving the -gfs2_log_flush() after the initial filemap_fdatawrite(), but I assume that -gfs2_ail_empty_gl() would catch that case as well. - -Signed-off-by: Benjamin E. Marzinski <bmarzins@redhat.com> -Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> ---- - fs/gfs2/glops.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) --------------- next part -------------- -A non-text attachment was scrubbed... -Name: e92666ae590962682cf23fcae2c3bdcb6e5e2d27.diff -Type: text/x-patch -Size: 473 bytes -Desc: not available -URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20070618/65bbac21/attachment.bin> +This is a multi-part message in MIME format. diff --git a/N1/2.hdr b/N1/2.hdr new file mode 100644 index 0000000..5f63a06 --- /dev/null +++ b/N1/2.hdr @@ -0,0 +1,2 @@ +Content-Type: text/plain; charset=UTF-8; format=fixed +Content-Transfer-Encoding: 8bit diff --git a/N1/2.txt b/N1/2.txt new file mode 100644 index 0000000..bdb45f3 --- /dev/null +++ b/N1/2.txt @@ -0,0 +1,27 @@ + +Fix for bz #231910 +When filemap_fdatawrite() is called on the inode mapping in data=ordered mode, +it will add the glock to the log. In inode_go_sync(), if you do the +gfs2_log_flush() before this, after the filemap_fdatawrite() call, the glock +and its associated data buffers will be on the log again. This means you can +demote a lock from exclusive, without having it flushed from the log. The +attached patch simply moves the gfs2_log_flush up to after the +filemap_fdatawrite() call. + +Originally, I tried moving the gfs2_log_flush to after gfs2_meta_sync(), but +that caused me to trip the following assert. + +GFS2: fsid=cypher-36:test.0: fatal: assertion "!buffer_busy(bh)" failed +GFS2: fsid=cypher-36:test.0: function = gfs2_ail_empty_gl, file = fs/gfs2/glops.c, line = 61 + +It appears that gfs2_log_flush() puts some of the glocks buffers in the busy +state and the filemap_fdatawrite() call is necessary to flush them. This makes +me worry slightly that a related problem could happen because of moving the +gfs2_log_flush() after the initial filemap_fdatawrite(), but I assume that +gfs2_ail_empty_gl() would catch that case as well. + +Signed-off-by: Benjamin E. Marzinski <bmarzins@redhat.com> +Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> +--- + fs/gfs2/glops.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/N1/3.hdr b/N1/3.hdr new file mode 100644 index 0000000..4101772 --- /dev/null +++ b/N1/3.hdr @@ -0,0 +1,3 @@ +Content-Type: text/x-patch; name="e92666ae590962682cf23fcae2c3bdcb6e5e2d27.diff" +Content-Transfer-Encoding: 8bit +Content-Disposition: inline; filename="e92666ae590962682cf23fcae2c3bdcb6e5e2d27.diff" diff --git a/N1/3.txt b/N1/3.txt new file mode 100644 index 0000000..fd4d7af --- /dev/null +++ b/N1/3.txt @@ -0,0 +1,15 @@ +diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c +index 7b82657..777ca46 100644 +--- a/fs/gfs2/glops.c ++++ b/fs/gfs2/glops.c +@@ -156,9 +156,9 @@ static void inode_go_sync(struct gfs2_glock *gl) + ip = NULL; + + if (test_bit(GLF_DIRTY, &gl->gl_flags)) { +- gfs2_log_flush(gl->gl_sbd, gl); + if (ip) + filemap_fdatawrite(ip->i_inode.i_mapping); ++ gfs2_log_flush(gl->gl_sbd, gl); + gfs2_meta_sync(gl); + if (ip) { + struct address_space *mapping = ip->i_inode.i_mapping; diff --git a/a/content_digest b/N1/content_digest index bb44235..97e735d 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,9 +1,15 @@ "ref\011821784703600-git-send-email-swhiteho@redhat.com\0" "From\0Steven Whitehouse <swhiteho@redhat.com>\0" - "Subject\0[Cluster-devel] [PATCH 1/4] [GFS2] flush the glock completely in inode_go_sync\0" + "Subject\0[PATCH 1/4] [GFS2] flush the glock completely in inode_go_sync\0" "Date\0Mon, 18 Jun 2007 15:54:27 +0100\0" - "To\0cluster-devel.redhat.com\0" - "\00:1\0" + "To\0cluster-devel@redhat.com" + " linux-kernel@vger.kernel.org\0" + "Cc\0Benjamin Marzinski <bmarzins@redhat.com>" + " Steven Whitehouse <swhiteho@redhat.com>\0" + "\01:1\0" + "b\0" + This is a multi-part message in MIME format. + "\01:2\0" "b\0" "\n" "Fix for bz #231910\n" @@ -31,13 +37,24 @@ "Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>\n" "---\n" " fs/gfs2/glops.c | 2 +-\n" - " 1 files changed, 1 insertions(+), 1 deletions(-)\n" - "-------------- next part --------------\n" - "A non-text attachment was scrubbed...\n" - "Name: e92666ae590962682cf23fcae2c3bdcb6e5e2d27.diff\n" - "Type: text/x-patch\n" - "Size: 473 bytes\n" - "Desc: not available\n" - URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20070618/65bbac21/attachment.bin> + 1 files changed, 1 insertions(+), 1 deletions(-) + "\01:3\0" + "fn\0e92666ae590962682cf23fcae2c3bdcb6e5e2d27.diff\0" + "b\0" + "diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c\n" + "index 7b82657..777ca46 100644\n" + "--- a/fs/gfs2/glops.c\n" + "+++ b/fs/gfs2/glops.c\n" + "@@ -156,9 +156,9 @@ static void inode_go_sync(struct gfs2_glock *gl)\n" + " \t\tip = NULL;\n" + " \n" + " \tif (test_bit(GLF_DIRTY, &gl->gl_flags)) {\n" + "-\t\tgfs2_log_flush(gl->gl_sbd, gl);\n" + " \t\tif (ip)\n" + " \t\t\tfilemap_fdatawrite(ip->i_inode.i_mapping);\n" + "+\t\tgfs2_log_flush(gl->gl_sbd, gl);\n" + " \t\tgfs2_meta_sync(gl);\n" + " \t\tif (ip) {\n" + " \t\t\tstruct address_space *mapping = ip->i_inode.i_mapping;" -e0c9407bde48271ad92c95c83113f8d33b0de64b60df1d48af3c528b806fd5f9 +96399dcf5133010c1b5f0e514b29064190c0277cb2330fba01f52d3d2e1c698d
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.