- rebuild.fix: When a rebuild is requested that
cannot be handled, report and error instead of crashing (bnc#716904) - ddf-erase: Allow dmraid to erase ddf metadata properly (bnc#712671) OBS-URL: https://build.opensuse.org/package/show/Base:System/dmraid?expand=0&rev=19
This commit is contained in:
committed by
Git OBS Bridge
parent
c681376f2f
commit
f9a84585d7
31
ddf-erase
Normal file
31
ddf-erase
Normal file
@@ -0,0 +1,31 @@
|
||||
Allow dmraid to erase ddf metadata properly.
|
||||
|
||||
2 things go wrong:
|
||||
1/ when seeking to the anchor, it seeks to far by a factor of 512
|
||||
2/ when writing to the anchor, it writes 0 bytes, not 512.
|
||||
|
||||
Signed-off-by: NeilBrown <neilb@suse.de>
|
||||
References: bnc#712671
|
||||
---
|
||||
lib/format/ddf/ddf1.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- 1.0.0.rc16.orig/lib/format/ddf/ddf1.c
|
||||
+++ 1.0.0.rc16/lib/format/ddf/ddf1.c
|
||||
@@ -536,7 +536,7 @@ try_to_find_ddf1(struct lib_context *lc,
|
||||
ddf1_sboffset) || !is_ddf1(lc, di, ddf1))
|
||||
goto bad;
|
||||
|
||||
- ddf1->anchor_offset = ddf1_sboffset;
|
||||
+ ddf1->anchor_offset = ddf1_sboffset / 512;
|
||||
|
||||
/* Convert endianness */
|
||||
ddf1->in_cpu_format = 0;
|
||||
@@ -967,6 +967,7 @@ setup_rd(struct lib_context *lc, struct
|
||||
ma[i].offset = ddf1->primary->primary_table_lba;
|
||||
|
||||
ma->offset = ddf1->anchor_offset;
|
||||
+ ma->size = 512;
|
||||
(ma++)->area = &ddf1->anchor;
|
||||
|
||||
(ma++)->area = ddf1->primary;
|
Reference in New Issue
Block a user