On Wed, Dec 16, 2015 at 12:56 AM, Eryu Guan <guaneryu@xxxxxxxxx> wrote: > On Tue, Dec 15, 2015 at 09:27:14PM +0800, Ming Lei wrote: >> On Tue, Dec 15, 2015 at 9:06 PM, Eryu Guan <guaneryu@xxxxxxxxx> wrote: >> > On Tue, Dec 15, 2015 at 08:06:47PM +0800, Ming Lei wrote: >> >> On Tue, Dec 15, 2015 at 7:20 PM, Eryu Guan <guaneryu@xxxxxxxxx> wrote: >> >> > On Fri, Dec 11, 2015 at 07:53:40PM +0800, Eryu Guan wrote: >> >> >> Hi, >> >> >> >> >> >> I saw this kernel BUG_ON on 4.4-rc4 kernel, and this can be reproduced >> >> >> easily on ppc64 host by: >> >> > >> >> > This is still reproducible with 4.4-rc5 kernel. >> >> >> >> Could you capture the debug log after appyling the attached patch and >> >> the reproduction? >> > >> > Thanks for looking into this! dmesg shows: >> > >> > [ 686.217682] bio_split: sectors 0, bio_sectors 128, bi_rw 0 >> >> Then I guess queue_max_sectors(q) is bad, could you apply the >> attached patch(and the last patch) and post the log? > > [ 301.279018] blk_bio_segment_split: nseg 0, max_secs 64, max segs 2048 > [ 301.279023] bv.len 65536, bv.offset 0 > [ 301.279026] bio_split: sectors 0, bio_sectors 128, bi_rw 0 Now, the issue is quite obvious, and page size is 64K on your platform, but max_sectors is set as 64 by commit ca369d51b3e164, and I think it is wrong to set max sectors from OPTIMAL TRANSFER LENGTH. Also it is ugly to set limits->max_sectors from drivers directly, and drivers should have called block helpers to do that. > If full call trace is needed please let me know. Thanks for your test, and the above log is absolutely enough, :-) Thanks, Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html