bsdlabel: potential bug and/or question about it
Roman Kurakin
rik at inse.ru
Thu Jul 27 19:06:20 UTC 2006
Hi,
I am trying to understand filesystem structure to extract data from
half-broken hard drive and I've started to read sources of bsdlabel (if
someone know any articles about bsdlabel and/or ufs2 structure
please let me know). My question is what for mbroffset and what is it?
I have only some surmises about it, but it looks that this code could
lead to filesystem corruption. But I hope I am wrong :-)
http://cvsup.pt.freebsd.org/cgi-bin/cvsweb/cvsweb.cgi/src/sbin/bsdlabel/bsdlabel.c.diff?r1=1.89&r2=1.90
My train of thought was that in case we have the mbroffset not equal
to offset of c (raw) partition we wouldn't substruct mbroffset from all
offsets.
Lets also assume that this case we meet while we started to edit such slice.
We've finished editing and started to write results. In case of write we
would
add mbroffset unconditionally and thus we get wrong offsets and corrupted
partition table.
Best regards,
rik
More information about the freebsd-geom
mailing list