[dm-devel] [PATCH] kcopyd.c : End copy job on all read errors

Kevin Corry corryk at us.ibm.com
Thu Jan 9 14:57:02 UTC 2003


In copy_write(), if there was an error on the read portion of the copy, should
we always bail out and stop the job, or just when the caller has specified a
callback notifier? The current code will continue with the write portion of
the copy even on an error in this situation. I'm not sure what the original
intention was.

--- linux-2.4.20a/drivers/md/kcopyd.c	2003/01/09 19:43:41
+++ linux-2.4.20b/drivers/md/kcopyd.c	2003/01/09 19:51:11
@@ -655,8 +655,10 @@
 {
 	struct copy_info *info = (struct copy_info *) job->context;
 
-	if (job->err && info->notify) {
-		info->notify(job->err, job->context);
+	if (job->err) {
+		if (info->notify) {
+			info->notify(job->err, job->context);
+		}
 		kcopyd_free_job(job);
 		free_copy_info(info);
 		return;




More information about the dm-devel mailing list