summaryrefslogtreecommitdiff
path: root/include/linux/debugobjects.h
diff options
context:
space:
mode:
authorAbd-Alrhman Masalkhi <abd.masalkhi@gmail.com>2026-06-13 18:28:10 +0000
committerYu Kuai <yukuai@fygo.io>2026-06-21 02:14:44 +0800
commita4c55c902670f2784d3001652183aafa17712cfe (patch)
tree54d9441c85b57c3c39b0fed32aaa95878719eb02 /include/linux/debugobjects.h
parent393d687131d8aa8c7e4de2cb494438e145d20fc2 (diff)
md/raid1: simplify raid1_write_request() error handling
raid1_write_request() increments rdev->nr_pending before checking the badblocks and then immediately decrements it again when a device is skipped. Move the increment until after the checks succeed so the reference accounting is easier to follow. Consolidate the failure paths so that each error label releases exactly the resources acquired up to that point. err_dec_pending drops pending references and frees the r1bio, while err_allow_barrier handles the barrier release before returning. When a REQ_ATOMIC write cannot be satisfied due to a badblock range, complete the bio with BLK_STS_NOTSUPP rather than reporting an I/O error, since the operation is unsupported rather than having failed during I/O. Rename max_write_sectors to max_sectors and remove the redundant local copy. Signed-off-by: Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com> Link: https://patch.msgid.link/20260613182810.1317258-5-abd.masalkhi@gmail.com Signed-off-by: Yu Kuai <yukuai@fygo.io>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions