Re: [PATCH 1/2] fuse: don't wait for a sync-init mount in non-blocking reads
From: Yun Wang
Date: Thu Nov 19 2026 - 18:08:05 EST
On 11/19/26 12:57, Bernd Schubert wrote:
> On 11/19/26 12:36, Yun Wang wrote:
>> +/* read(2) and splice(2) of an O_NONBLOCK device don't wait for the mount */
>> +static struct fuse_dev *fuse_get_dev_read(struct file *file)
>> +{
>> + if (file->f_flags & O_NONBLOCK)
>> + return fuse_get_dev_nowait(file);
>> + return fuse_get_dev(file);
>> +}
>> +
>
> This is just a style comment, for me "fuse_get_dev_read" sounds weird.
> Maybe call this fuse_get_dev() and rename the other to _fuse_get_dev()?
> And both could be in the header file?
Sure, I'll do that in v2. The O_NONBLOCK-aware lookup becomes
fuse_get_dev(), a static inline in fuse_dev_i.h next to
fuse_get_dev_nowait(), and the waiting one becomes _fuse_get_dev().
The other callers (poll, fasync, the clone and backing ioctls and
fuse_uring_cmd()) switch to _fuse_get_dev(), so that only read and
splice change behaviour. _fuse_get_dev() itself stays in dev.c, as it
waits on the static fuse_dev_waitq; only its declaration moves to the
header.
_fuse_get_dev() then sits next to __fuse_get_dev(), which doesn't wait
and returns NULL, so the underscores don't say much about which one
waits. If you or Miklos prefer, I can call it fuse_get_dev_wait()
instead.
> Besides of pure style comment (and Miklos might have a different
> preference), looks good to me.
>
>
> Reviewed-by: Bernd Schubert <bernd@xxxxxxxxxxx>
Thanks for the review. I'll keep your Reviewed-by on the renamed patch
unless you object.
Thanks,
Yun