Date: Fri, 13 Jul 2007 04:19:11 -0400 From: "Brian Chu" <chub@freebsd.org> To: freebsd-fs@freebsd.org, "Kostik Belousov" <kostikbel@gmail.com> Subject: msdosfs header unification patch Message-ID: <47a4f3080707130119xbee4477y3e96d27763f793aa@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
------=_Part_31586_12249243.1184314751446 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi fs, The included diff is the work I've done on header consolidation in msdosfs. The three areas I concentrated on where: - sys/fs/msdosfs/ - sys/geom/label/g_label_msdosfs.* - sbin/fsck_msdosfs/ I decided to preserve the headers in sys/fs/msdosfs since the bulk of the code lives there and is most widely understood (don't want to be pulling the rug from under other developers here). There were several places where a meta-structure describing FAT12/FAT16/FAT32 bootsectors and bpb's were kept intact because they were more compact than the actual on disk bs/bpb's. Please feel free to comment! Thanks, Brian ------=_Part_31586_12249243.1184314751446 Content-Type: application/octet-stream; name=patch-chub-msdosfs-unifiedheaders Content-Transfer-Encoding: base64 X-Attachment-Id: f_f42e4psv Content-Disposition: attachment; filename="patch-chub-msdosfs-unifiedheaders" LS0tIC8vZGVwb3QvcHJvamVjdHMvc29jMjAwNy9jaHViLW1zZG9zZnMyL3NiaW4vZnNja19tc2Rv c2ZzL2Jvb3QuYwkyMDA3LzA2LzI5IDAwOjQyOjQyCisrKyAvL2RlcG90L3Byb2plY3RzL3NvYzIw MDcvY2h1Yi1tc2Rvc2ZzMi9zYmluL2ZzY2tfbXNkb3Nmcy9ib290LmMJMjAwNy8wNy8wOCAwODoy ODo1MApAQCAtMzAsOCArMzAsOCBAQAogICogVEhJUyBTT0ZUV0FSRSwgRVZFTiBJRiBBRFZJU0VE IE9GIFRIRSBQT1NTSUJJTElUWSBPRiBTVUNIIERBTUFHRS4KICAqLwogCisjaW5jbHVkZSA8c3lz L2NkZWZzLmg+CiAKLSNpbmNsdWRlIDxzeXMvY2RlZnMuaD4KICNpZm5kZWYgbGludAog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ESVJfTmFtZSwKKwkJ CQlpZiAocGZhdF9lbnRyeS0+ZGVBdHRyaWJ1dGVzICYKKwkJCQkgICAgQVRUUl9ESVJFQ1RPUlkp IHsKKwkJCQkJc3RybGNweShsYWJlbCwgcGZhdF9lbnRyeS0+ZGVOYW1lLAogCQkJCQkgICAgTUlO KHNpemUsCi0JCQkJCSAgICBzaXplb2YocGZhdF9ic2JwYi0+QlNfVm9sTGFiKSArIDEpKTsKKwkJ CQkJICAgIHNpemVvZihwZmF0X2V4dGJvb3QtPmV4Vm9sdW1lTGFiZWwpICsgMSkpOwogCQkJCQln b3RvIGVuZG9mY2hlY2tzOwogCQkJCX0KIAkJCX0gd2hpbGUoKHVpbnQ4X3QgKikoKytwZmF0X2Vu dHJ5KSA8Cg== ------=_Part_31586_12249243.1184314751446--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47a4f3080707130119xbee4477y3e96d27763f793aa>