linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk.kim@samsung.com>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: Dave Jones <davej@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: f2fs: kernel BUG at fs/f2fs/segment.h:543
Date: Mon, 07 Apr 2014 12:40:28 +0900	[thread overview]
Message-ID: <1396842028.24638.4.camel@kjgkr> (raw)
In-Reply-To: <5342058E.4090500@oracle.com>

2014-04-06 (일), 21:55 -0400, Sasha Levin:
> On 04/06/2014 09:20 PM, Jaegeuk Kim wrote:
> > Hi,
> > 
> > Thank you for the report.
> > 
> > If possible, could you share fsck.f2fs or dump.f2fs on the corrupted
> > partition?
> > 
> > Otherwise, how about this?
> > # fdisk /dev/sdx
> >> > p
> 
> Hey Jaegeuk,
> 
> Unfortunately it was a temporary filesystem inside the fuzzer that has
> gone away as soon as the kernel died, so I don't have access to it.

Got it.
Then, just for sure, if it is reproducible, could you test f2fs with the
following patch?
Thanks,

From 84f80a126458eeeaa3c4ebcecfb6908f7d22b214 Mon Sep 17 00:00:00 2001
From: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Date: Mon, 7 Apr 2014 12:37:39 +0900
Subject: [PATCH] test

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
---
 fs/f2fs/segment.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index 7091204..d9cf06e 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment.h
@@ -540,6 +540,11 @@ static inline void verify_block_addr(struct
f2fs_sb_info *sbi, block_t blk_addr)
 	block_t total_blks = sm_info->segment_count <<
sbi->log_blocks_per_seg;
 	block_t start_addr = sm_info->seg0_blkaddr;
 	block_t end_addr = start_addr + total_blks - 1;
+	if (blk_addr < start_addr) {
+		f2fs_msg(sbi->sb, KERN_ERR,
+			"blk_addr: %ld, start: %ld, end: %ld",
+			blk_addr, start_addr, end_addr);
+	}
 	BUG_ON(blk_addr < start_addr);
 	BUG_ON(blk_addr > end_addr);
 }
-- 
1.8.4.474.g128a96c


-- 
Jaegeuk Kim
Samsung



------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees_APR
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2014-04-07  3:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-05 15:12 f2fs: kernel BUG at fs/f2fs/segment.h:543 Sasha Levin
2014-04-07  1:20 ` Jaegeuk Kim
2014-04-07  1:55   ` Sasha Levin
2014-04-07  3:40     ` Jaegeuk Kim [this message]
2014-04-09 15:51 ` Chao Yu
2014-04-09 15:57   ` Sasha Levin

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=1396842028.24638.4.camel@kjgkr \
    --to=jaegeuk.kim@samsung.com \
    --cc=davej@redhat.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sasha.levin@oracle.com \
    /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).