Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Oct 2012 18:00:06 +0300
From:      Boris Astardzhiev <boris.astardzhiev@gmail.com>
To:        freebsd-fs@freebsd.org
Cc:        gjb@semihalf.com, Grzegorz Bernacki <gber@freebsd.org>, stanislav_galabov@smartcom.bg
Subject:   libstand's NANDFS superblock detection fix
Message-ID:  <CAP=KkTzMeWVh=NavOOgzytyOf_Qjr2S3tSYZNmFxEZWg%2Bn0GOA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
--e0cb4efa6e7e2274bc04cb14c789
Content-Type: text/plain; charset=ISO-8859-1

Hello,

On behalf of Smartcom Bulgaria AD I would like to contribute a patch for
libstand's NANDFS support in FreeBSD.
It is related to the correct detection of a superblock when accessing the
filesystem. It's also been noticed that
the election of a superblock between kernelspace and libstand's one differs
regarding the checkpoint number.
The patch is attached.

Comments will be appreciated.

Greetings,
Boris Astardzhiev / Smartcom Bulgaria AD

--e0cb4efa6e7e2274bc04cb14c789
Content-Type: application/octet-stream; name="nand-contrib.diff"
Content-Disposition: attachment; filename="nand-contrib.diff"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_h7sz8fxe0

ZGlmZiAtLWdpdCBhL2xpYi9saWJzdGFuZC9uYW5kZnMuYyBiL2xpYi9saWJzdGFuZC9uYW5kZnMu
YwppbmRleCA2N2UyZmVhLi5lZjZlNmZjIDEwMDY0NAotLS0gYS9saWIvbGlic3RhbmQvbmFuZGZz
LmMKKysrIGIvbGliL2xpYnN0YW5kL25hbmRmcy5jCkBAIC0xNzUsNyArMTc1LDcgQEAgc3RhdGlj
IGludAogbmFuZGZzX2ZpbmRfc3VwZXJfYmxvY2soc3RydWN0IG5hbmRmcyAqZnMsIHN0cnVjdCBv
cGVuX2ZpbGUgKmYpCiB7CiAJc3RydWN0IG5hbmRmc19zdXBlcl9ibG9jayAqc2I7Ci0JaW50IGks
IGosIG47CisJaW50IGksIGosIG4sIHM7CiAJaW50IHNlY3RvcnNfdG9fcmVhZCwg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CWNvbnRpbnVlOwotCQkJTkFOREZT
X0RFQlVHKCJtYWdpYyAleCB3dGltZSAlamRcbiIsIHNiLT5zX21hZ2ljLAotCQkJICAgIHNiLT5z
X3d0aW1lKTsKLQkJCWlmIChzYltqXS5zX3d0aW1lID4gZnMtPm5mX3NiLT5zX3d0aW1lKQorCQkJ
TkFOREZTX0RFQlVHKCJtYWdpYyAleCB3dGltZSAlamQsIGxhc3RjcCAweCVqeFxuIiwKKwkJCSAg
ICBzYltqXS5zX21hZ2ljLCBzYltqXS5zX3d0aW1lLCBzYltqXS5zX2xhc3RfY25vKTsKKwkJCWlm
IChzYltqXS5zX2xhc3RfY25vID4gZnMtPm5mX3NiLT5zX2xhc3RfY25vKQogCQkJCW1lbWNweShm
cy0+bmZfc2IsICZzYltqXSwgc2l6ZW9mKCpmcy0+bmZfc2IpKTsKIAkJfQogCX0K
--e0cb4efa6e7e2274bc04cb14c789--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAP=KkTzMeWVh=NavOOgzytyOf_Qjr2S3tSYZNmFxEZWg%2Bn0GOA>