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

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

 



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

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux