Skip to content

md/md-llbimtap: fix two corner case problems - #507

Closed
blktests-ci-kpd[bot] wants to merge 3 commits into
linus-master_basefrom
series/1046430=>linus-master
Closed

blktests-ci-kpd[bot] wants to merge 3 commits into
linus-master_basefrom
series/1046430=>linus-master

Conversation

@blktests-ci-kpd

Copy link
Copy Markdown

Pull request for series with
subject: md/md-llbimtap: fix two corner case problems
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1046430

@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 6208587
series: https://patchwork.kernel.org/project/linux-block/list/?series=1046430
version: 1

@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: d91a46d
series: https://patchwork.kernel.org/project/linux-block/list/?series=1046430
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1046430=>linus-master branch from f026438 to 47ff00d Compare January 25, 2026 10:21
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: fcb70a5
series: https://patchwork.kernel.org/project/linux-block/list/?series=1046430
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1046430=>linus-master branch from 47ff00d to a5025c6 Compare January 27, 2026 10:05
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 8dfce89
series: https://patchwork.kernel.org/project/linux-block/list/?series=1046430
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1046430=>linus-master branch from a5025c6 to f874326 Compare January 29, 2026 00:26
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: de0674d
series: https://patchwork.kernel.org/project/linux-block/list/?series=1046430
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1046430=>linus-master branch from f874326 to 6cd03ff Compare February 3, 2026 19:16
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: f14faaf
series: https://patchwork.kernel.org/project/linux-block/list/?series=1046430
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1046430=>linus-master branch from 6cd03ff to 0af2ad7 Compare February 5, 2026 03:38
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: b7ff715
series: https://patchwork.kernel.org/project/linux-block/list/?series=1046430
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1046430=>linus-master branch from 0af2ad7 to 9c4e152 Compare February 6, 2026 09:01
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: e7aa572
series: https://patchwork.kernel.org/project/linux-block/list/?series=1046430
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1046430=>linus-master branch from 9c4e152 to f0e4f35 Compare February 8, 2026 04:23
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 05f7e89
series: https://patchwork.kernel.org/project/linux-block/list/?series=1046430
version: 1

When llbitmap bit state is still unwritten, any new write should force
rcw, as bitmap_ops->blocks_synced() is checked in handle_stripe_dirting().
However, later the same check is missing in need_this_block(), causing
stripe to deadloop during handling because handle_stripe() will decide
to go to handle_stripe_fill(), meanwhile need_this_block() always return
0 and nothing is handled.

Fixes: 5ab829f ("md/md-llbitmap: introduce new lockless bitmap")
Signed-off-by: Yu Kuai <yukuai@fnnas.com>
Reviewed-by: Li Nan <linan122@huawei.com>
When llbitmap_suspend_timeout() times out waiting for percpu_ref to
become zero, it returns -ETIMEDOUT without resurrecting the percpu_ref.
The caller (md_llbitmap_daemon_fn) then continues to the next page
without calling llbitmap_resume(), leaving the percpu_ref in a killed
state permanently.

Fix this by resurrecting the percpu_ref before returning the error,
ensuring the page control structure remains usable for subsequent
operations.

Fixes: 5ab829f ("md/md-llbitmap: introduce new lockless bitmap")
Signed-off-by: Yu Kuai <yukuai@fnnas.com>
Reviewed-by: Li Nan <linan122@huawei.com>
@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1046430=>linus-master branch from f0e4f35 to 83738bb Compare February 9, 2026 04:38
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: c22e26b
series: https://patchwork.kernel.org/project/linux-block/list/?series=1046430
version: 1

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/linux-block/list/?series=1046430
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Applying: md/raid5: fix IO hang with degraded array with llbitmap
Using index info to reconstruct a base tree...
M	drivers/md/raid5.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/md/raid5.c
No changes -- Patch already applied.
Applying: md/md-llbitmap: fix percpu_ref not resurrected on suspend timeout
Patch failed at 0002 md/md-llbitmap: fix percpu_ref not resurrected on suspend timeout'
  stderr: 'error: sha1 information is lacking or useless (drivers/md/md-llbitmap.c).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"'

conflict:


@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the linus-master_base branch 3 times, most recently from 0525b37 to 6de2940 Compare February 13, 2026 13:13
blktests-ci-kpd Bot pushed a commit that referenced this pull request Feb 15, 2026
LLVM generates bpf_addr_space_cast instruction while translating pointers
between native (zero) address space and __attribute__((address_space(N))).
The addr_space=0 is reserved as bpf_arena address space.

rY = addr_space_cast(rX, 0, 1) is processed by the verifier and converted
to normal 32-bit move: wX = wY

rY = addr_space_cast(rX, 1, 0) has to be converted by JIT.

With this, the following test cases passed:

    $ ./test_progs -a arena_htab,arena_list,arena_strsearch,verifier_arena,verifier_arena_large
    #4/1     arena_htab/arena_htab_llvm:OK
    #4/2     arena_htab/arena_htab_asm:OK
    #4       arena_htab:OK
    #5/1     arena_list/arena_list_1:OK
    #5/2     arena_list/arena_list_1000:OK
    #5       arena_list:OK
    #7/1     arena_strsearch/arena_strsearch:OK
    #7       arena_strsearch:OK
    #507/1   verifier_arena/basic_alloc1:OK
    #507/2   verifier_arena/basic_alloc2:OK
    #507/3   verifier_arena/basic_alloc3:OK
    #507/4   verifier_arena/basic_reserve1:OK
    #507/5   verifier_arena/basic_reserve2:OK
    #507/6   verifier_arena/reserve_twice:OK
    #507/7   verifier_arena/reserve_invalid_region:OK
    #507/8   verifier_arena/iter_maps1:OK
    #507/9   verifier_arena/iter_maps2:OK
    #507/10  verifier_arena/iter_maps3:OK
    #507     verifier_arena:OK
    #508/1   verifier_arena_large/big_alloc1:OK
    #508/2   verifier_arena_large/access_reserved:OK
    #508/3   verifier_arena_large/request_partially_reserved:OK
    #508/4   verifier_arena_large/free_reserved:OK
    #508/5   verifier_arena_large/big_alloc2:OK
    #508     verifier_arena_large:OK
    Summary: 5/20 PASSED, 0 SKIPPED, 0 FAILED

Acked-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Tested-by: Vincent Li <vincent.mc.li@gmail.com>
Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the linus-master_base branch 8 times, most recently from df85678 to 50e7070 Compare February 22, 2026 05:34
@blktests-ci-kpd

Copy link
Copy Markdown
Author

At least one diff in series https://patchwork.kernel.org/project/linux-block/list/?series=1046430 irrelevant now for [{'archived': False, 'project': 241}] search patterns

@blktests-ci-kpd blktests-ci-kpd Bot closed this Feb 22, 2026
@blktests-ci-kpd
blktests-ci-kpd Bot deleted the series/1046430=>linus-master branch February 24, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants