Linux Device Mapper development
 help / color / mirror / Atom feed
* Re: [Patch] dm-raid1.c: Conditionally ignore kcopyd errors depending on whether mirror handles
@ 2008-07-25 16:26 Jonathan Brassow
  0 siblings, 0 replies; only message in thread
From: Jonathan Brassow @ 2008-07-25 16:26 UTC (permalink / raw)
  To: dm-devel

Second attempt at header... patch work is still the same.

 brassow

dm-raid1 is setting the 'DM_KCOPYD_IGNORE_ERROR' flag unconditionally
when assigning kcopyd work.  kcopyd is responsible for copying an
assigned section of disk to one or more other disks.  The
'DM_KCOPYD_IGNORE_ERROR' flag affects kcopyd in the following way:

When not set:
kcopyd will immediately stop the copy operation when an error is
encountered.

When set:
kcopyd will try to procede regardless of errors and try to continue
copying any remaining amount.

Since dm-raid1 tracts regions of the address space that are (or
are not) in sync and it now has the ability to handle these
errors, we can safely enable this optimization.  This optimization
is conditional on whether mirror error handling has been enabled.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>

Index: linux-2.6.26-rc8/drivers/md/dm-raid1.c
===================================================================
--- linux-2.6.26-rc8.orig/drivers/md/dm-raid1.c
+++ linux-2.6.26-rc8/drivers/md/dm-raid1.c
@@ -842,7 +842,9 @@ static int recover(struct mirror_set *ms
 	}
 
 	/* hand to kcopyd */
-	set_bit(DM_KCOPYD_IGNORE_ERROR, &flags);
+	if (!errors_handled(ms))
+		set_bit(DM_KCOPYD_IGNORE_ERROR, &flags);
+
 	r = dm_kcopyd_copy(ms->kcopyd_client, &from, ms->nr_mirrors - 1, to,
 			   flags, recovery_complete, reg);
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-07-25 16:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-25 16:26 [Patch] dm-raid1.c: Conditionally ignore kcopyd errors depending on whether mirror handles Jonathan Brassow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox