lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140306135642.GA22136@thunk.org>
Date:	Thu, 6 Mar 2014 08:56:42 -0500
From:	Theodore Ts'o <tytso@....edu>
To:	Lucas Nussbaum <lucas.nussbaum@...ia.fr>
Cc:	linux-ext4@...r.kernel.org,
	Emmanuel Jeanvoine <emmanuel.jeanvoine@...ia.fr>
Subject: [PATCH, RFC] jbd2: don't write non-commit blocks synchronously

On Wed, Mar 05, 2014 at 03:13:43PM +0100, Lucas Nussbaum wrote:
> TL;DR: we experience long temporary hangs when doing multiple mount -o
> remount at the same time as other I/O on an ext4 filesystem.

Hi Lukas,

Thanks for this report.  Are you willing to try a kernel patch?  If
so, could you try and see if this fixes your issue.  From looking at
your block trace, I saw a large number of suspicious 4k writes from
the jbd2 layer.

					- Ted

commit 137d7cea675fd7d8ff98b7e035fb6516dc4ab220
Author: Theodore Ts'o <tytso@....edu>
Date:   Thu Mar 6 08:56:11 2014 -0500

    jbd2: don't write non-commit blocks synchronously
    
    We don't need to write the revoke blocks and descriptor blocks using
    WRITE_SYNC, since when we issue the commit block, thos blocks will get
    pushed out via REQ_FLUSH.  This will allow the journal blocks to be
    written in fewer i/o operations (otherwise we end up issuing a whole
    series of 4k writes unnecessarily).
    
    Signed-off-by: "Theodore Ts'o" <tytso@....edu>

diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index cf2fc05..fb64629 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -554,7 +554,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
 
 	blk_start_plug(&plug);
 	jbd2_journal_write_revoke_records(journal, commit_transaction,
-					  &log_bufs, WRITE_SYNC);
+					  &log_bufs, WRITE);
 	blk_finish_plug(&plug);
 
 	jbd_debug(3, "JBD2: commit phase 2b\n");
@@ -739,7 +739,7 @@ start_journal_io:
 				clear_buffer_dirty(bh);
 				set_buffer_uptodate(bh);
 				bh->b_end_io = journal_end_buffer_io_sync;
-				submit_bh(WRITE_SYNC, bh);
+				submit_bh(WRITE, bh);
 			}
 			cond_resched();
 			stats.run.rs_blocks_logged += bufs;

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