qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 02/20] fuse: Allow exporting BDSs via FUSE


From: Max Reitz
Subject: Re: [PATCH v2 02/20] fuse: Allow exporting BDSs via FUSE
Date: Thu, 15 Oct 2020 17:59:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

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

[Prev in Thread] Current Thread [Next in Thread]