public inbox for linux-erofs@ozlabs.org
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Yifan Zhao <zhaoyifan28@huawei.com>, linux-erofs@lists.ozlabs.org
Cc: jingrui@huawei.com, zhukeqian1@huawei.com
Subject: Re: [PATCH 2/2] erofs-utils: mount: add --worker-log for detached workers
Date: Thu, 9 Apr 2026 12:21:24 +0800	[thread overview]
Message-ID: <4e08f088-9020-43da-b62a-89981a4b7238@linux.alibaba.com> (raw)
In-Reply-To: <20260403064230.914563-2-zhaoyifan28@huawei.com>



On 2026/4/3 14:42, Yifan Zhao wrote:
> Detached NBD and fanotify workers currently redirect stdout and stderr
> to /dev/null after fork(), which makes their runtime logs invisible once
> mount.erofs returns.
> 
> Add a `--worker-log=PATH` option so detached workers can append logs to
> a caller-provided file for better observability.
> 
> Assisted-by: Codex:GPT-5.4
> Signed-off-by: Yifan Zhao <zhaoyifan28@huawei.com>
> ---
>   mount/main.c | 58 ++++++++++++++++++++++++++++++++++++++--------------
>   1 file changed, 43 insertions(+), 15 deletions(-)
> 
> diff --git a/mount/main.c b/mount/main.c
> index 45ac32e..40175e3 100644
> --- a/mount/main.c
> +++ b/mount/main.c
> @@ -75,6 +75,7 @@ static struct erofsmount_cfg {
>   	char *options;
>   	char *full_options;		/* used for erofsfuse */
>   	char *fstype;
> +	char *worker_log_path;
>   	long flags;
>   	enum erofs_backend_drv backend;
>   	enum erofsmount_mode mountmode;
> @@ -119,10 +120,10 @@ static int erofsmount_worker_set_signal(int signum, sighandler_t handler)
>   	return 0;
>   }
>   
> -static int erofsmount_worker_detach(void)
> +static int erofsmount_worker_detach(const char *log_path)

how qemu-nbd works? Does it use the same option `--worker-log`?

Thanks,
Gao Xiang


  reply	other threads:[~2026-04-09  4:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-03  6:42 [PATCH 1/2] erofs-utils: mount: gracefully handle long-lived backend workers Yifan Zhao
2026-04-03  6:42 ` [PATCH 2/2] erofs-utils: mount: add --worker-log for detached workers Yifan Zhao
2026-04-09  4:21   ` Gao Xiang [this message]
2026-04-09  4:19 ` [PATCH 1/2] erofs-utils: mount: gracefully handle long-lived backend workers Gao Xiang

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=4e08f088-9020-43da-b62a-89981a4b7238@linux.alibaba.com \
    --to=hsiangkao@linux.alibaba.com \
    --cc=jingrui@huawei.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=zhaoyifan28@huawei.com \
    --cc=zhukeqian1@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox