reiserfs-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Edward Shishkin <edward.shishkin@gmail.com>
To: reiserfs-devel@vger.kernel.org
Cc: Luciano <luciano@joublanc.com>,
	"I put the Who? in Mishehu" <mishehu.mashehu@gmail.com>,
	"Jonáš Vidra" <vidra.jonas@seznam.cz>,
	dimas000@ya.ru,
	"Bringfried Stecklum" <stecklum@tls-tautenburg.de>,
	"Dušan Čolić" <dusanc@gmail.com>,
	"Alexey Shvetsov" <alexxyum@gmail.com>
Subject: [FIXED?] reiser4: problem with key inconsistency
Date: Sun, 28 Oct 2012 22:56:14 +0100	[thread overview]
Message-ID: <508DA9FE.5060005@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 689 bytes --]

Hi all.
It seems I do have the long-awaited fix.

The symptoms of the problem: kernel starts to issue complaints
about key inconsistency with the suggestions to check the partition
with fsck. Fsck sometimes finds corruptions, but sometimes reports
that file system is consistent.

Please apply the attached patch to reiser4 stuff for 3.6.2, or
download reiser4-for-3.6.4 (which already contains this patch), and
let me know if the problem has not gone:
http://sourceforge.net/projects/reiser4/files/reiser4-for-linux-3.x/

Please, don't rush to deploy production systems on reiser4: it can
take up to 80 hours to reproduce the problem with high workload.

Thank you for your help.
Edward.

[-- Attachment #2: reiser4-update-dkeys-in-squeeze_right_twig.patch --]
[-- Type: text/x-patch, Size: 1451 bytes --]

Update dkeys of the pair of nodes, which took participation
in the "implicit shift" during squalloc on the twig level in
flush time.

Signed-off-by: Edward Shishkin <edward.shishkin@gmail.com>
---
 fs/reiser4/flush.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

--- linux-3.6.2_.orig/fs/reiser4/flush.c
+++ linux-3.6.2_/fs/reiser4/flush.c
@@ -450,6 +450,7 @@ static int znode_check_flushprepped(znod
 {
 	return jnode_check_flushprepped(ZJNODE(node));
 }
+static void update_znode_dkeys(znode * left, znode * right);
 
 /* Flush position functions */
 static void pos_init(flush_pos_t *pos);
@@ -1525,6 +1526,7 @@ static int squeeze_right_twig(znode * le
 	int ret = SUBTREE_MOVED;
 	coord_t coord;		/* used to iterate over items */
 	reiser4_key stop_key;
+	reiser4_tree *tree;
 
 	assert("jmacd-2008", !node_is_empty(right));
 	coord_init_first_unit(&coord, right);
@@ -1552,6 +1554,18 @@ static int squeeze_right_twig(znode * le
 
 		ON_DEBUG(shift_check(vp, left, coord.node));
 	}
+	/*
+	 * @left and @right nodes participated in the
+	 * implicit shift, determined by the pair of
+	 * functions:
+	 * . squalloc_extent() - append units to the @left
+	 * . squalloc_right_twig_cut() - cut the units from @right
+	 * so update their delimiting keys
+	 */
+	tree = znode_get_tree(left);
+	write_lock_dk(tree);
+	update_znode_dkeys(left, right);
+	write_unlock_dk(tree);
 
 	if (node_is_empty(coord.node))
 		ret = SQUEEZE_SOURCE_EMPTY;

             reply	other threads:[~2012-10-28 21:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-28 21:56 Edward Shishkin [this message]
2012-10-31 17:24 ` [FIXED?] reiser4: problem with key inconsistency Ivan Shapovalov
2012-10-31 18:43   ` Edward Shishkin
2012-11-04 12:14     ` Ivan Shapovalov
2012-11-03 16:02   ` Edward Shishkin
2012-11-04 12:09     ` Ivan Shapovalov
2013-01-07 11:05     ` Dušan Čolić
2013-01-17 18:40       ` Edward Shishkin

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=508DA9FE.5060005@gmail.com \
    --to=edward.shishkin@gmail.com \
    --cc=alexxyum@gmail.com \
    --cc=dimas000@ya.ru \
    --cc=dusanc@gmail.com \
    --cc=luciano@joublanc.com \
    --cc=mishehu.mashehu@gmail.com \
    --cc=reiserfs-devel@vger.kernel.org \
    --cc=stecklum@tls-tautenburg.de \
    --cc=vidra.jonas@seznam.cz \
    /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).