From: virtiofs-bot@sinrega.org
To: virtio-fs@redhat.com
Subject: [Virtio-fs] [virtiofsd] MR opened: Handle FUSE_INIT and FUSE_DESTROY non-concurrently
Date: Tue, 1 Feb 2022 17:01:35 -0500 [thread overview]
Message-ID: <06332.122020117013300621@us-mta-315.us.mimecast.lan> (raw)
- Replace `futures::executor::ThreadPool` by `tokio::runtime::Runtime`.
This prepares for using tokio's implementation of `RwLock` with
owning lock guards that are `Send`, i.e., can be moved into other
threads.
- Handling FUSE_INIT or FUSE_DESTROY requests shouldn't be done
concurrently with handling some other request. To enforce this, we
require an exclusive reference (`&mut self`) when calling `init()`
or `destroy()` functions.
Furthermore, those requests (FUSE_INIT, FUSE_DESTROY) shouldn't be
reordered with other requests. To enforce this, we lock an `RwLock`
from the main thread and move the lock guard into the worker thread.
Locking from the main thread ensures that all previously queued
requests have already acquired their lock. This way, those requests
that require a write-lock (FUSE_INIT, FUSE_DESTROY) cannot be
reordered with requests that were enqueued earlier. For similar
reasons, they also cannot be reordered with requests that will be
enqueued later.
---
https://gitlab.com/virtio-fs/virtiofsd/-/merge_requests/85
reply other threads:[~2022-02-01 22:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=06332.122020117013300621@us-mta-315.us.mimecast.lan \
--to=virtiofs-bot@sinrega.org \
--cc=virtio-fs@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.