diff options
| author | Yu Kuai <[email protected]> | 2025-06-26 11:57:43 +0000 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2025-06-26 13:34:11 +0000 |
| commit | c007062188d8e402c294117db53a24b2bed2b83f (patch) | |
| tree | 7473021b3beaaf24cbc2c5fb5b562e8ad6a668b0 /lib/crypto/mpi/mpicoder.c | |
| parent | Merge tag 'nvme-6.16-2025-06-26' of git://git.infradead.org/nvme into block-6.16 (diff) | |
| download | kernel-c007062188d8e402c294117db53a24b2bed2b83f.tar.gz kernel-c007062188d8e402c294117db53a24b2bed2b83f.zip | |
block: fix false warning in bdev_count_inflight_rw()
While bdev_count_inflight is interating all cpus, if some IOs are issued
from traversed cpu and then completed from the cpu that is not traversed
yet:
cpu0
cpu1
bdev_count_inflight
//for_each_possible_cpu
// cpu0 is 0
infliht += 0
// issue a io
blk_account_io_start
// cpu0 inflight ++
cpu2
// the io is done
blk_account_io_done
// cpu2 inflight --
// cpu 1 is 0
inflight += 0
// cpu2 is -1
inflight += -1
...
In this case, the total inflight will be -1, causing lots of false
warning. Fix the problem by removing the warning.
Noted there is still a valid warning for nvme-mpath(From Yi) that is not
fixed yet.
Fixes: f5482ee5edb9 ("block: WARN if bdev inflight counter is negative")
Reported-by: Yi Zhang <[email protected]>
Closes: https://lore.kernel.org/linux-block/[email protected]/T/#mae89155a5006463d0a21a4a2c35ae0034b26a339
Reported-and-tested-by: Calvin Owens <[email protected]>
Closes: https://lore.kernel.org/linux-block/[email protected]/T/#m1d935a00070bf95055d0ac84e6075158b08acaef
Reported-by: Dave Chinner <[email protected]>
Closes: https://lore.kernel.org/linux-block/[email protected]/
Signed-off-by: Yu Kuai <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpicoder.c')
0 files changed, 0 insertions, 0 deletions
