linux-nilfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wakko Warner <wakko@animx.eu.org>
To: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Cc: linux-nilfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: NILFS crash on 2.6.37
Date: Fri, 21 Jan 2011 20:57:48 -0500	[thread overview]
Message-ID: <20110122015748.GA3174@animx.eu.org> (raw)
In-Reply-To: <20110121.181859.144825828.ryusuke@osrg.net>

Ryusuke Konishi wrote:
> On Fri, 21 Jan 2011 16:37:38 +0900 (JST), Ryusuke Konishi wrote:
> > (Cc'ed to linux-nilfs)
> > > [ 1202.581501] NILFS warning: broken superblock. using spare superblock.
> > > [ 1202.582093] NILFS warning: broken superblock. using spare superblock.

Why does it say this 2 times?  Just curious.

> > Thanks for the report.
> > 
> > This seems to be a regression on 2.6.36 which could happen when one of
> > two superblocks is broken.
> > 
> > I'll fix it.
> 
> Does the following patch fix your problem?

> diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
> index 0994f6a7..58fd707 100644
> --- a/fs/nilfs2/super.c
> +++ b/fs/nilfs2/super.c
> @@ -704,7 +704,8 @@ skip_mount_setup:
>  	sbp[0]->s_state =
>  		cpu_to_le16(le16_to_cpu(sbp[0]->s_state) & ~NILFS_VALID_FS);
>  	/* synchronize sbp[1] with sbp[0] */
> -	memcpy(sbp[1], sbp[0], nilfs->ns_sbsize);
> +	if (sbp[1])
> +		memcpy(sbp[1], sbp[0], nilfs->ns_sbsize);
>  	return nilfs_commit_super(sbi, NILFS_SB_COMMIT_ALL);
>  }

That patch fix it.  Just a note, the 2.6.37 vanilla source was about 20
lines up from 704

-- 
 Microsoft has beaten Volkswagen's world record.  Volkswagen only created 22
 million bugs.

  reply	other threads:[~2011-01-22  1:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20110121024918.GA29598@animx.eu.org>
     [not found] ` <20110121024918.GA29598-WZdgCHJQUilg9hUCZPvPmw@public.gmane.org>
2011-01-21  7:37   ` NILFS crash on 2.6.37 Ryusuke Konishi
     [not found]     ` <20110121.163738.135792151.ryusuke-sG5X7nlA6pw@public.gmane.org>
2011-01-21  9:18       ` Ryusuke Konishi
2011-01-22  1:57         ` Wakko Warner [this message]
     [not found]           ` <20110122015748.GA3174-WZdgCHJQUilg9hUCZPvPmw@public.gmane.org>
2011-01-22 14:09             ` Ryusuke Konishi
     [not found]               ` <20110122.230956.176521815.ryusuke-sG5X7nlA6pw@public.gmane.org>
2011-01-22 16:09                 ` Wakko Warner

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=20110122015748.GA3174@animx.eu.org \
    --to=wakko@animx.eu.org \
    --cc=konishi.ryusuke@lab.ntt.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nilfs@vger.kernel.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).