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]
Message-ID: <20140107113357.3bd67ad0@notabene.brown>
Date:	Tue, 7 Jan 2014 11:33:57 +1100
From:	NeilBrown <neilb@...e.de>
To:	Andrea Mazzoleni <amadvance@...il.com>
Cc:	linux-kernel@...r.kernel.org, linux-raid@...r.kernel.org,
	linux-btrfs@...r.kernel.org, clm@...com, jbacik@...com
Subject: Re: [RFC] lib: raid: New RAID library supporting up to six parities

On Mon, 6 Jan 2014 10:45:23 +0100 Andrea Mazzoleni <amadvance@...il.com>
wrote:

> Hi Neil,
> 
> Thanks for your feedback. In the meantime I went further in developing and
> I've just sent version 2 of the patch, that contains a preliminary btrfs
> modification to use the new interface.
> 
> Please use this one for any kind of review because it contains a modification
> of the interface to match better the btrfs use.
> I'll now try to do something similar to the async_tx layer and to improve the
> code documentation as you recommended.

Thanks.

> 
> Anyway, a good entry point to understand the code is to start from the
> include/linux/raid/raid.h file. It contains the functions that external
> modules should call with a complete description of them.
> 
> There is raid_par() used to compute parity, and raid_rec() to recover damaged
> blocks. These two functions replace all the old xor_blocks and raid6 calls.
> 
> And there is the raid_sort() you mention. It's an helper function that can be
> used to ensure that the blocks indexes are passed at the raid interface in
> proper order. In existing code I saw that the indexes are often sorted before
> calling raid6, with something like:
> 
> 	if (faila > failb) {
> 		int tmp = failb;
> 		failb = faila;
> 		faila = tmp;
> 	}
> 
> To do the same with up to six failures, it's now required some kind of sort
> function.

I'm not totally convinced by this, but then I haven't played with the code
so maybe I'm wrong.
I don't see the above as "sorting" faila and failb, but rather determining
which one is first.  Once you know which one is first, the remainder follow
in order.
So I would probably just make sure we always process the block is the "right"
order.  Then sorting would be irrelevant.
But as I say, I haven't fiddled with the code, so maybe that would end up
being more complex.

Thanks,
NeilBrown


Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