Make-initrd development discussion
 help / color / mirror / Atom feed
From: Leonid Krivoshein <klark.devel@gmail.com>
To: make-initrd@lists.altlinux.org
Subject: Re: [make-initrd] [PATCH v2 00/11] Improve support for atomic actions
Date: Wed, 21 Oct 2026 11:50:15 +0300
Message-ID: <603c67ce-5fc5-434b-9f6f-83afb99fcc83@gmail.com> (raw)
In-Reply-To: <athnNty0vK2odX1R@example.org>


On 10/21/26 10:18 AM, Alexey Gladkov wrote:
> On Tue, Oct 20, 2026 at 10:04:56PM +0300, Leonid Krivoshein wrote:
>> Было бы здорово иметь одно место в документации, где будут перечислены все
>> файлы, доступ к которым требует блокировок. Например, из этих коммитов я
>> узнал, что следует блокировать доступ на запись в /.initrd/initenv.
>> Инклюдить его можно по-прежнему без блокировки благодаря атомарному
>> обновлению, если я правильно понял.
> 
> Сейчас с твоей подачи такой список стал организовываться в
> features/runtime/data/bin/initrd-sh-functions вместе с API для блокировок.
> 

Отлично, спасибо!


> Документация у нас в Documentation/ или ты про какую-то другую ?
> 

Про неё, да. Про список вида ресурс (тип блокировки) и файл блокировки.


И раз уж заглянул... по-моему, проще так:

get_majmin()
{
     mountpoint -x -- "$1" 2>/dev/null
}

результат будет аналогичным.


>> Другой момент с этими коммитами не связан, но давно напрашивался. В v2.36.0
>> была добавлена rootdelay_reset_timer(), здесь проскочило её
>> усовершенствование. На время диалогов ввода и на время заведомо длительных
>> или непредсказуемых по времени выполнения операций хотелось бы не просто
>> приостанавливать отчёт таймера rootdelay, но и возобновлять его отсчёт, а не
>> просто сбрасывать. Сейчас я его просто сбрасываю, так тоже работает, но это
>> конечно увеличивает суммарный (фактический) rootdelay.
> 
> Почему на время диалогов ты не хочешь сделать rootdelay_pause ?
> 

Как раз делаю.


> Поставить rootdelay на паузу для диалогов мне кажется правильной идеей. Я
> паузу как раз для этого использую в fsck и kickstart. Для последнего
> rootdelay отключается по сути вообще.
> 

Раньше тоже так делал. Если что-то пошло не так, мы не увидим ни stage2, 
ни отладочного rdshell. Поэтому сейчас сделаны две вещи: 1) таймаут 
отключается только на время длительных операций, диалогов, а после 
rootdelay перезапускается, 2) при фатальном выходе chaind устанавливает 
дедлайн на now+2 секунды, чтобы поскорее попасть в rdshell.

Cпич о том, что текущая реализация отталкивается от сохранённого 
дедлайна, а не учёта времени, потраченного на загрузку. В моём 
понимании, rootdelay_pause() -- перестать расходовать rootdelay на 
неопределённое время. Сейчас же получается, что после вызова 
rootdelay_unpause() можно сразу схлопотать таймаут. Обойти можно сбросом 
счётчика, но чтобы считалось правильно, необходимо добавлять арифметику 
для расчёта нового дедлайна, чего бы не хотелось делать на стороне клиента.


