android_kernel_motorola_sm6375/drivers/block
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Lars Ellenberg fe43ed97bb drbd: reject attach of unsuitable uuids even if connected
Multiple failure scenario:
a) all good
   Connected Primary/Secondary UpToDate/UpToDate
b) lose disk on Primary,
   Connected Primary/Secondary Diskless/UpToDate
c) continue to write to the device,
   changes only make it to the Secondary storage.
d) lose disk on Secondary,
   Connected Primary/Secondary Diskless/Diskless
e) now try to re-attach on Primary

This would have succeeded before, even though that is clearly the
wrong data set to attach to (missing the modifications from c).
Because we only compared our "effective" and the "to-be-attached"
data generation uuid tags if (device->state.conn < C_CONNECTED).

Fix: change that constraint to (device->state.pdsk != D_UP_TO_DATE)
compare the uuids, and reject the attach.

This patch also tries to improve the reverse scenario:
first lose Secondary, then Primary disk,
then try to attach the disk on Secondary.

Before this patch, the attach on the Secondary succeeds, but since commit
drbd: disconnect, if the wrong UUIDs are attached on a connected peer
the Primary will notice unsuitable data, and drop the connection hard.

Though unfortunately at a point in time during the handshake where
we cannot easily abort the attach on the peer without more
refactoring of the handshake.

We now reject any attach to "unsuitable" uuids,
as long as we can see a Primary role,
unless we already have access to "good" data.

Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-12-20 09:51:30 -07:00
..
aoe aoe: add __exit annotation 2018-12-16 09:01:38 -07:00
drbd drbd: reject attach of unsuitable uuids even if connected 2018-12-20 09:51:30 -07:00
mtip32xx mtip32xx: use BLK_STS_DEV_RESOURCE for device resources 2018-12-10 14:45:19 -07:00
paride
rsxx
xen-blkback
zram
amiflop.c
ataflop.c ataflop: implement mq_ops->commit_rqs() hook 2018-11-29 10:12:27 -07:00
brd.c
cryptoloop.c
floppy.c Linux 4.20-rc3 2018-11-18 15:46:03 -07:00
Kconfig
loop.c block: loop: check error using IS_ERR instead of IS_ERR_OR_NULL in loop_add() 2018-12-16 09:01:38 -07:00
loop.h
Makefile
nbd.c
null_blk.h
null_blk_main.c
null_blk_zoned.c
pktcdvd.c pktcdvd: remove queue_lock around blk_queue_max_hw_sectors 2018-11-16 09:16:59 -07:00
ps3disk.c
ps3vram.c
rbd.c
rbd_types.h
skd_main.c
skd_s1120.h
sunvdc.c sunvdc: Do not spin in an infinite loop when vio_ldc_send() returns EAGAIN 2018-11-28 06:23:12 -07:00
swim.c
swim3.c
swim_asm.S
sx8.c
umem.c
umem.h
virtio_blk.c virtio_blk: implement mq_ops->commit_rqs() hook 2018-11-29 10:12:22 -07:00
xen-blkfront.c
xsysace.c
z2ram.c