From: Tomas Mudrunka <tomas.mudrunka@gmail.com>
To: mtkaczyk@kernel.org
Cc: linux-raid@vger.kernel.org, song@kernel.org,
tomas.mudrunka@gmail.com, yukuai1@huaweicloud.com,
yukuai3@huawei.com, yukuai@kernel.org
Subject: Re: [PATCH] Export MDRAID bitmap on disk structure in UAPI header file
Date: Fri, 3 Jan 2025 12:54:22 +0100 [thread overview]
Message-ID: <20250103115422.20508-1-tomas.mudrunka@gmail.com> (raw)
In-Reply-To: <20250103103801.1420d5d5@mtkaczyk-private-dev>
> The problem is that system service will recognize raid disks and
> assemble the array automatically, you might what to disable them.
Actualy user is forced to work with MD device from the get go.
This is how you would typicaly use mdadm to write metadata to disk:
$ truncate -s 1G test.img
$ mdadm --create /dev/md0 --level=1 --bitmap=internal --raid-devices=2 test.img missing
mdadm: must be super-user to perform this action
mdadm: test.img is not a block device.
Following is unfit for my usecase:
* It requires me to reference /dev/md0 (i don't want to involve kernel at all)
* It requires super-user (no need, i just want to write bytes to my own file)
* Refuses to work on regular file (once i run it as super-user)
> I don't think we need to care. They goal is to not have and use MD
> module so mdadm will fail to load personalities.
No it is not the goal. Goal is not to rely on kernel. It has to work on any kernel
including the ones that have MD module loaded. Possibly even on non-Linux OS.
> I agree. The right way is to incorporate it with mdadm.
> We should create a volume image (data) without MD internals.
In that case i would still need headers with structs to parse the metadata
and get offsets where to load actual data (filesystem) into the array images.
But to be honest, i am pretty happy with how the genimage code works now,
i don't need any help with its functionality. I don't even need those headers
to be fixed. I can leave them copypasted. But i think it would be right thing
to consolidate them, therefore i've proposed the patch.
I just didn't wanted to hardcode definitions that are already in kernel,
because i don't like duplicit code that can be included from somewhere else.
> If you are looking for challenges this software is full of them!
Haha. I feel you. Maybe lets tackle them step by step.
Consolidating headers to provide complete ondisk format seems
as a good start to me. Especialy if the mdadm could benefit from that as well.
Tom
next prev parent reply other threads:[~2025-01-03 11:54 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-31 3:09 [PATCH] Export MDRAID bitmap on disk structure in UAPI header file Tomas Mudrunka
2024-12-31 3:47 ` Yu Kuai
2024-12-31 8:59 ` Mariusz Tkaczyk
2024-12-31 11:02 ` Tomáš Mudruňka
[not found] ` <CAH2-hc+QK0SZgDjOScegsDk8R8gQEZgJ5Vg1M1J_v-yDEym=Dw@mail.gmail.com>
[not found] ` <20241231123108.215cc05e@mtkaczyk-private-dev>
2024-12-31 14:23 ` Mariusz Tkaczyk
2025-01-02 1:43 ` Yu Kuai
2025-01-02 11:48 ` Tomas Mudrunka
2025-01-03 1:14 ` Yu Kuai
2025-01-03 9:38 ` Mariusz Tkaczyk
2025-01-03 11:54 ` Tomas Mudrunka [this message]
2025-01-07 8:36 ` Mariusz Tkaczyk
2025-01-07 22:58 ` Song Liu
2025-01-15 15:23 ` Tomáš Mudruňka
2025-01-06 15:25 ` Christoph Hellwig
2025-01-06 15:40 ` Tomáš Mudruňka
2025-01-06 15:45 ` Christoph Hellwig
2025-02-03 11:43 ` Mariusz Tkaczyk
2025-02-03 17:18 ` [PATCH v2] " Tomas Mudrunka
2025-02-06 22:30 ` [PATCH v3] " Tomas Mudrunka
2025-02-18 2:32 ` Yu Kuai
2025-02-18 11:38 ` [PATCH v4] " Tomas Mudrunka
2025-02-19 6:11 ` Christoph Hellwig
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=20250103115422.20508-1-tomas.mudrunka@gmail.com \
--to=tomas.mudrunka@gmail.com \
--cc=linux-raid@vger.kernel.org \
--cc=mtkaczyk@kernel.org \
--cc=song@kernel.org \
--cc=yukuai1@huaweicloud.com \
--cc=yukuai3@huawei.com \
--cc=yukuai@kernel.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;
as well as URLs for NNTP newsgroup(s).