<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/md/dm-raid1.c, branch linux-2.6.23.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.23.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.23.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2007-07-19T17:04:50Z</updated>
<entry>
<title>some kmalloc/memset -&gt;kzalloc (tree wide)</title>
<updated>2007-07-19T17:04:50Z</updated>
<author>
<name>Yoann Padioleau</name>
</author>
<published>2007-07-19T08:49:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dd00cc486ab1c17049a535413d1751ef3482141c'/>
<id>urn:sha1:dd00cc486ab1c17049a535413d1751ef3482141c</id>
<content type='text'>
Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).

Here is a short excerpt of the semantic patch performing
this transformation:

@@
type T2;
expression x;
identifier f,fld;
expression E;
expression E1,E2;
expression e1,e2,e3,y;
statement S;
@@

 x =
- kmalloc
+ kzalloc
  (E1,E2)
  ...  when != \(x-&gt;fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
- memset((T2)x,0,E1);

@@
expression E1,E2,E3;
@@

- kzalloc(E1 * E2,E3)
+ kcalloc(E1,E2,E3)

[akpm@linux-foundation.org: get kcalloc args the right way around]
Signed-off-by: Yoann Padioleau &lt;padator@wanadoo.fr&gt;
Cc: Richard Henderson &lt;rth@twiddle.net&gt;
Cc: Ivan Kokshaysky &lt;ink@jurassic.park.msu.ru&gt;
Acked-by: Russell King &lt;rmk@arm.linux.org.uk&gt;
Cc: Bryan Wu &lt;bryan.wu@analog.com&gt;
Acked-by: Jiri Slaby &lt;jirislaby@gmail.com&gt;
Cc: Dave Airlie &lt;airlied@linux.ie&gt;
Acked-by: Roland Dreier &lt;rolandd@cisco.com&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Acked-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Acked-by: Mauro Carvalho Chehab &lt;mchehab@infradead.org&gt;
Acked-by: Pierre Ossman &lt;drzeus-list@drzeus.cx&gt;
Cc: Jeff Garzik &lt;jeff@garzik.org&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Acked-by: Greg KH &lt;greg@kroah.com&gt;
Cc: James Bottomley &lt;James.Bottomley@steeleye.com&gt;
Cc: "Antonino A. Daplas" &lt;adaplas@pol.net&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>dm raid1: handle log failure</title>
<updated>2007-07-12T22:01:08Z</updated>
<author>
<name>Jonathan Brassow</name>
</author>
<published>2007-07-12T16:29:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fc1ff9588a6d56258ff9576a31aa34f17757c666'/>
<id>urn:sha1:fc1ff9588a6d56258ff9576a31aa34f17757c666</id>
<content type='text'>
When writing to a mirror, the log must be updated first.  Failure
to update the log could result in the log not properly reflecting
the state of the mirror if the machine should crash.

We change the return type of the rh_flush function to give us
the ability to check if a log write was successful.  If the
log write was unsuccessful, we fail the writes to avoid the
case where the log does not properly reflect the state of the
mirror.

A follow-up patch - which is dependent on the ability to
requeue I/O's to core device-mapper - will requeue the I/O's
for retry (allowing the mirror to be reconfigured.)

Signed-off-by: Jonathan Brassow &lt;jbrassow@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>dm raid1: handle resync failures</title>
<updated>2007-07-12T22:01:08Z</updated>
<author>
<name>Jonathan Brassow</name>
</author>
<published>2007-07-12T16:29:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f44db678edcc6f4c2779ac43f63f0b9dfa28b724'/>
<id>urn:sha1:f44db678edcc6f4c2779ac43f63f0b9dfa28b724</id>
<content type='text'>
Device-mapper mirroring currently takes a best effort approach to
recovery - failures during mirror synchronization are completely ignored.
This means that regions are marked 'in-sync' and 'clean' and removed
from the hash list.  Future reads and writes that query the region
will incorrectly interpret the region as in-sync.

This patch handles failures during the recovery process.  If a failure
occurs, the region is marked as 'not-in-sync' (aka RH_NOSYNC) and added
to a new list 'failed_recovered_regions'.

Regions on the 'failed_recovered_regions' list are not marked as 'clean'
upon removal from the list.  Furthermore, if the DM_RAID1_HANDLE_ERRORS
flag is set, the region is marked as 'not-in-sync'.  This action prevents
any future read-balancing from choosing an invalid device because of the
'not-in-sync' status.

If "handle_errors" is not specified when creating a mirror (leaving the
DM_RAID1_HANDLE_ERRORS flag unset), failures will be ignored exactly as they
would be without this patch.  This is to preserve backwards compatibility with
user-space tools, such as 'pvmove'.  However, since future read-balancing
policies will rely on the correct sync status of a region, a user must choose
"handle_errors" when using read-balancing.

Signed-off-by: Jonathan Brassow &lt;jbrassow@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>dm raid1: clear region outside spinlock</title>
<updated>2007-07-12T22:01:08Z</updated>
<author>
<name>Jonathan Brassow</name>
</author>
<published>2007-07-12T16:28:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=943317efdbc295e8a28df3f5cbd549d066ee8b4a'/>
<id>urn:sha1:943317efdbc295e8a28df3f5cbd549d066ee8b4a</id>
<content type='text'>
A clear_region function is permitted to block (in practice, rare) but gets
called in rh_update_states() with a spinlock held.

The bits being marked and cleared by the above functions are used
to update the on-disk log, but are never read directly.  We can
perform these operations outside the spinlock since the
bits are only changed within one thread viz.
   - mark_region in rh_inc()
   - clear_region in rh_update_states().

So, we grab the clean_regions list items via list_splice() within the
spinlock and defer clear_region() until we iterate over the list for
deletion - similar to how the recovered_regions list is already handled.
We then move the flush() call down to ensure it encapsulates the changes
which are done by the later calls to clear_region().

Signed-off-by: Jonathan Brassow &lt;jbrassow@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>dm raid1: fix status</title>
<updated>2007-07-12T22:01:08Z</updated>
<author>
<name>Milan Broz</name>
</author>
<published>2007-07-12T16:27:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c95bc206da4bc9838bad826883f8f461a972e441'/>
<id>urn:sha1:c95bc206da4bc9838bad826883f8f461a972e441</id>
<content type='text'>
Fix mirror status line broken in dm-log-report-fault-status.patch:
  - space missing between two words
  - placeholder ("0") required for compatibility with a subsequent patch
  - incorrect offset parameter

Cc: stable@kernel.org
Signed-off-by: Milan Broz &lt;mbroz@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>dm: remove duplicate module name from error msgs</title>
<updated>2007-07-12T22:01:08Z</updated>
<author>
<name>Alasdair G Kergon</name>
</author>
<published>2007-07-12T16:27:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0cd3312434cd1f29bee6bff53bf2790d733ad2a2'/>
<id>urn:sha1:0cd3312434cd1f29bee6bff53bf2790d733ad2a2</id>
<content type='text'>
Remove explicit module name from messages as the macro now includes it
automatically.

Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>dm raid1: switch rh_in_sync to blocking in do_reads</title>
<updated>2007-05-09T19:30:48Z</updated>
<author>
<name>Jonathan Brassow</name>
</author>
<published>2007-05-09T09:33:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b997b82d266c9fb910fc2ad95b9bb93b3bccf9be'/>
<id>urn:sha1:b997b82d266c9fb910fc2ad95b9bb93b3bccf9be</id>
<content type='text'>
The call to rh_in_sync() in do_reads() should be allowed to block.  It is in
the mirror worker thread which already permits blocking operations.  This will
be needed to support clustered mirroring which will perform network
operations.

Signed-off-by: Jonathan Brassow &lt;jbrassow@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.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>dm raid1: fix to commit pending clear region requests</title>
<updated>2007-05-09T19:30:48Z</updated>
<author>
<name>Jonathan Brassow</name>
</author>
<published>2007-05-09T09:33:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f5353cd7c9cd10cdf9d62a5487f3db77b7b68105'/>
<id>urn:sha1:f5353cd7c9cd10cdf9d62a5487f3db77b7b68105</id>
<content type='text'>
With the code as it is, it is possible for oustanding clear region requests
never to get flushed when a mirror is deactivated or suspended.  This means
there will always be some resync work required when a mirror is activated,
even though it may very well be in-sync.

Always requesting the flush doesn't hurt us.  This is because the log tracks
whether any changes occurred and, if not, no flush is performed.

Signed-off-by: Jonathan Brassow &lt;jbrassow@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.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>dm raid1: update dm io interface</title>
<updated>2007-05-09T19:30:47Z</updated>
<author>
<name>Milan Broz</name>
</author>
<published>2007-05-09T09:33:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=88be163abb5324bab09f5eff9646590eec5314eb'/>
<id>urn:sha1:88be163abb5324bab09f5eff9646590eec5314eb</id>
<content type='text'>
This patch ports dm-raid1.c to the new dm-io interface.

Signed-off-by: Milan Broz &lt;mbroz@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.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>dm raid1: add handle_errors feature flag</title>
<updated>2007-05-09T19:30:47Z</updated>
<author>
<name>Jonathan E Brassow</name>
</author>
<published>2007-05-09T09:32:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a8e6afa2363de7ee0dea1a3297f6236f421c2dd4'/>
<id>urn:sha1:a8e6afa2363de7ee0dea1a3297f6236f421c2dd4</id>
<content type='text'>
This patch adds the ability to specify desired features in the mirror
constructor/mapping table.

The first feature of interest is "handle_errors".  Currently, mirroring will
ignore any I/O errors from the devices.  Subsequent patches will check for
this flag and handle the errors.  If flag/feature is not present, mirror will
do nothing - maintaining backwards compatibility.

Signed-off-by: Jonathan E Brassow &lt;jbrassow@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.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>
</feed>
