Date: Fri, 09 Apr 2010 20:51:50 +0200 From: Alfredo Elvira <aelvira35@hotmail.com> To: freebsd-geom@freebsd.org Subject: Read/write GMIRROR metadata Message-ID: <BLU0-SMTP401B53789F38FEAF59BA60AD150@phx.gbl>
next in thread | raw e-mail | index | archive | help
Hello, iīm developing a patch for geom mirror module to acelerate synchronizing between providers, using bitmaps to write in the provider only modified data since the last rebuilding. I have a trouble in the first access to the new provider attached, before mirror creation, when i execute gmirror label .... When the first clean disk is attached, the system runs the g_mirror_taste function for two times. The first one, there are not valid metadata for mirror class and g_mirror_read_metadata function returns error 22. But the second one, valid metadata are read. I donīt understand "who" and "when" have been written these metadata, because in debugging mode, iīve set breakpoints in functions that write data in provider (g_mirror_write_metadata and g_write_data) and "aparently" these are not called. If i add new fields to metadata (e.g., the number of bitmaps stored in disk), the hash obtained in second read (latest 16 bytes of last sector) no matches with hash coded (which includes all metadata fields) in mirror_metadata_decode_v3v4 function, and that function returns error again. Also i have checked the modifications made in mirror_metadata_decode_v3_v4 to support this new field, and i donīt find errors. In summary, i would like to modify the metadata structure, but if i do that, there are conflicts with hashes. It seems like metadata were written with stole information before read it, and i cannot find this step. Could anyone give me any feedback about it? Best regards.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BLU0-SMTP401B53789F38FEAF59BA60AD150>