All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Stijn Tintel <stijn@linux-ipv6.be>
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: Re: f2fs: WARNING: at fs/f2fs/segment.c:718 update_sit_entry+0x1c0/0x2b0()
Date: Thu, 24 Aug 2017 12:02:36 -0700	[thread overview]
Message-ID: <20170824190236.GA10428@jaegeuk-macbookpro.roam.corp.google.com> (raw)
In-Reply-To: <bc0b328e-b5c0-2d04-e8bd-7de8e5887096@linux-ipv6.be>

On 08/24, Stijn Tintel wrote:
> On 23-08-17 23:37, Jaegeuk Kim wrote:
> > Thank you for the report.
> > Could you please test this patch?
> That seems to fix it, thanks!
> >
> > From 440e8638c5b4a7e7bd1234ea1e7da20ce226112e Mon Sep 17 00:00:00 2001
> > From: Jaegeuk Kim <jaegeuk@kernel.org>
> > Date: Wed, 23 Aug 2017 13:33:00 -0700
> > Subject: [PATCH] mkfs.f2fs: fix missing cpu_to_le64 for checkpoint version
> >
> > The error on mips was reported by Stjin as follow.
> Minor nit about a typo ;-)

Oh, sorry. Merged with fix. Thank you~

> >
> > Commit 8399a29df92d6867d226df362edbf2e0efa527c1 in f2fs-tools
> > ("mkfs.f2fs: give random checkpoint version") causes a bug when mounting
> > a filesystem created with it on a MIPS64 device running a 4.4(.83)
> > kernel. The following kernel warning appears several times per second,
> > for 30 seconds:
> >
> > [   23.837262] ------------[ cut here ]------------
> > [   23.842039] WARNING: CPU: 0 PID: 935 at fs/f2fs/segment.c:718
> > update_sit_entry+0x1c0/0x2b0()
> > [   23.850507] Modules linked in: pppoe ppp_async l2tp_ppp iptable_nat
> > [   24.174064] Call Trace:
> > [   24.176527] [<ffffffff81126e14>] show_stack+0x68/0xb4
> > [   24.181595] [<ffffffff81321fc4>] dump_stack+0x8c/0xc4
> > [   24.186660] [<ffffffff8113d004>] warn_slowpath_common+0xa0/0xd0
> > [   24.192597] [<ffffffff812e0148>] update_sit_entry+0x1c0/0x2b0
> > [   24.198353] [<ffffffff812e0a70>] refresh_sit_entry+0x70/0xf8
> > [   24.204022] [<ffffffff812e251c>] allocate_data_block+0x1f0/0x310
> > [   24.210038] [<ffffffff812e28d8>] do_write_page+0x29c/0x2bc
> > [   24.215532] [<ffffffff812e2a88>] write_data_page+0xa0/0xd8
> > [   24.221028] [<ffffffff812d844c>] do_write_data_page+0xe4/0x384
> > [   24.226870] [<ffffffff812d88f4>] f2fs_write_data_page+0x208/0x464
> > [   24.232972] [<ffffffff812d5184>] __f2fs_writepage+0x1c/0x74
> > [   24.238553] [<ffffffff812d54dc>]
> > f2fs_write_cache_pages.constprop.7+0x250/0x394
> > [   24.245869] [<ffffffff812d57f4>] f2fs_write_data_pages+0x130/0x1b0
> > [   24.252066] [<ffffffff811a9f80>] __filemap_fdatawrite_range+0xa0/0xd4
> > [   24.258515] [<ffffffff812d2338>] sync_dirty_dir_inodes+0x94/0xd8
> > [   24.264530] [<ffffffff812d2484>] write_checkpoint+0x108/0xb9c
> > [   24.270283] [<ffffffff812cc398>] f2fs_sync_fs+0x68/0xb0
> > [   24.275526] [<ffffffff812c641c>] f2fs_sync_file+0x2e8/0x518
> > [   24.281107] [<ffffffff81213ff4>] do_fsync+0x38/0x70
> > [   24.285992] [<ffffffff812142e8>] SyS_fsync+0x14/0x20
> > [   24.290972] [<ffffffff81103950>] syscall_common+0x34/0x58
> > [   24.296372]
> > [   24.298096] ---[ end trace fd3ac44449b218ab ]---
> >
> > Fix: 8399a29df92d68 ("mkfs.f2fs: give random checkpoint version")
> > Reported-by: Stijn Tintel <stijn@linux-ipv6.be>
> > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
> > ---
> >  mkfs/f2fs_format.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
> > index 92876b8..b379e80 100644
> > --- a/mkfs/f2fs_format.c
> > +++ b/mkfs/f2fs_format.c
> > @@ -546,7 +546,7 @@ static int f2fs_write_check_point_pack(void)
> >  	}
> >  
> >  	/* 1. cp page 1 of checkpoint pack 1 */
> > -	cp->checkpoint_ver = rand() | 0x1;
> > +	cp->checkpoint_ver = cpu_to_le64(rand() | 0x1);
> >  	set_cp(cur_node_segno[0], c.cur_seg[CURSEG_HOT_NODE]);
> >  	set_cp(cur_node_segno[1], c.cur_seg[CURSEG_WARM_NODE]);
> >  	set_cp(cur_node_segno[2], c.cur_seg[CURSEG_COLD_NODE]);
> 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

  reply	other threads:[~2017-08-24 19:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-23 12:21 f2fs: WARNING: at fs/f2fs/segment.c:718 update_sit_entry+0x1c0/0x2b0() Stijn Tintel
2017-08-23 20:37 ` Jaegeuk Kim
2017-08-24  7:02   ` Stijn Tintel
2017-08-24 19:02     ` Jaegeuk Kim [this message]
2017-08-28  9:21       ` Chao Yu

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=20170824190236.GA10428@jaegeuk-macbookpro.roam.corp.google.com \
    --to=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=stijn@linux-ipv6.be \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.