Make-initrd development discussion
 help / color / mirror / Atom feed
* [make-initrd] [PATCH 0/3] New locking functions based on flock utility
@ 2023-05-17 16:04 Alexey Gladkov
  2023-05-17 16:04 ` [make-initrd] [PATCH 1/3] runtime: Add " Alexey Gladkov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alexey Gladkov @ 2023-05-17 16:04 UTC (permalink / raw)
  To: make-initrd

Привет!

Чтобы избавиться от лишнего поллинга в реализации блокировок я сделал другой
API основанный на flock из busybox. Добавилась возможность делать shared locks.

Я не стал использовать bash-builtin-lockf, который использует hasher, потому что
не хочу завязываться на версию bash и тянуть зависимость на bash-devel.

Как следствие блокировка может утечь в запускаемый под блокировкой код и теперь
за этим нужно следить.

Далее нужно будет провести рефакторинг и посмотреть нельзя ли сократить код под
блокировкой.

Alexey Gladkov (3):
  runtime: Add locking functions based on flock utility
  Rewrite console locking
  feature/network: Use flock-based locking

 data/bin/rdshell                              | 12 ----
 data/bin/rdshell-locked                       |  1 -
 data/bin/rdshell-sh-functions                 | 29 ---------
 data/bin/shell-locks                          | 40 ++++++++++++
 data/etc/rc.d/init.d/cmdline                  |  2 -
 data/etc/rc.d/rc                              | 15 +++--
 data/lib/initrd/boot/scripts/console-inactive |  7 +--
 data/lib/initrd/spawn-shell                   |  7 ++-
 data/lib/uevent/each/pre/.gitignore           |  0
 data/lib/uevent/each/pre/console              | 25 --------
 data/lib/uevent/handlers/poll/400-rootdelay   | 21 ++++---
 .../lib/initrd/boot/method/bootloader/action  | 18 +++---
 .../data/lib/uevent/handlers/040-mountdev     | 13 ++--
 .../luks/data/lib/uevent/handlers/085-luks    | 11 ++--
 .../network/data/etc/rc.d/init.d/network-up   | 10 +++
 features/network/data/lib/network/config      |  8 ---
 features/network/data/lib/network/hostname    | 10 +--
 features/network/data/lib/network/resolvconf  | 10 +--
 .../network/data/lib/network/udhcpc4.script   | 12 ++--
 .../data/lib/uevent/handlers/040-sshfsroot    | 13 ++--
 .../zfs/data/lib/uevent/extenders/200-zfs     | 12 ++--
 testing/sh-functions                          |  4 +-
 testing/units/runtime-locks/ts0001/expect     | 24 ++++++++
 testing/units/runtime-locks/ts0001/lock-1     |  0
 testing/units/runtime-locks/ts0001/lock-2     |  0
 testing/units/runtime-locks/ts0001/lock-3     |  0
 testing/units/runtime-locks/ts0001/run        | 61 +++++++++++++++++++
 testing/units/runtime-locks/ts0002/expect     |  5 ++
 testing/units/runtime-locks/ts0002/lock-1     |  0
 testing/units/runtime-locks/ts0002/lock-2     |  0
 testing/units/runtime-locks/ts0002/lock-3     |  0
 testing/units/runtime-locks/ts0002/run        | 25 ++++++++
 testing/units/runtime-locks/ts0003/expect     |  9 +++
 testing/units/runtime-locks/ts0003/lock-1     |  0
 testing/units/runtime-locks/ts0003/lock-2     |  0
 testing/units/runtime-locks/ts0003/lock-3     |  0
 testing/units/runtime-locks/ts0003/run        | 38 ++++++++++++
 .../units/sort-services/ts0007/data00-cmdline |  2 -
 .../units/sort-services/ts0008/data00-cmdline |  2 -
 39 files changed, 283 insertions(+), 163 deletions(-)
 delete mode 120000 data/bin/rdshell-locked
 delete mode 100644 data/bin/rdshell-sh-functions
 create mode 100644 data/bin/shell-locks
 create mode 100644 data/lib/uevent/each/pre/.gitignore
 delete mode 100755 data/lib/uevent/each/pre/console
 create mode 100644 testing/units/runtime-locks/ts0001/expect
 create mode 100644 testing/units/runtime-locks/ts0001/lock-1
 create mode 100644 testing/units/runtime-locks/ts0001/lock-2
 create mode 100644 testing/units/runtime-locks/ts0001/lock-3
 create mode 100755 testing/units/runtime-locks/ts0001/run
 create mode 100644 testing/units/runtime-locks/ts0002/expect
 create mode 100644 testing/units/runtime-locks/ts0002/lock-1
 create mode 100644 testing/units/runtime-locks/ts0002/lock-2
 create mode 100644 testing/units/runtime-locks/ts0002/lock-3
 create mode 100755 testing/units/runtime-locks/ts0002/run
 create mode 100644 testing/units/runtime-locks/ts0003/expect
 create mode 100644 testing/units/runtime-locks/ts0003/lock-1
 create mode 100644 testing/units/runtime-locks/ts0003/lock-2
 create mode 100644 testing/units/runtime-locks/ts0003/lock-3
 create mode 100755 testing/units/runtime-locks/ts0003/run

-- 
2.33.8



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-17 16:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-17 16:04 [make-initrd] [PATCH 0/3] New locking functions based on flock utility Alexey Gladkov
2023-05-17 16:04 ` [make-initrd] [PATCH 1/3] runtime: Add " Alexey Gladkov
2023-05-17 16:04 ` [make-initrd] [PATCH 2/3] Rewrite console locking Alexey Gladkov
2023-05-17 16:04 ` [make-initrd] [PATCH 3/3] feature/network: Use flock-based locking Alexey Gladkov

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