From: Tobias Waldekranz <tobias@waldekranz.com>
To: barebox@lists.infradead.org
Subject: [PATCH v2 next 0/5] dm: lvm: Initial Logical Volume Management support
Date: Fri, 25 Sep 2026 10:54:22 +0000 [thread overview]
Message-ID: <20260925105510.1431927-1-tobias@waldekranz.com> (raw)
This series adds basic support for accessing LVM logical volumes.
Example session:
wkz@spa:~/src/github.com/barebox/barebox$ ./barebox -i disk0=infix-x86_64.disk,blkdev
[...]
barebox@Sandbox:/ lvm info
VG "internal":
UUID: sN8htx-oD18-wHWH-SuCU-1EWy-th1l-5WPU6j
SeqNum: 1
Size: 132 MiB (1 MiB extents)
#PV: 1
#LV: 1
PV disk0.2:
UUID: 6VHjVF-WVt7-Gk4Y-oTrK-lsgY-ve7N-GJ0CUn
Size: 134 MiB
LV "infix-x86_64.raw":
UUID: Xp76Ig-9XXj-aBfK-Xv2U-rbsY-nEWX-omt4Bo
Type: linear
Size: 132 MiB
barebox@Sandbox:/ lvm activate internal infix-x86_64.raw
[GPT warnings...]
Created internal-infix-x86_64.raw
barebox@Sandbox:/ ls /mnt/internal-infix-x86_64.raw.0/
mounted /dev/internal-infix-x86_64.raw.0 on /mnt/internal-infix-x86_64.raw.0
bin boot cfg config dev etc home
lib lib64 loader log media mnt opt
proc root run sbin srv sys tmp
usr var
barebox@Sandbox:/
A while back, I sent an RFC of this series [1]. Based on the lack of
critique of the overall structure, I went ahead and added the missing
tests and fixed up the issues it uncovered.
[1]: https://lore.kernel.org/barebox/20260824183203.3759144-1-tobias@waldekranz.com/
v1 -> v2:
- Labgrid test fixups requested by Sascha
Tobias Waldekranz (5):
dm: lvm: Initial Logical Volume Management support
dm: lvm: Add fuzz testers for metadata parser and binary headers
test: self: lvm: Add tests for metadata parser and binary headers
commands: lvm: inspect VGs, activate LVs
test: py: lvm: Add basic LV activation test
commands/Kconfig | 11 +
commands/Makefile | 1 +
commands/lvm.c | 264 ++++++
.../boards/configs/enable_dm_testing.config | 2 +
drivers/block/dm/Kconfig | 10 +
drivers/block/dm/Makefile | 1 +
drivers/block/dm/lvm/Makefile | 3 +
drivers/block/dm/lvm/lvm-core.c | 714 +++++++++++++++
drivers/block/dm/lvm/lvm-fuzz.c | 182 ++++
drivers/block/dm/lvm/lvm-md.c | 423 +++++++++
drivers/block/dm/lvm/lvm-md.h | 109 +++
drivers/block/dm/lvm/lvm2.h | 79 ++
images/Makefile.sandbox | 2 +
include/lvm.h | 100 +++
scripts/lvm-pvs.guestfish | 55 ++
test/py/test_lvm.py | 75 ++
test/self/Kconfig | 14 +
test/self/Makefile | 2 +
test/self/lvm.c | 818 ++++++++++++++++++
test/testdata/fuzz/lvm-md.dict | 29 +
test/testdata/fuzz/lvm.dict | 30 +
test/testdata/lvm-pvs.disk.xz | Bin 0 -> 2968 bytes
22 files changed, 2924 insertions(+)
create mode 100644 commands/lvm.c
create mode 100644 drivers/block/dm/lvm/Makefile
create mode 100644 drivers/block/dm/lvm/lvm-core.c
create mode 100644 drivers/block/dm/lvm/lvm-fuzz.c
create mode 100644 drivers/block/dm/lvm/lvm-md.c
create mode 100644 drivers/block/dm/lvm/lvm-md.h
create mode 100644 drivers/block/dm/lvm/lvm2.h
create mode 100644 include/lvm.h
create mode 100755 scripts/lvm-pvs.guestfish
create mode 100644 test/py/test_lvm.py
create mode 100644 test/self/lvm.c
create mode 100644 test/testdata/fuzz/lvm-md.dict
create mode 100644 test/testdata/fuzz/lvm.dict
create mode 100644 test/testdata/lvm-pvs.disk.xz
--
2.43.0
next reply other threads:[~2026-09-25 10:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 10:54 Tobias Waldekranz [this message]
2026-09-25 10:54 ` [PATCH v2 next 1/5] " Tobias Waldekranz
2026-09-25 10:54 ` [PATCH v2 next 2/5] dm: lvm: Add fuzz testers for metadata parser and binary headers Tobias Waldekranz
2026-09-25 10:54 ` [PATCH v2 next 3/5] test: self: lvm: Add tests " Tobias Waldekranz
2026-09-25 10:54 ` [PATCH v2 next 4/5] commands: lvm: inspect VGs, activate LVs Tobias Waldekranz
2026-09-25 10:54 ` [PATCH v2 next 5/5] test: py: lvm: Add basic LV activation test Tobias Waldekranz
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=20260925105510.1431927-1-tobias@waldekranz.com \
--to=tobias@waldekranz.com \
--cc=barebox@lists.infradead.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
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