linux-nilfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vyacheslav Dubeyko <slava-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
To: "Сергей Александров" <splavgm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: very large mount time after unxepected power down
Date: Fri, 16 Nov 2012 17:52:49 +0400	[thread overview]
Message-ID: <1353073969.9135.7.camel@slavad-ubuntu> (raw)
In-Reply-To: <CAFPMYnEYnLv5e6a3ZcFRjw-8cNB80T5=mpuiX9jaWa+pEj8Q-A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

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

On Fri, 2012-11-16 at 10:11 +0300, Сергей Александров wrote:
> dmesg:
> [53994.254432] NILFS warning: mounting unchecked fs
> [56686.968229] NILFS: recovery complete.
> [56686.969316] segctord starting. Construction interval = 5 seconds,
> CP frequency < 30 seconds
> 
> messages:
> Nov 15 10:57:06 router kernel: [53994.254432] NILFS warning: mounting
> unchecked fs
> Nov 15 11:42:02 router kernel: [56686.968229] NILFS: recovery complete.
> Nov 15 11:42:02 router kernel: [56686.969316] segctord starting.
> Construction interval = 5 seconds, CP frequency < 30 seconds
> 
> May be there is some kernel config option to get more debug output?
> 

I prepared small patch (please, find in attachment). This patch simply
adds several debug messages into recovery module. I suggest to apply the
patch on your NILFS2 driver and try to mount again in the issue
environment. I hope that these debug messages can give more information
about issue on your side.

The patch uses pr_debug() call. Please, see
Documentation/dynamic-debug-howto.txt for more details.

To be honest, I don't test the patch yet. So, if you will have any
troubles, please, e-mail to me.

With the best regards,
Vyacheslav Dubeyko.

> As for fsck, I have not found it in git public repo, so where can I
> get the latest version?
> --------------------------------------------------


