OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>
Cc: devel@openvz.org, Den Lunev <den@virtuozzo.com>
Subject: Re: [Devel] [PATCH hci-8.2] dm/push_backup: stop the backup when the process that started it exits
Date: Wed, 18 Nov 2026 13:47:27 +0100	[thread overview]
Message-ID: <179500604764.197283.8507554022395271348.b4-review@b4> (raw)
In-Reply-To: <20261118-vstor-153891-v1-1-f31daea66355@virtuozzo.com>

I won't apply this version, please send v2 with the changes below.

1. Return -EINVAL for a fourth argument other than
   fail_on_process_exit: now ret is still 0 from
   down_write_killable(), nothing starts and the caller sees success.
   VSTOR-155761 covers the same for the rest of push_backup_start; fix
   it there first or set ret = -EINVAL before the argument checks
   here.
2. push_backup_statistics: report expires_in as 0 for every expired
   session. After the process exits with writes postponed,
   cleanup_backup() leaves deadline_jiffies in the future, so the
   statistics show a positive expires_in next to "expired".
3. Message: say that the message has to come from the backup process
   itself; sent through "dmsetup message" the session expires as soon
   as dmsetup exits.
4. Message: the reason for watching the process, see below; and the 60
   seconds are ploop-backup's default, the kernel has none, the timeout
   is a required argument. Split the "With this argument" paragraph,
   it has seven sentences: the mechanism, then what the user sees.

A question, no change needed if it is intended: a session whose backup
has finished (nr_remaining_clus=0) also expires when the process exits
before push_backup_stop, and the fd then returns ESTALE instead of 0.

On Wed, 18 Nov 2026 12:21:11 +0000, Vasileios Almpanis wrote:
> We watch the process and not the event fd, because the fd can end up
> in another process, for example in a child of ploop-backup. That
> process would then keep the session alive after ploop-backup dies.

4. The fd is O_CLOEXEC, so it reaches a child only through a fork
without exec. The stronger reasons: the fd is bound to the target,
not to a backup session (d723a1617e619), and a session driven by
push_backup_read/push_backup_write has no fd at all.

Thanks.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

      parent reply	other threads:[~2026-11-18 12:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 12:21 Vasileios Almpanis
2026-11-18 12:27 ` no-reply
2026-11-18 12:30 ` Denis V. Lunev
2026-11-18 12:47 ` Konstantin Khorenko [this message]

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=179500604764.197283.8507554022395271348.b4-review@b4 \
    --to=khorenko@virtuozzo.com \
    --cc=den@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=vasileios.almpanis@virtuozzo.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