<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/exofs/ore_raid.c, branch linux-4.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-06-14T22:55:24Z</updated>
<entry>
<title>exofs: avoid VLA in structures</title>
<updated>2018-06-14T22:55:24Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2018-06-14T22:27:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=20fe935358de5f3481790f3e3d399cf97801f830'/>
<id>urn:sha1:20fe935358de5f3481790f3e3d399cf97801f830</id>
<content type='text'>
On the quest to remove all VLAs from the kernel[1] this adjusts several
cases where allocation is made after an array of structures that points
back into the allocation.  The allocations are changed to perform
explicit calculations instead of using a Variable Length Array in a
structure.

Additionally, this lets Clang compile this code now, since Clang does
not support VLAIS[2].

[1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com
[2] https://lkml.kernel.org/r/CA+55aFy6h1c3_rP_bXFedsTXzwW+9Q9MfJaW7GUmMBrAp-fJ9A@mail.gmail.com

[keescook@chromium.org: v2]
  Link: http://lkml.kernel.org/r/20180418163546.GA45794@beast
Link: http://lkml.kernel.org/r/20180327203904.GA1151@beast
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Cc: Boaz Harrosh &lt;ooo@electrozaur.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Boaz Harrosh - Fix broken email address</title>
<updated>2014-10-19T17:22:32Z</updated>
<author>
<name>Boaz Harrosh</name>
</author>
<published>2014-10-19T16:38:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aa281ac631008b9c18c405c8880007789f659c7d'/>
<id>urn:sha1:aa281ac631008b9c18c405c8880007789f659c7d</id>
<content type='text'>
I no longer have access to the Panasas email.
So change to an email that can always reach me.

Signed-off-by: Boaz Harrosh &lt;ooo@electrozaur.com&gt;
</content>
</entry>
<entry>
<title>fs/exofs/ore_raid.c: replace count*size kzalloc by kcalloc</title>
<updated>2014-08-08T22:57:24Z</updated>
<author>
<name>Fabian Frederick</name>
</author>
<published>2014-08-08T21:22:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b134079f1f4691a0e271211aefad757c5380cec7'/>
<id>urn:sha1:b134079f1f4691a0e271211aefad757c5380cec7</id>
<content type='text'>
kcalloc manages count*sizeof overflow.

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Acked-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ore: Support for raid 6</title>
<updated>2014-05-22T11:48:15Z</updated>
<author>
<name>Boaz Harrosh</name>
</author>
<published>2014-05-22T11:48:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ce5d36aac26cc395fe3bc45525cdbad3644f01e5'/>
<id>urn:sha1:ce5d36aac26cc395fe3bc45525cdbad3644f01e5</id>
<content type='text'>
This simple patch adds support for raid6 to the ORE.
Most operations and calculations where already for the general
case. Only things left:
* call async_gen_syndrome() in the case of raid6
  (NOTE that the raid6 math is the one supported by the Linux Kernel
   see: crypto/async_tx/async_pq.c)
* call _ore_add_parity_unit() twice with only last call generating
  the redundancy pages.

* Fix couple BUGS in old code
  a. In reads when parity==2 it can happen that per_dev-&gt;length=0
     but per_dev-&gt;offset was set and adjusted by _ore_add_sg_seg().
     Don't let it be overwritten.
  b. The all 'cur_comp &gt; starting_dev' thing to determine if:
       "per_dev-&gt;offset is in the current stripe number or the
       next one."
     Was a complete raid5/4 accident. When parity==2 this is not
     at all true usually. All we need to do is increment si-&gt;ob_offset
     once we pass by the first parity device.
     (This also greatly simplifies the code, amen)
  c. Calculation of si-&gt;dev rotation can overflow when parity==2.

* Then last enable raid6 in ore_verify_layout()

I want to deeply thank Daniel Gryniewicz who found first all the
bugs in the old raid code, and inspired these patches:
	Inspired-by Daniel Gryniewicz &lt;dang@linuxbox.com&gt;

Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
</content>
</entry>
<entry>
<title>ore: Remove redundant dev_order(), more cleanups</title>
<updated>2014-05-22T11:46:15Z</updated>
<author>
<name>Boaz Harrosh</name>
</author>
<published>2014-04-09T20:14:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=455682ce547817d75e38028283dc8db00754005d'/>
<id>urn:sha1:455682ce547817d75e38028283dc8db00754005d</id>
<content type='text'>
Two cleanups:
* si-&gt;cur_comp, si-&gt;cur_pg where always calculated after
  the call to ore_calc_stripe_info() with the help of
  _dev_order(...). But these are already calculated by
  ore_calc_stripe_info() and can be just set there.
  (This is left over from the time that si-&gt;cur_comp, si-&gt;cur_pg
   were only used by raid code, but now the main loop manages
   them anyway even though they are ultimately not used in
   none raid code)

* si-&gt;cur_comp - For the very last stripe case, was set inside
  _ore_add_parity_unit(). This is not clear and will be wrong
  for coming raid6 so move this to only caller. Now si-&gt;cur_comp
  is only manipulated within _prepare_for_striping(), always next
  to the manipulation of cur_dev.
  Which is much easier to understand and follow.

Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
</content>
</entry>
<entry>
<title>ore: (trivial) reformat some code</title>
<updated>2014-05-22T11:45:21Z</updated>
<author>
<name>Boaz Harrosh</name>
</author>
<published>2014-04-03T14:53:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=101a642781cf6b37848c5468d6c1a20a76c35ea9'/>
<id>urn:sha1:101a642781cf6b37848c5468d6c1a20a76c35ea9</id>
<content type='text'>
rearrange some source lines. Nothing changed.

Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
</content>
</entry>
<entry>
<title>fs: Mark functions as static in exofs/ore_raid.c</title>
<updated>2014-04-03T08:40:55Z</updated>
<author>
<name>Rashika Kheria</name>
</author>
<published>2014-02-09T13:03:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0961f02a3799e1f0aeb3185567185a80265ef36b'/>
<id>urn:sha1:0961f02a3799e1f0aeb3185567185a80265ef36b</id>
<content type='text'>
Mark functions as static in exofs/ore_raid.c because they are not used
outside this file.

This also eliminates the following warning in exofs/ore_raid.c:
fs/exofs/ore_raid.c:24:14: warning: no previous prototype for _raid_page_alloc [-Wmissing-prototypes]
fs/exofs/ore_raid.c:29:6: warning: no previous prototype for _raid_page_free [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria &lt;rashika.kheria@gmail.com&gt;
Reviewed-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
</content>
</entry>
<entry>
<title>block: Add bio_for_each_segment_all()</title>
<updated>2013-03-23T21:26:28Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2013-02-06T20:23:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d74c6d514fe314b8bdab58b487b25992291577ec'/>
<id>urn:sha1:d74c6d514fe314b8bdab58b487b25992291577ec</id>
<content type='text'>
__bio_for_each_segment() iterates bvecs from the specified index
instead of bio-&gt;bv_idx.  Currently, the only usage is to walk all the
bvecs after the bio has been advanced by specifying 0 index.

For immutable bvecs, we need to split these apart;
bio_for_each_segment() is going to have a different implementation.
This will also help document the intent of code that's using it -
bio_for_each_segment_all() is only legal to use for code that owns the
bio.

Signed-off-by: Kent Overstreet &lt;koverstreet@google.com&gt;
CC: Jens Axboe &lt;axboe@kernel.dk&gt;
CC: Neil Brown &lt;neilb@suse.de&gt;
CC: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
</content>
</entry>
<entry>
<title>ore: signedness bug in _sp2d_min_pg()</title>
<updated>2012-10-03T20:51:51Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2012-10-02T08:28:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=74b217d0d3a46132fb61adab91d53c57e0d8f68a'/>
<id>urn:sha1:74b217d0d3a46132fb61adab91d53c57e0d8f68a</id>
<content type='text'>
This for loop doesn't work correctly when "p" is unsigned.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
</content>
</entry>
<entry>
<title>ore: Unlock r4w pages in exact reverse order of locking</title>
<updated>2012-07-20T08:49:25Z</updated>
<author>
<name>Boaz Harrosh</name>
</author>
<published>2012-07-11T12:27:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=537632e0a54a5355cdd0330911d18c3b773f9cf7'/>
<id>urn:sha1:537632e0a54a5355cdd0330911d18c3b773f9cf7</id>
<content type='text'>
The read-4-write pages are locked in address ascending order.
But where unlocked in a way easiest for coding. Fix that,
locks should be released in opposite order of locking, .i.e
descending address order.

I have not hit this dead-lock. It was found by inspecting the
dbug print-outs. I suspect there is an higher lock at caller that
protects us, but fix it regardless.

Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
</content>
</entry>
</feed>
