summaryrefslogtreecommitdiffstats
path: root/drivers/block/xen-blkfront.c
diff options
context:
space:
mode:
authorDaniel Stodden <daniel.stodden@citrix.com>2010-05-01 00:01:15 +0200
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 18:31:34 +0200
commit5b61cb90c2ad8c853b4dd53eec200bacd2f02172 (patch)
treed518fde8701ce437ac87ee36732401fc115e9d7b /drivers/block/xen-blkfront.c
parentxen/blkfront: revalidate after setting capacity (diff)
downloadlinux-5b61cb90c2ad8c853b4dd53eec200bacd2f02172.tar.xz
linux-5b61cb90c2ad8c853b4dd53eec200bacd2f02172.zip
xenbus: Make xenbus_switch_state transactional
According to the comments, this was how it's been done years ago, but apparently took an xbt pointer from elsewhere back then. The code was removed because of consistency issues: cancellation wont't roll back the saved xbdev->state. Still, unsolicited writes to the state field remain an issue, especially if device shutdown takes thread synchronization, and subtle races cause accidental recreation of the device node. Fixed by reintroducing the transaction. An internal one is sufficient, so the xbdev->state value remains consistent. Also fixes the original hack to prevent infinite recursion. Instead of bailing out on the first attempt to switch to Closing, checks call depth now. Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Diffstat (limited to 'drivers/block/xen-blkfront.c')
0 files changed, 0 insertions, 0 deletions