diff mbox

[dmraid,1/1] Ensure metadata dump of pdc metadata has the correct offset.

Message ID 20091211033030.695580934@suse.de (mailing list archive)
State New, archived
Headers show

Commit Message

NeilBrown Dec. 11, 2009, 3:27 a.m. UTC
None
diff mbox

Patch

--- dmraid.orig/1.0.0.rc16/lib/format/ataraid/pdc.c
+++ dmraid/1.0.0.rc16/lib/format/ataraid/pdc.c
@@ -202,8 +202,11 @@  pdc_read_metadata(struct lib_context *lc
 							break;
 
 					/* Memorize main metadata sector. */
-					} else if (!info->u32)
+					} else if (!info->u32) {
 						info->u32 = *s;
+						*offset = sub ? di->sectors - *s : *s;
+					}
+
 				}
 			}
 		}