[-- Attachment #2: 0001-nilfs-add-debug-messages-for-recovery-module.patch --]
[-- Type: text/x-patch, Size: 2657 bytes --]

From: Vyacheslav Dubeyko <slava-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
Subject: [PATCH] nilfs: add debug messages for recovery module

This patch simply adds several pr_debug() messages for debugging recovery code functioning.

Signed-off-by: Vyacheslav Dubeyko <slava-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
---
 fs/nilfs2/recovery.c |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/fs/nilfs2/recovery.c b/fs/nilfs2/recovery.c
index f1626f5..cb5c0c7 100644
--- a/fs/nilfs2/recovery.c
+++ b/fs/nilfs2/recovery.c
@@ -435,6 +435,12 @@ static int nilfs_prepare_segment_for_recovery(struct the_nilfs *nilfs,
 	int err;
 	int i;
 
+	pr_debug("NILFS: nilfs_prepare_segment_for_recovery\n");
+	pr_debug("NILFS: ns_segnum %lld, ns_nextnum %lld\n",
+			nilfs->ns_segnum, nilfs->ns_nextnum);
+	pr_debug("NILFS: ri_segnum %lld, ri_nextnum %lld\n",
+			ri->ri_segnum, ri->ri_nextnum);
+
 	segnum[0] = nilfs->ns_segnum;
 	segnum[1] = nilfs->ns_nextnum;
 	segnum[2] = ri->ri_segnum;
@@ -602,6 +608,11 @@ static int nilfs_do_roll_forward(struct the_nilfs *nilfs,
 	segnum = nilfs_get_segnum_of_block(nilfs, pseg_start);
 	nilfs_get_segment_range(nilfs, segnum, &seg_start, &seg_end);
 
+	pr_debug("NILFS: nilfs_do_roll_forward\n");
+	pr_debug("NILFS: pseg_start %lld, seg_seq %lld\n", pseg_start, seg_seq);
+	pr_debug("NILFS: segnum %lld\n", segnum);
+	pr_debug("NILFS: seg_start %lld, seg_end %lld\n", seg_start, seg_end);
+
 	while (segnum != ri->ri_segnum || pseg_start <= ri->ri_pseg_start) {
 		brelse(bh_sum);
 		bh_sum = nilfs_read_log_header(nilfs, pseg_start, &sum);
@@ -705,6 +716,8 @@ static void nilfs_finish_roll_forward(struct the_nilfs *nilfs,
 	struct buffer_head *bh;
 	int err;
 
+	pr_debug("NILFS: nilfs_finish_roll_forward\n");
+
 	if (nilfs_get_segnum_of_block(nilfs, ri->ri_lsegs_start) !=
 	    nilfs_get_segnum_of_block(nilfs, ri->ri_super_root))
 		return;
@@ -750,6 +763,8 @@ int nilfs_salvage_orphan_logs(struct the_nilfs *nilfs,
 	if (ri->ri_lsegs_start == 0 || ri->ri_lsegs_end == 0)
 		return 0;
 
+	pr_debug("NILFS: nilfs_salvage_orphan_logs\n");
+
 	err = nilfs_attach_checkpoint(sb, ri->ri_cno, true, &root);
 	if (unlikely(err)) {
 		printk(KERN_ERR
@@ -831,6 +846,10 @@ int nilfs_search_super_root(struct the_nilfs *nilfs,
 	cno = nilfs->ns_last_cno;
 	segnum = nilfs_get_segnum_of_block(nilfs, pseg_start);
 
+	pr_debug("NILFS: nilfs_search_super_root\n");
+	pr_debug("NILFS: pseg_start %lld, seg_seq %lld\n", pseg_start, seg_seq);
+	pr_debug("NILFS: cno %lld, segnum %lld\n", cno, segnum);
+
 	/* Calculate range of segment */
 	nilfs_get_segment_range(nilfs, segnum, &seg_start, &seg_end);
 
-- 
1.7.9.5


  parent reply	other threads:[~2012-11-16 13:52 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAFPMYnE3ybWO4o=E1UonAZJ7Uwn5y9n4840ksYGAu7qAYJ0zKw@mail.gmail.com>
     [not found] ` <CAFPMYnE3ybWO4o=E1UonAZJ7Uwn5y9n4840ksYGAu7qAYJ0zKw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-30 13:20   ` very large mount time after unxepected power down Сергей Александров
     [not found]     ` <CAFPMYnEZ28qvwkE3kaB59h2rD_8noT+gQtp7Hs6uvmHcL6KzYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-30 13:49       ` Vyacheslav Dubeyko
2012-10-30 14:30         ` Сергей Александров
     [not found]           ` <CAFPMYnHhtFxuVZOMu9MZ6Xb74mFPm1a-4axyFKkHiJjDEW_4BA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-30 14:52             ` Vyacheslav Dubeyko
2012-10-30 15:02               ` Сергей Александров
     [not found]                 ` <CAFPMYnGn4aNf=5B9v93TtTc6x4hG1ULgt0P9i75uO=xGX0U2bg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-30 17:35                   ` Vyacheslav Dubeyko
     [not found]                     ` <AFFE5823-0AD0-488C-B465-55CF45A10785-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
2012-10-31  3:51                       ` Сергей Александров
     [not found]                         ` <CAFPMYnEtXMr1UOVYdNNRxxH83=O-_UOR_ZhCdqjh+JuUNrFiDA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-31  6:13                           ` Vyacheslav Dubeyko
2012-10-31 18:06                             ` Сергей Александров
     [not found]                               ` <CAFPMYnHB=x2y3C-bVSEcaT2nMYn12zc5Jnr56ph31zBbym4Kfw@mail.gmail.com>
     [not found]                                 ` <CAFPMYnHB=x2y3C-bVSEcaT2nMYn12zc5Jnr56ph31zBbym4Kfw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-15  4:07                                   ` Сергей Александров
     [not found]                                     ` <CAFPMYnE2j0DjiqcSuJRiJX5hfDjHoyh-WUhG0cMav9K=tbsLDQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-15  6:32                                       ` Vyacheslav Dubeyko
     [not found]                                         ` <CAFPMYnH4npNU8dJKAHwjatxAA=WoT10EWho5xyYjZJjz4uOYBA@mail.gmail.com>
     [not found]                                           ` <CAFPMYnG6zjT6-=x7XcVuuCp1__H0FhCBfNmyrfQi8dNpWC_m2w@mail.gmail.com>
     [not found]                                             ` <CAFPMYnG6zjT6-=x7XcVuuCp1__H0FhCBfNmyrfQi8dNpWC_m2w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-16  6:26                                               ` Vyacheslav Dubeyko
2012-11-16  6:40                                                 ` Сергей Александров
     [not found]                                                   ` <CAFPMYnFLSZW068cFZ4FqDKF5sS_zF3SoV=vPG2=m+kvaxq-BZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-16  6:53                                                     ` Vyacheslav Dubeyko
2012-11-16  7:11                                                       ` Сергей Александров
     [not found]                                                         ` <CAFPMYnEYnLv5e6a3ZcFRjw-8cNB80T5=mpuiX9jaWa+pEj8Q-A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-16  7:37                                                           ` Vyacheslav Dubeyko
2012-11-16 13:52                                                           ` Vyacheslav Dubeyko [this message]
2012-11-16 13:56                                                             ` Сергей Александров
     [not found]                                                               ` <CAFPMYnHzghu8k36wQj5h4K7a2wS6EcURcQmCOUTb5B2CJB9ufQ@mail.gmail.com>
     [not found]                                                                 ` <CAFPMYnHzghu8k36wQj5h4K7a2wS6EcURcQmCOUTb5B2CJB9ufQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-26 20:10                                                                   ` Vyacheslav Dubeyko
     [not found]                                                                     ` <782558C7-081D-4466-8780-51886E209A62-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
2012-11-26 19:17                                                                       ` Сергей Александров
     [not found]                                                                         ` <CAFPMYnGT1byuVA1hCnETWc2GZAbDsjeS95-F8f15QYPe_YHABA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-27  7:12                                                                           ` Vyacheslav Dubeyko
2012-11-27  7:47                                                                             ` Сергей Александров
     [not found]                                                                               ` <CAFPMYnFTvQVTC7sgmq=9sx4hX7fKkXyjNHSRXay3yTuRQsOq4w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-27  7:58                                                                                 ` Vyacheslav Dubeyko
2012-11-27  8:03                                                                                   ` Сергей Александров
     [not found]                                                                                     ` <CAFPMYnEPJLQs9TVMy8PFXqV-XvsM8oTvrf_XTE0+g9cQ+5MJXA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-27  9:58                                                                                       ` Сергей Александров
     [not found]                                                                                         ` <CAFPMYnFKKwfRD6zpO_AYCMXP5U_deHfOF6CXGdd6jjMjVkMJ6w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-27 11:29                                                                                           ` Vyacheslav Dubeyko
2012-12-03 13:56                                                                                             ` Vyacheslav Dubeyko
2012-11-28  7:10                                                                                           ` Vyacheslav Dubeyko

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=1353073969.9135.7.camel@slavad-ubuntu \
    --to=slava-yeenwd64clxbdgjk7y7tuq@public.gmane.org \
    --cc=linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=splavgm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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).