lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 13 Sep 2023 05:34:17 +0000
From:   Johannes Thumshirn <Johannes.Thumshirn@....com>
To:     "dsterba@...e.cz" <dsterba@...e.cz>
CC:     Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
        David Sterba <dsterba@...e.com>,
        Christoph Hellwig <hch@....de>,
        Naohiro Aota <Naohiro.Aota@....com>, Qu Wenruo <wqu@...e.com>,
        Damien Le Moal <dlemoal@...nel.org>,
        "linux-btrfs@...r.kernel.org" <linux-btrfs@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v8 08/11] btrfs: add raid stripe tree pretty printer

On 12.09.23 22:42, David Sterba wrote:
>> +struct raid_encoding_map {
>> +	u8 encoding;
>> +	char name[16];
>> +};
>> +
>> +static const struct raid_encoding_map raid_map[] = {
>> +	{ BTRFS_STRIPE_DUP,	"DUP" },
>> +	{ BTRFS_STRIPE_RAID0,	"RAID0" },
>> +	{ BTRFS_STRIPE_RAID1,	"RAID1" },
>> +	{ BTRFS_STRIPE_RAID1C3,	"RAID1C3" },
>> +	{ BTRFS_STRIPE_RAID1C4, "RAID1C4" },
>> +	{ BTRFS_STRIPE_RAID5,	"RAID5" },
>> +	{ BTRFS_STRIPE_RAID6,	"RAID6" },
>> +	{ BTRFS_STRIPE_RAID10,	"RAID10" }
>> +};
> 
> Instead of another table tranlating constants to raid names, can you
> somehow utilize the btrfs_raid_array table? If the STRIPE values match
> the RAID (the indexes to the table) you could add a simple wrapper.

Sure.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