On 15.10.20 17:41, Kevin Wolf wrote:
> Am 15.10.2020 um 16:46 hat Max Reitz geschrieben:
>> On 15.10.20 10:57, Kevin Wolf wrote:
>>> Am 22.09.2020 um 12:49 hat Max Reitz geschrieben:

[...]

>>>> +static void fuse_export_shutdown(BlockExport *blk_exp)
>>>> +{
>>>> +    FuseExport *exp = container_of(blk_exp, FuseExport, common);
>>>> +
>>>> +    if (exp->fuse_session) {
>>>> +        fuse_session_exit(exp->fuse_session);
>>>> +
>>>> +        if (exp->mounted) {
>>>> +            fuse_session_unmount(exp->fuse_session);
>>>> +            exp->mounted = false;
>>>> +        }
>>>> +
>>>> +        if (exp->fd_handler_set_up) {
>>>> +            aio_set_fd_handler(exp->common.ctx,
>>>> +                               fuse_session_fd(exp->fuse_session), true,
>>>> +                               NULL, NULL, NULL, NULL);
>>>> +            exp->fd_handler_set_up = false;
>>>> +        }
>>>> +
>>>> +        fuse_session_destroy(exp->fuse_session);
>>>> +        exp->fuse_session = NULL;
>>>
>>> What happens if a request is still in flight?
>>>
>>> Oh, can't happen because the driver is fully synchronous after this
>>> series. Fair enough, making it asynchronous can come on top of it.
>>
>> (I had multiple approaches of handling parallel requests, but none made
>> a substantial performance difference, which is why I left the driver in
>> the most simple form for this first proposal.)
> 
> I think the more relevant part is that we'd block the guest or anything
> else running in the main loop while doing I/O.
> 
> Not a problem if you spawn a new qemu-storage-daemon just for this FUSE
> export, but if you want to have multiple exports, or export from the
> system emulator, you probably don't want to have synchronous operations.

Ah, hm.  Hmm. O:)

Does NBD work any different, though?  I had always assumed it runs in
the BB’s context.

Max

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to