more on dmraid -rD

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

 



 Hi,
This patch improves things slightly:

# diff -Naupr pdc.c.orig pdc.c
--- pdc.c.orig  2006-03-16 06:08:53.000000000 -0800
+++ pdc.c       2006-04-22 02:26:58.000000000 -0700
@@ -189,7 +189,7 @@ static int setup_rd(struct lib_context *
                    struct dev_info *di, void *meta, union read_info *info);
 static struct raid_dev *pdc_read(struct lib_context *lc, struct dev_info *di)
 {
-       return read_raid_dev(lc, di, pdc_read_metadata, 0, 0, to_cpu, is_pdc,
+       return read_raid_dev(lc, di, pdc_read_metadata, sizeof(struct pdc), 63, to_cpu, is_pdc,
                             NULL, setup_rd, handler);
 }

And the file sizes generated look better:
# ls -l
total 72
-rw------- 1 root root 2048 Apr 22 02:28 hde_pdc.dat
-rw------- 1 root root    3 Apr 22 02:28 hde_pdc.offset
-rw------- 1 root root    8 Apr 22 02:28 hde_pdc.size
-rw------- 1 root root 2048 Apr 22 02:28 hdf_pdc.dat
-rw------- 1 root root    3 Apr 22 02:28 hdf_pdc.offset
-rw------- 1 root root    8 Apr 22 02:28 hdf_pdc.size
-rw------- 1 root root 2048 Apr 22 02:28 hdg_pdc.dat
-rw------- 1 root root    3 Apr 22 02:28 hdg_pdc.offset
-rw------- 1 root root    8 Apr 22 02:28 hdg_pdc.size

But since not every pdc metadata has a 63 sector offset it won't work for everyone.

-- 
_______________________________________________

Search for businesses by name, location, or phone number.  -Lycos Yellow Pages

http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10


_______________________________________________

Ataraid-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ataraid-list

[Index of Archives]     [Linux RAID]     [Linux Device Mapper]     [Linux IDE]     [Linux SCSI]     [Kernel]     [Linux Books]     [Linux Admin]     [GFS]     [RPM]     [Yosemite Campgrounds]     [AMD 64]

  Powered by Linux