1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 06_isw-metadata-fixes.dpatch by Luke Yelavich <themuso@ubuntu.com>
4
## All lines beginning with `## DP:' are a description of the patch.
5
## DP: Intel Software RAID metadata fixes.
8
diff -urNad dmraid-1.0.0.rc14-1ubuntu1~/1.0.0.rc14/lib/format/ataraid/isw.c dmraid-1.0.0.rc14-1ubuntu1/1.0.0.rc14/lib/format/ataraid/isw.c
9
--- dmraid-1.0.0.rc14-1ubuntu1~/1.0.0.rc14/lib/format/ataraid/isw.c 2006-09-23 04:11:37.000000000 +1000
10
+++ dmraid-1.0.0.rc14-1ubuntu1/1.0.0.rc14/lib/format/ataraid/isw.c 2008-07-08 14:15:28.000000000 +1000
14
struct isw *isw = META(rd, isw);
15
+ int large = div_up(isw->mpb_size, ISW_DISK_BLOCK_SIZE) > 1;
20
- * Copy 1st metadata sector to after the extended ones
21
- * and increment metadata area pointer by one block, so
22
- * that the metadata is filed in the proper sequence.
24
- memcpy((void*) isw + rd->meta_areas->size, isw, ISW_DISK_BLOCK_SIZE);
25
- rd->meta_areas->area += ISW_DISK_BLOCK_SIZE;
28
+ * Copy 1st metadata sector to after the extended ones
29
+ * and increment metadata area pointer by one block, so
30
+ * that the metadata is filed in the proper sequence.
32
+ memcpy((void*) isw + rd->meta_areas->size, isw,
33
+ ISW_DISK_BLOCK_SIZE);
34
+ rd->meta_areas->area += ISW_DISK_BLOCK_SIZE;
37
ret = write_metadata(lc, handler, rd, -1, erase);
39
/* Correct metadata area pointer. */
40
- rd->meta_areas->area -= ISW_DISK_BLOCK_SIZE;
42
+ rd->meta_areas->area -= ISW_DISK_BLOCK_SIZE;