OpenCloudOS-Kernel/drivers/block
Petr Vorel c01a21b777 loop: Fix occasional uevent drop
Commit 716ad0986c ("loop: Switch to set_capacity_revalidate_and_notify")
causes an occasional drop of loop device uevent, which are no longer
triggered in loop_set_size() but in a different part of code.

Bug is reproducible with LTP test uevent01 [1]:

i=0; while true; do
    i=$((i+1)); echo "== $i =="
    lsmod |grep -q loop && rmmod -f loop
    ./uevent01 || break
done

Put back triggering through code called in loop_set_size().

Fix required to add yet another parameter to
set_capacity_revalidate_and_notify().

[1] https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/uevents/uevent01.c

[hch: rebased on a different change to the prototype of
 set_capacity_revalidate_and_notify]

Cc: stable@vger.kernel.org # v5.9
Fixes: 716ad0986c ("loop: Switch to set_capacity_revalidate_and_notify")
Reported-by: <ltp@lists.linux.it>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-11-12 13:59:04 -07:00
..
aoe
drbd
mtip32xx
paride
rnbd
rsxx
xen-blkback
zram
Kconfig
Makefile
amiflop.c
ataflop.c
brd.c
cryptoloop.c
floppy.c
loop.c loop: Fix occasional uevent drop 2020-11-12 13:59:04 -07:00
loop.h
nbd.c nbd: fix a block_device refcount leak in nbd_release 2020-11-10 08:01:28 -07:00
null_blk.h null_blk: Fix scheduling in atomic with zoned mode 2020-11-06 09:36:42 -07:00
null_blk_main.c
null_blk_trace.c
null_blk_trace.h
null_blk_zoned.c null_blk: Fix scheduling in atomic with zoned mode 2020-11-06 09:36:42 -07:00
pktcdvd.c
ps3disk.c
ps3vram.c
rbd.c
rbd_types.h
skd_main.c
skd_s1120.h
sunvdc.c
swim.c
swim3.c
swim_asm.S
sx8.c
umem.c
umem.h
virtio_blk.c
xen-blkfront.c
xsysace.c xsysace: use platform_get_resource() and platform_get_irq_optional() 2020-10-29 08:22:33 -06:00
z2ram.c