[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[dm-devel] [PATCH dmraid 1/1] Ensure metadata dump of pdc metadata has the correct offset.



a read_metadata function needds to set *offset so that file_metadata
can create the correct xxx/dev-offset file.
pdf_read_metadata does not set *offset.

This patch add the appropriate setting.

Signed-off-by: NeilBrown <neilb suse de>
---
 1.0.0.rc16/lib/format/ataraid/pdc.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- 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;
+					}
+
 				}
 			}
 		}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]