>>
>>>>
>>>>>
>>>>> Alexey Gladkov (10):
>>>>>      runtime: Fix console lock shadowing by /dev mount
>>>>>      runtime: Avoid leaking lock descriptor 90 to child processes
>>>>>      runtime: Replace /.initrd/initenv locking with atomic file update
>>>>>      runtime: Centralize file and console locking helpers
>>>>>      create-rootfs: Require bash 4.1 or newer for initramfs
>>>>>      network: Share DHCP hook lock between IPv4 and IPv6 on the same
>>>>>        interface
>>>>>      luks: Serialize /etc/luks.keys updates and avoid duplicate entries
>>>>>      runtime: Synchronize concurrent /etc/fstab access with shared and
>>>>>        exclusive locks
>>>>>      runtime: Update rootdelay deadline and failure message atomically
>>>>>      runtime: Centralize atomic file replacement in write_atomic helper
>>>>>
>>>>> Egor Shestakov (1):
>>>>>      runtime: Fix a lock leak in rootdelayd
>>>>>
>>>>>     .../uevent/handlers/btrfs-member/100-timeout  |   4 +-
>>>>>     .../data/lib/uevent/handlers/040-mountdev     |  19 +--
>>>>>     .../luks/data/lib/uevent/filters/lukskeys     |  49 +++---
>>>>>     .../luks/data/lib/uevent/handlers/085-luks    |  33 ++--
>>>>>     .../network/data/bin/network-sh-functions     |   1 +
>>>>>     .../network/data/etc/rc.d/init.d/network-up   |   3 -
>>>>>     features/network/data/lib/network/hostname    |  18 ++-
>>>>>     features/network/data/lib/network/resolvconf  |  84 +++++-----
>>>>>     .../network/data/lib/network/udhcpc4.script   |  90 +++++------
>>>>>     features/runtime/data/bin/initrd-sh-functions | 123 ++++++++++++++-
>>>>>     features/runtime/data/etc/rc.d/init.d/cmdline |   6 +-
>>>>>     features/runtime/data/etc/rc.d/init.d/fstab   |   4 +-
>>>>>     features/runtime/data/etc/rc.d/rc             | 148 +++++++++---------
>>>>>     features/runtime/data/init                    |   2 +
>>>>>     .../data/lib/initrd/post/fstab/mountsrc       |  61 ++++----
>>>>>     .../runtime/data/lib/uevent/filters/mountdev  |  71 +++++----
>>>>>     .../lib/uevent/handlers/mount/900-localdev    |  39 +++--
>>>>>     features/runtime/data/sbin/rootdelayd         |  74 ++++-----
>>>>>     .../data/lib/uevent/handlers/040-sshfsroot    |  26 ++-
>>>>>     features/zfs/data/lib/initrd/post/fstab/zfs   | 105 +++++++------
>>>>>     features/zfs/data/sbin/ueventd-zfs            |  21 ++-
>>>>>     .../tests/ts0044-member-timeout-queue-api/run |   2 +
>>>>>     tools/create-rootfs                           |   2 +
>>>>>     23 files changed, 566 insertions(+), 419 deletions(-)
>>>>>
>>>>
>>>> -- 
>>>> WBR, Leonid Krivoshein.
>>>>
>>>> _______________________________________________
>>>> Make-initrd mailing list
>>>> Make-initrd@lists.altlinux.org
>>>> https://lists.altlinux.org/mailman/listinfo/make-initrd
>>>
>>
>> -- 
>> WBR, Leonid Krivoshein.
>>
>> _______________________________________________
>> Make-initrd mailing list
>> Make-initrd@lists.altlinux.org
>> https://lists.altlinux.org/mailman/listinfo/make-initrd
> 

