From: Shaohua Li <shli@kernel.org>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, Jens Axboe <axboe@kernel.dk>,
Jaegeuk Kim <jaegeuk.kim@samsung.com>,
linux-f2fs-devel@lists.sourceforge.net, slava@dubeyko.com
Subject: Re: mkfs.f2fs gets stuck with "blk_update_request: bio idx 0 >= vcnt 0" on 3.8
Date: Fri, 5 Apr 2013 09:53:27 +0800 [thread overview]
Message-ID: <20130405015327.GA319@kernel.org> (raw)
In-Reply-To: <CAMo8BfKgTPO6AJng6zo1my4K_PivC1gJFQmcvy8q=iDYWSO2Pw@mail.gmail.com>
On Thu, Apr 04, 2013 at 06:00:18AM +0400, Max Filippov wrote:
> Hi,
>
> On Tue, Apr 2, 2013 at 7:41 PM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> > I'm trying to create f2fs filesystem on SD card on pandaboard using
> > f2fs-tools v1.0.0.
> > It works fine on Linus' v3.6, but fails on both v3.8 and stable v3.8.5:
> >
> > # mkfs.f2fs /dev/mmcblk0p3
> > Info: sector size = 512
> > Info: total sectors = 11370496 (in 512bytes)
> > Info: zone aligned segment0 blkaddr: 512
> > [ 257.789764] blk_update_request: bio idx 0 >= vcnt 0
> >
> > mkfs process gets stuck in D state and I see the following in the dmesg:
> >
> > [ 257.789733] __end_that: dev mmcblk0: type=1, flags=122c8081
> > [ 257.789764] sector 4194304, nr/cnr 2981888/4294959104
> > [ 257.789764] bio df3840c0, biotail df3848c0, buffer (null), len 1526726656
> > [ 257.789764] blk_update_request: bio idx 0 >= vcnt 0
> > [ 257.794921] request botched: dev mmcblk0: type=1, flags=122c8081
> > [ 257.794921] sector 4194304, nr/cnr 2981888/4294959104
> > [ 257.794921] bio df3840c0, biotail df3848c0, buffer (null), len 1526726656
>
> [...]
>
> >> So, I think that it needs to investigate issue in the direction of
> >> BLKDISCARD code on the kernel side. It makes sense to debug
> >> f2fs_trim_device() method of mkfs.f2fs utility too. But I can't see
> >> anything strange in this function at a glance.
> >
> > Ok, I'll try to find what has changed in that ioctl handler since 3.6.
>
> the commit 0cfbcafcae8b7364b5fa96c2b26ccde7a3a296a9 'block: add plug
> for blkdev_issue_discard'
> have added merge opportunity for DISCARD requests. When I do
> mkfs.f2fs on a 5G partition (0xad8000 sectors) it submits two bios,
> one for 0x7fe000 sectors (0xffc00000 bytes) and another for
> 0x2da000 sectors (0x5b400000 bytes). Prior to that commit these
> bios weren't merged into one request. Now the second bio gets
> merged with the first, but the request's __data_len field is unsigned int
> and it gets wrapped to 0x5b000000 bytes instead of 0x15b000000
> in the bio_attempt_back_merge. Later this reduced size is passed to
> the blk_update_request causing KERN_ERR and not completed
> request. Reverting this commit fixes mkfs.f2fs for me.
A workaround is setting limits.max_discard_sectors to a smaller value.
So the question is why __data_len isn't sector based? Since disk is sector
based, is there any disk finishing IO in byte granularity? Maybe Jens can
answer.
Thanks,
Shaohua
next prev parent reply other threads:[~2013-04-05 1:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-01 17:19 mkfs.f2fs gets stuck with "blk_update_request: bio idx 0 >= vcnt 0" on 3.8 Max Filippov
2013-04-01 19:27 ` Vyacheslav Dubeyko
2013-04-01 20:21 ` Max Filippov
2013-04-02 6:27 ` Vyacheslav Dubeyko
2013-04-02 15:41 ` Max Filippov
2013-04-04 2:00 ` Max Filippov
2013-04-05 1:53 ` Shaohua Li [this message]
2013-04-05 2:18 ` Max Filippov
2013-04-05 7:57 ` Namjae Jeon
2013-04-05 15:01 ` Max Filippov
[not found] ` <CAKYAXd_q2oUiQBoLX77Yurs1OQ5cMACCGSYFOqgjPhxhErp9hA@mail.gmail.com>
[not found] ` <CAMo8BfJd9U+HAPqh-6XThHCXMCP35oLEyMXhYhPX_ZE5utD2LQ@mail.gmail.com>
2013-04-07 2:45 ` Namjae Jeon
2013-04-07 1:58 ` Shaohua Li
2013-04-07 2:21 ` Max Filippov
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=20130405015327.GA319@kernel.org \
--to=shli@kernel.org \
--cc=axboe@kernel.dk \
--cc=jaegeuk.kim@samsung.com \
--cc=jcmvbkbc@gmail.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=slava@dubeyko.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