--296485894-351917321-1010426025=:5690
Content-Type: TEXT/PLAIN; charset=X-UNKNOWN
Content-Transfer-Encoding: QUOTED-PRINTABLE
Hi,
If you're using the nbd-server from Pavel Machek's web site, you'll need to=
patch=20
nbd-server.c to make it work on ~2.4.3+ kernels. My patched version of nbd-=
server.c
and cliserv.h are attached. The patched files make the server's request buf=
fer be
dynamically allocated, so any size request can be handled by the server.=20
The patched version also fixes some other outdated code (e.g., llseek -> ls=
eek64).
--=20
Paul Clements
Paul.Clements@SteelEye.com
On Mon, 7 Jan 2002, [iso-8859-1] Luc Robalo Marques wrote:
> hi,
>=20
> i would like to setup a nbd but when I try to mke2fs
> the device on the client side, the connection hangs
> and /log/messages contains a entry for mthe server
> telling that the request was too big.
> Any idea what caused it.
>=20
> Thanks you
>=20
> Luc robalo Marques
>=20
> ___________________________________________________________
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran=E7ais !
> Yahoo! Courrier : http://courrier.yahoo.fr
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" i=
n
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>=20
--296485894-351917321-1010426025=:5690
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="nbd-server.c"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.10.10201071253450.5690@clements.sc.steeleye.com>
Content-Description:
Content-Disposition: attachment; filename="nbd-server.c"
LyoNCiAqIE5ldHdvcmsgQmxvY2sgRGV2aWNlIC0gc2VydmVyDQogKg0KICog
Q29weXJpZ2h0IDE5OTYtMTk5OCBQYXZlbCBNYWNoZWssIGRpc3RyaWJ1dGUg
dW5kZXIgR1BMDQogKiAgPHBhdmVsQGF0cmV5Lmthcmxpbi5tZmYuY3VuaS5j
ej4NCiAqDQogKiBWZXJzaW9uIDEuMCAtIGhvcGVmdWxseSA2NC1iaXQtY2xl
YW4NCiAqIFZlcnNpb24gMS4xIC0gb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lzeXNsb2coTE9HX0lORk8sICJz
aXplIG9mIGV4cG9ydGVkIGZpbGUvZGV2aWNlIGlzICVsdU1CIiwNCgkJCQkg
ICAgICAgKHVuc2lnbmVkIGxvbmcpKGV4cG9ydHNpemUgPj4gMjApKTsNCgkJ
ZWxzZQ0KCQkJc3lzbG9nKExPR19JTkZPLCAic2l6ZSBvZiBleHBvcnRlZCBm
aWxlL2RldmljZSBpcyAlbHVLQiIsDQoJCQkgICAgICAgKHVuc2lnbmVkIGxv
bmcpKGV4cG9ydHNpemUgPj4gMTApKTsNCgllbHNlDQoJCXN5c2xvZyhMT0df
SU5GTywgInNpemUgb2YgZXhwb3J0ZWQgZmlsZS9kZXZpY2UgaXMgJWx1IiwN
CgkJICAgICAgICh1bnNpZ25lZCBsb25nKWV4cG9ydHNpemUpOw0KCXNldG15
c29ja29wdChuZXQpOw0KDQoJbWFpbmxvb3AobmV0KTsNCglyZXR1cm4gMDsN
Cn0NCg==
--296485894-351917321-1010426025=:5690
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="cliserv.h"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.10.10201071253451.5690@clements.sc.steeleye.com>
Content-Description:
Content-Disposition: attachment; filename="cliserv.h"
LyogVGhpcyBoZWFkZXIgZmlsZSBpcyBzaGFyZWQgYnkgY2xpZW50ICYgc2Vy
dmVyLiBUaGV5IHJlYWxseSBoYXZlDQogKiBzb21ldGhpbmcgdG8gc2hhcmUu
Li4NCiAqICovDQoNCi8qIENsaWVudC9zZXJ2ZXIgcHJvdG9jb2wgaXMgYXMg
Zm9sbG93czoNCiAgIFNlbmQgSU5JVF9QQVNTV0QNCiAgIFNlbmQgNjQtYml0
IGNsaXNlcnZfbWFnaWMNCiAgIFNlbmQgNjQtYml0IHNpemUgb2YgZXhwb3J0
ZWQgZGV2aWNlDQogICBTZW5kIDEyOCBieXRlcyBvZiB6ZXJvcyAocmVzZXJ2
ZWQgZm9yIGZ1dHVyZSB1c2UpDQogK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HMxKSwgczIpOw0KCX0NCg0KCXMxW21heGxlbi0x
XSA9ICdcMCc7DQojaWZkZWYgSVNTRVJWRVINCglzeXNsb2coTE9HX0VSUiwg
czEpOw0KI2Vsc2UNCglmcHJpbnRmKHN0ZGVyciwgIkVycm9yOiAlc1xuIiwg
czEpOw0KI2VuZGlmDQoJZXhpdCgxKTsNCn0NCg0Kdm9pZCBsb2dnaW5nKHZv
aWQpDQp7DQojaWZkZWYgSVNTRVJWRVINCglvcGVubG9nKE1ZX05BTUUsIExP
R19QSUQsIExPR19EQUVNT04pOw0KI2VuZGlmDQoJc2V0dmJ1ZihzdGRvdXQs
IE5VTEwsIF9JT05CRiwgMCk7DQoJc2V0dmJ1ZihzdGRlcnIsIE5VTEwsIF9J
T05CRiwgMCk7DQp9DQoNCiNpZmRlZiBXT1JEU19CSUdFTkRJQU4NCnU2NCBu
dG9obGwodTY0IGEpDQp7DQoJcmV0dXJuIGE7DQp9DQojZWxzZQ0KdTY0IG50
b2hsbCh1NjQgYSkNCnsNCgl1MzIgbG8gPSBhICYgMHhmZmZmZmZmZjsNCgl1
MzIgaGkgPSBhID4+IDMyVTsNCglsbyA9IG50b2hsKGxvKTsNCgloaSA9IG50
b2hsKGhpKTsNCglyZXR1cm4gKCh1NjQpIGxvKSA8PCAzMlUgfCBoaTsNCn0N
CiNlbmRpZg0KI2RlZmluZSBodG9ubGwgbnRvaGxsDQo=
--296485894-351917321-1010426025=:5690--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/