-- 
WBR, Leonid Krivoshein.



  reply	other threads:[~2026-10-21  8:50 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-12 22:42 [make-initrd] Параметр rdshell Leonid Krivoshein
2026-10-14 10:04 ` Egor Shestakov
2026-10-14 16:01   ` Leonid Krivoshein
2026-10-15 14:48     ` [make-initrd] [RFC PATCH] runtime: fix a suspended boot after rdshell Egor Shestakov
2026-10-16 10:20       ` Alexey Gladkov
2026-10-16 13:39         ` Egor Shestakov
2026-10-16 14:09           ` Alexey Gladkov
2026-10-16 14:13             ` Egor Shestakov
2026-10-16 14:11           ` Egor Shestakov
2026-10-19 10:22   ` [make-initrd] Параметр rdshell Alexey Gladkov
2026-10-19 12:51     ` [make-initrd] kmscon (was: Параметр rdshell) Egor Shestakov
2026-10-19 13:38       ` Alexey Gladkov
2026-10-19 15:09         ` Egor Shestakov
2026-10-19 16:14           ` Alexey Gladkov
2026-10-16 12:06 ` [make-initrd] [PATCH 0/2] runtime: Fix console locking Alexey Gladkov
2026-10-16 12:06   ` [make-initrd] [PATCH 1/2] runtime: Fix a lock leak in rootdelayd Alexey Gladkov
2026-10-16 12:06   ` [make-initrd] [PATCH 2/2] runtime: Fix console lock shadowing by /dev mount Alexey Gladkov
2026-10-16 20:02     ` Leonid Krivoshein
2026-10-17  9:45       ` Alexey Gladkov
2026-10-17 16:19         ` Leonid Krivoshein
2026-10-17 16:41           ` Alexey Gladkov
2026-10-19  9:57 ` [make-initrd] [PATCH v2 00/11] Improve support for atomic actions Alexey Gladkov
2026-10-19  9:57   ` [make-initrd] [PATCH v2 01/11] runtime: Fix a lock leak in rootdelayd Alexey Gladkov
2026-10-19  9:57   ` [make-initrd] [PATCH v2 02/11] runtime: Fix console lock shadowing by /dev mount Alexey Gladkov
2026-10-19  9:57   ` [make-initrd] [PATCH v2 03/11] runtime: Avoid leaking lock descriptor 90 to child processes Alexey Gladkov
2026-10-19  9:57   ` [make-initrd] [PATCH v2 04/11] runtime: Replace /.initrd/initenv locking with atomic file update Alexey Gladkov
2026-10-19  9:57   ` [make-initrd] [PATCH v2 05/11] runtime: Centralize file and console locking helpers Alexey Gladkov
2026-10-19  9:57   ` [make-initrd] [PATCH v2 06/11] create-rootfs: Require bash 4.1 or newer for initramfs Alexey Gladkov
2026-10-19  9:57   ` [make-initrd] [PATCH v2 07/11] network: Share DHCP hook lock between IPv4 and IPv6 on the same interface Alexey Gladkov
2026-10-19  9:57   ` [make-initrd] [PATCH v2 08/11] luks: Serialize /etc/luks.keys updates and avoid duplicate entries Alexey Gladkov
2026-10-19  9:57   ` [make-initrd] [PATCH v2 09/11] runtime: Synchronize concurrent /etc/fstab access with shared and exclusive locks Alexey Gladkov
2026-10-19  9:57   ` [make-initrd] [PATCH v2 10/11] runtime: Update rootdelay deadline and failure message atomically Alexey Gladkov
2026-10-19  9:57   ` [make-initrd] [PATCH v2 11/11] runtime: Centralize atomic file replacement in write_atomic helper Alexey Gladkov
2026-10-19 19:30   ` [make-initrd] [PATCH v2 00/11] Improve support for atomic actions Leonid Krivoshein
2026-10-20 14:59     ` Alexey Gladkov
2026-10-20 19:04       ` Leonid Krivoshein
2026-10-20 19:23         ` [make-initrd] Уточнение по rootdelay_unpause() Leonid Krivoshein
2026-10-21 10:10           ` [make-initrd] [PATCH] runtime: Freeze rootdelay countdown while paused Alexey Gladkov
2026-10-21  7:18         ` [make-initrd] [PATCH v2 00/11] Improve support for atomic actions Alexey Gladkov
2026-10-21  8:50           ` Leonid Krivoshein [this message]
2026-10-21 10:18             ` Alexey Gladkov

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=603c67ce-5fc5-434b-9f6f-83afb99fcc83@gmail.com \
    --to=klark.devel@gmail.com \
    --cc=make-initrd@lists.altlinux.org \
    /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

Make-initrd development discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/make-initrd/0 make-initrd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 make-initrd make-initrd/ http://lore.altlinux.org/make-initrd \
		make-initrd@lists.altlinux.org make-initrd@lists.altlinux.ru make-initrd@lists.altlinux.com
	public-inbox-index make-initrd

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.make-initrd


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git