From: Alexey Gladkov <gladkov.alexey@gmail.com> To: make-initrd@lists.altlinux.org Subject: [make-initrd] [PATCH 0/3] New locking functions based on flock utility Date: Wed, 17 May 2023 18:04:39 +0200 Message-ID: <cover.1684332365.git.gladkov.alexey@gmail.com> (raw) Привет! Чтобы избавиться от лишнего поллинга в реализации блокировок я сделал другой 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
next reply other threads:[~2023-05-17 16:04 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-05-17 16:04 Alexey Gladkov [this message] 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
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=cover.1684332365.git.gladkov.alexey@gmail.com \ --to=gladkov.alexey@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