2020-12-23 12:20:10

by Hui Su

[permalink] [raw]
Subject: [PATCH v2] blokc/blk-merge: remove the next_bvec label in __blk_bios_map_sg()

remove the next_bvec label in __blk_bios_map_sg(),
simplify the logic of traversal bvec.

Signed-off-by: Hui Su <[email protected]>
---
block/blk-merge.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/block/blk-merge.c b/block/blk-merge.c
index 808768f6b174..aa113cbc0f35 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -494,15 +494,15 @@ static int __blk_bios_map_sg(struct request_queue *q, struct bio *bio,
* to bio
*/
if (new_bio &&
- __blk_segment_map_sg_merge(q, &bvec, &bvprv, sg))
- goto next_bvec;
+ __blk_segment_map_sg_merge(q, &bvec, &bvprv, sg)) {
+ new_bio = false;
+ continue;
+ }

if (bvec.bv_offset + bvec.bv_len <= PAGE_SIZE)
nsegs += __blk_bvec_map_sg(bvec, sglist, sg);
else
nsegs += blk_bvec_map_sg(q, &bvec, sglist, sg);
- next_bvec:
- new_bio = false;
}
if (likely(bio->bi_iter.bi_size)) {
bvprv = bvec;
--
2.25.1



2020-12-26 11:19:16

by kernel test robot

[permalink] [raw]
Subject: [blokc/blk] d828aefa7a: xfstests.xfs.372.fail


Greeting,

FYI, we noticed the following commit (built with gcc-9):

commit: d828aefa7a1bdf7fbc5073fdb66da9bfb1264c21 ("[PATCH v2] blokc/blk-merge: remove the next_bvec label in __blk_bios_map_sg()")
url: https://github.com/0day-ci/linux/commits/Hui-Su/blokc-blk-merge-remove-the-next_bvec-label-in-__blk_bios_map_sg/20201223-202618
base: https://git.kernel.org/cgit/linux/kernel/git/axboe/linux-block.git for-next

in testcase: xfstests
version: xfstests-x86_64-d41dcbd-1_20201218
with following parameters:

disk: 4HDD
fs: xfs
test: xfs-reflink-18
ucode: 0x21

test-description: xfstests is a regression test suite for xfs and other files ystems.
test-url: git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git


on test machine: 4 threads Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz with 8G memory

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):




If you fix the issue, kindly add following tag
Reported-by: kernel test robot <[email protected]>

2019-02-14 10:12:19 export TEST_DIR=/fs/sdb2
2019-02-14 10:12:19 export TEST_DEV=/dev/sdb2
2019-02-14 10:12:19 export FSTYP=xfs
2019-02-14 10:12:19 export SCRATCH_MNT=/fs/scratch
2019-02-14 10:12:19 mkdir /fs/scratch -p
2019-02-14 10:12:19 export SCRATCH_DEV=/dev/sdb5
2019-02-14 10:12:19 export SCRATCH_LOGDEV=/dev/sdb3
2019-02-14 10:12:19 export SCRATCH_XFS_LIST_METADATA_FIELDS=u3.sfdir3.hdr.parent.i4
2019-02-14 10:12:19 export SCRATCH_XFS_LIST_FUZZ_VERBS=random
2019-02-14 10:12:19 export MKFS_OPTIONS=-mreflink=1
2019-02-14 10:12:19 sed "s:^:xfs/:" //lkp/benchmarks/xfstests/tests/xfs-reflink-18
2019-02-14 10:12:19 ./check xfs/372 xfs/373
FSTYP -- xfs (debug)
PLATFORM -- Linux/x86_64 lkp-ivb-d04 5.10.0-10938-gd828aefa7a1b #6 SMP Wed Dec 23 22:57:37 CST 2020
MKFS_OPTIONS -- -f -mreflink=1 /dev/sdb5
MOUNT_OPTIONS -- /dev/sdb5 /fs/scratch

xfs/372 - output mismatch (see /lkp/benchmarks/xfstests/results//xfs/372.out.bad)
--- tests/xfs/372.out 2020-12-18 04:10:02.000000000 +0000
+++ /lkp/benchmarks/xfstests/results//xfs/372.out.bad 2019-02-14 10:14:04.137007985 +0000
@@ -1,4 +1,5 @@
QA output created by 372
Format and populate
Fuzz refcountbt
+xfs_mdrestore: error reading from metadump file
Done fuzzing refcountbt
...
(Run 'diff -u /lkp/benchmarks/xfstests/tests/xfs/372.out /lkp/benchmarks/xfstests/results//xfs/372.out.bad' to see the entire diff)
xfs/373 - output mismatch (see /lkp/benchmarks/xfstests/results//xfs/373.out.bad)
--- tests/xfs/373.out 2020-12-18 04:10:02.000000000 +0000
+++ /lkp/benchmarks/xfstests/results//xfs/373.out.bad 2019-02-14 10:15:47.481014528 +0000
@@ -1,4 +1,5 @@
QA output created by 373
Format and populate
Fuzz refcountbt
+xfs_mdrestore: error reading from metadump file
Done fuzzing refcountbt
...
(Run 'diff -u /lkp/benchmarks/xfstests/tests/xfs/373.out /lkp/benchmarks/xfstests/results//xfs/373.out.bad' to see the entire diff)
Ran: xfs/372 xfs/373
Failures: xfs/372 xfs/373
Failed 2 of 2 tests




To reproduce:

git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp install job.yaml # job file is attached in this email
bin/lkp run job.yaml



Thanks,
Oliver Sang


Attachments:
(No filename) (3.28 kB)
config-5.10.0-10938-gd828aefa7a1b (174.62 kB)
job-script (6.03 kB)
kmsg.xz (22.47 kB)
xfstests (2.05 kB)
job.yaml (4.93 kB)
reproduce (924.00 B)
Download all attachments

2020-12-28 15:48:07

by Hui Su

[permalink] [raw]
Subject: Re: [blokc/blk] d828aefa7a: xfstests.xfs.372.fail

On Sat, Dec 26, 2020 at 07:31:33PM +0800, kernel test robot wrote:
>
> Greeting,
>
> FYI, we noticed the following commit (built with gcc-9):
>
> commit: d828aefa7a1bdf7fbc5073fdb66da9bfb1264c21 ("[PATCH v2] blokc/blk-merge: remove the next_bvec label in __blk_bios_map_sg()")
> url: https://github.com/0day-ci/linux/commits/Hui-Su/blokc-blk-merge-remove-the-next_bvec-label-in-__blk_bios_map_sg/20201223-202618
> base: https://git.kernel.org/cgit/linux/kernel/git/axboe/linux-block.git for-next
>
> in testcase: xfstests
> version: xfstests-x86_64-d41dcbd-1_20201218
> with following parameters:
>
> disk: 4HDD
> fs: xfs
> test: xfs-reflink-18
> ucode: 0x21
>
> test-description: xfstests is a regression test suite for xfs and other files ystems.
> test-url: git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git
>
>
> on test machine: 4 threads Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz with 8G memory
>
> caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
>
>
>
>
> If you fix the issue, kindly add following tag
> Reported-by: kernel test robot <[email protected]>

Thanks, i will take a look at it.