alistair23-linux/drivers/block
Philipp Reisner 13c76aba78 drbd: close race between drbd_set_role and drbd_connect
drbd_set_role(, R_PRIMARY, ) does the state change to Primary,
some more housekeeping, and possibly generates a new UUID set.

All of this holding the "state_mutex".

The connection handshake involves sending of various state information,
including the current data generation UUID set, and two connection
state changes from C_WF_CONNECTION to C_WF_REPORT_PARAMS further to
a number of different outcomes, resync being one of them.

If the connection handshake happens between the state change to Primary
and the generation of the new UUIDs, the resync decision based on the
old UUID set may be confused, depending on circumstances.

Make sure that, before we do the handshake, any promotion to Primary
role will either be complete (including the housekeeping stuff), or can
see, and serialize with, the ongoing handshake, based on the
"STATE_SENT" bit, which is set when we start the handshake, and cleared
only when we leave C_WF_REPORT_PARAMS again.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
2012-12-06 13:00:33 +01:00
..
aoe aoe: update aoe-internal version number to 50 2012-10-06 03:05:30 +09:00
drbd drbd: close race between drbd_set_role and drbd_connect 2012-12-06 13:00:33 +01:00
mtip32xx
paride
xen-blkback xen-blkback: move free persistent grants code 2012-11-26 14:58:11 -05:00
amiflop.c
ataflop.c
brd.c
cciss.c cciss: use check_signature() 2012-11-23 14:28:34 +01:00
cciss.h
cciss_cmd.h
cciss_scsi.c
cciss_scsi.h
cpqarray.c
cpqarray.h
cryptoloop.c
DAC960.c
DAC960.h
floppy.c
hd.c
ida_cmd.h
ida_ioctl.h
Kconfig
loop.c loop: Limit the number of requests in the bio list 2012-11-30 11:48:05 +01:00
Makefile
mg_disk.c
nbd.c nbd: handle discard requests 2012-10-06 03:05:24 +09:00
nvme.c PCI changes for the 3.7 merge window: 2012-10-01 12:05:36 -07:00
osdblk.c
pktcdvd.c
ps3disk.c
ps3vram.c
rbd.c rbd: BUG on invalid layout 2012-10-01 17:20:00 -05:00
rbd_types.h rbd: define some new format constants 2012-10-01 14:30:53 -05:00
smart1,2.h
sunvdc.c
swim.c
swim3.c
swim_asm.S
sx8.c
umem.c
umem.h
virtio_blk.c virtio-blk: Disable callback in virtblk_done() 2012-09-28 15:05:16 +09:30
xd.c
xd.h
xen-blkfront.c xen-blkfront: free allocated page 2012-11-26 14:58:11 -05:00
xsysace.c
z2ram.c