lkml.org 
[lkml]   [2012]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Xen-devel] [PATCH 2/6] xen-blkfront: handle backend CLOSED without CLOSING
On 04/10/12 11:14, Jan Beulich wrote:
>>>> On 25.09.12 at 19:53, David Vrabel <david.vrabel@citrix.com> wrote:
>> @@ -1167,7 +1168,8 @@ blkfront_closing(struct blkfront_info *info)
>>
>> mutex_lock(&bdev->bd_mutex);
>>
>> - if (bdev->bd_openers) {
>> + /* If the backend is already CLOSED, close now. */
>> + if (bdev->bd_openers && backend_state != XenbusStateClosed) {
>> xenbus_dev_error(xbdev, -EBUSY,
>> "Device in use; refusing to close");
>> xenbus_switch_state(xbdev, XenbusStateClosing);
>
> This looks wrong to me on a second glance: As long as there
> are users of the device, I don't think we want to go into Closed
> ourselves, irrespective of the backend state.

Any users of the frontend device are screwed either way, as the backend
is gone. It seems sensible to handle this case the same as (e.g.,) a
physical unplug of a USB storage device. Removing the device and
forcing all outstanding I/O to fail immediately rather than lingering in
the rings, going nowhere.

David


\
 
 \ /
  Last update: 2012-10-04 13:01    [W:0.069 / U:1.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site