more on dmraid -rD

"James Olson" <[email protected]>
Newsgroups gmane.linux.ataraid
Message-ID <[email protected]>
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.