Re: [PATCH v2 RESEND 1/2] fuse: Introduce sysfs API for resend pending reque

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

 



On Wed, 29 Nov 2023 at 10:43, Zhao Chen <winters.zc@xxxxxxxxxxxx> wrote:
>
> From: Peng Tao <bergwolf@xxxxxxxxxxxx>
>
> When a FUSE daemon panic and failover, we aim to minimize the impact on
> applications by reusing the existing FUSE connection. During this
> process, another daemon is employed to preserve the FUSE connection's file
> descriptor.
>
> However, it is possible for some inflight requests to be lost and never
> returned. As a result, applications awaiting replies would become stuck
> forever. To address this, we can resend these pending requests to the
> FUSE daemon, which is done by fuse_resend_pqueue(), ensuring they are
> properly processed again.
>
> Signed-off-by: Peng Tao <bergwolf@xxxxxxxxxxxx>
> Signed-off-by: Zhao Chen <winters.zc@xxxxxxxxxxxx>
> ---
>  fs/fuse/control.c | 20 ++++++++++++++++
>  fs/fuse/dev.c     | 59 +++++++++++++++++++++++++++++++++++++++++++++++
>  fs/fuse/fuse_i.h  |  5 +++-
>  3 files changed, 83 insertions(+), 1 deletion(-)
>
> diff --git a/fs/fuse/control.c b/fs/fuse/control.c
> index 284a35006462..fd2258d701dd 100644
> --- a/fs/fuse/control.c
> +++ b/fs/fuse/control.c
> @@ -44,6 +44,18 @@ static ssize_t fuse_conn_abort_write(struct file *file, const char __user *buf,
>         return count;
>  }
>
> +static ssize_t fuse_conn_resend_write(struct file *file, const char __user *buf,
> +                                     size_t count, loff_t *ppos)
> +{
> +       struct fuse_conn *fc = fuse_ctl_file_conn_get(file);
> +
> +       if (fc) {
> +               fuse_resend_pqueue(fc);
> +               fuse_conn_put(fc);
> +       }
> +       return count;
> +}
> +

How about triggering this with a notification (FUSE_NOTIFY_RESEND)?

Thanks,
Miklos




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux