linux-stable/drivers/block
Bob Liu efd1535270 xen-blkfront: don't call talk_to_blkback when already connected to blkback
Sometimes blkfront may twice receive blkback_changed() notification
(XenbusStateConnected) after migration, which will cause
talk_to_blkback() to be called twice too and confuse xen-blkback.

The flow is as follow:
   blkfront                                        blkback
blkfront_resume()
 > talk_to_blkback()
  > Set blkfront to XenbusStateInitialised
                                                front changed()
                                                 > Connect()
                                                  > Set blkback to XenbusStateConnected

blkback_changed()
 > Skip talk_to_blkback()
   because frontstate == XenbusStateInitialised
 > blkfront_connect()
  > Set blkfront to XenbusStateConnected

-----
And here we get another XenbusStateConnected notification leading
to:
-----
blkback_changed()
 > because now frontstate != XenbusStateInitialised
   talk_to_blkback() is also called again
  > blkfront state changed from
  XenbusStateConnected to XenbusStateInitialised
    (Which is not correct!)

						front_changed():
                                                 > Do nothing because blkback
                                                   already in XenbusStateConnected

Now blkback is in XenbusStateConnected but blkfront is still
in XenbusStateInitialised - leading to no disks.

Poking of the XenbusStateConnected state is allowed (to deal with
block disk change) and has to be dealt with. The most likely
cause of this bug are custom udev scripts hooking up the disks
and then validating the size.

Signed-off-by: Bob Liu <bob.liu@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2016-06-08 13:54:39 -04:00
..
aoe mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
drbd drbd: switch to using blk_queue_write_cache() 2016-04-12 16:00:39 -06:00
mtip32xx mtip32xx: remove call to blk_queue_flush() 2016-04-12 16:00:39 -06:00
paride paride: make 'verbose' parameter an 'int' again 2016-03-15 16:55:16 -07:00
rsxx rsxx: don't open-code memdup_user() 2016-01-06 08:25:24 -05:00
xen-blkback block: kill off q->flush_flags 2016-04-13 13:33:19 -06:00
zram zram: don't call idr_remove() from zram_remove() 2016-01-15 17:56:32 -08:00
amiflop.c block: drop owner assignment from platform_drivers 2014-10-20 16:20:18 +02:00
ataflop.c Merge branch 'for-3.16/core' of git://git.kernel.dk/linux-block into next 2014-06-02 09:29:34 -07:00
brd.c mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
cciss.c SCSI misc on 20160113 2016-01-13 19:37:36 -08:00
cciss.h
cciss_cmd.h
cciss_scsi.c scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
cciss_scsi.h
cryptoloop.c block: cryptoloop - Use new skcipher interface 2016-01-27 20:35:43 +08:00
DAC960.c block: use pci_zalloc_consistent 2014-08-08 15:57:28 -07:00
DAC960.h
floppy.c floppy: refactor open() flags handling 2016-02-06 23:00:22 +01:00
hd.c block: hd: remove deprecated IRQF_DISABLED 2014-10-01 08:16:07 -06:00
Kconfig cpqarray: remove it from the kernel 2016-03-14 09:06:01 -06:00
loop.c loop: switch to using blk_queue_write_cache() 2016-04-12 16:00:39 -06:00
loop.h block: loop: support DIO & AIO 2015-09-23 11:01:16 -06:00
Makefile drivers:block: cpqarray clean up 2016-03-15 15:59:47 -07:00
mg_disk.c block: drop owner assignment from platform_drivers 2014-10-20 16:20:18 +02:00
nbd.c nbd: switch to using blk_queue_write_cache() 2016-04-12 16:00:39 -06:00
null_blk.c null_blk: add lightnvm null_blk device to the nullb_list 2016-03-18 18:10:37 -07:00
osdblk.c osdblk: switch to using blk_queue_write_cache() 2016-04-12 16:00:39 -06:00
pktcdvd.c Merge branch 'for-4.4/io-poll' of git://git.kernel.dk/linux-block 2015-11-10 17:23:49 -08:00
ps3disk.c ps3disk: switch to using blk_queue_write_cache() 2016-04-12 16:00:39 -06:00
ps3vram.c block: change ->make_request_fn() and users to return a queue cookie 2015-11-07 10:40:46 -07:00
rbd.c rbd: use GFP_NOIO consistently for request allocations 2016-04-05 22:11:37 +02:00
rbd_types.h
skd_main.c skd: remove broken discard support 2016-04-25 19:12:38 -06:00
skd_s1120.h
smart1,2.h
sunvdc.c sunvdc: reconnect ldc after vds service domain restarts 2014-12-11 18:52:45 -08:00
swim.c block: drop owner assignment from platform_drivers 2014-10-20 16:20:18 +02:00
swim3.c powerpc: Move Power Macintosh drivers to generic byteswappers 2015-03-23 14:29:40 +11:00
swim_asm.S
sx8.c sx8: use real time for the command seconds 2015-12-23 08:42:59 -07:00
umem.c block: change ->make_request_fn() and users to return a queue cookie 2015-11-07 10:40:46 -07:00
umem.h
virtio_blk.c virtio_blk: switch to using blk_queue_write_cache() 2016-04-12 16:00:39 -06:00
xen-blkfront.c xen-blkfront: don't call talk_to_blkback when already connected to blkback 2016-06-08 13:54:39 -04:00
xsysace.c block: systemace: Remove .owner field for driver 2014-08-21 20:37:54 -05:00
z2ram.c block: remove struct request buffer member 2014-04-15 14:03:02 -06:00