[PATCH] nbd: maintain compatibility with existing nbd tools

Paul Clements (kernel@steeleye.com)
Sat, 28 Jun 2003 13:20:55 -0400 (EDT)


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-23761-1056820994-0001-2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

On Wed, 25 Jun 2003, Lou Langholtz wrote:

> [ ... ] In the meantime, the nbd-client tool currently can't correctly set
> the size of the device and either that needs to be worked around in the
> driver (I'd done that in the original jumbo patch), or the nbd-client
> tool needs to be updated (the patch I'd mailed out for nbd-client works
> around the sizing issue by re-opening the nbd). To be clear, that's not
> something any of the changes that have gone in so far broke nor address.
> It's a consequence of how bd_set_size() is called in fs/block_dev.c
> do_open().

And here's the (tiny) patch for nbd to maintain compatibility with the
existing nbd-client tool. Compiled and tested on a couple machines.
Please apply.

Thanks,
Paul

--=_courier-23761-1056820994-0001-2
Content-Type: text/plain; charset=us-ascii; name="nbd_2_5_compat.diff"
Content-Transfer-Encoding: base64
Content-ID: <Pine.LNX.4.10.10306281320550.764@clements.sc.steeleye.com>
Content-Description: nbd patch
Content-Disposition: attachment; filename="nbd_2_5_compat.diff"

LS0tIG5iZC5jLk9SSUcJMjAwMy0wNi0yNiAxMDozNTo0My4wMDAwMDAwMDAg
LTA0MDANCisrKyBuYmQuYwkyMDAzLTA2LTI2IDE3OjAzOjA4LjAwMDAwMDAw
MCAtMDQwMA0KQEAgLTQ2NSwxNSArNDY4LDE4IEBADQogCQkJbG8tPmJsa3Np
emVfYml0cysrOw0KIAkJCXRlbXAgPj49IDE7DQogCQl9DQotCQlsby0+Ynl0
ZXNpemUgJj0gfihsby0+Ymxrc2l6ZS0xKTsgDQorCQlsby0+Ynl0ZXNpemUg
Jj0gfihsby0+Ymxrc2l6ZS0xKTsNCisJCWlub2RlLT5pX2JkZXYtPmJkX2lu
b2RlLT5pX3NpemUgPSBsby0+Ynl0ZXNpemU7DQogCQlzZXRfY2FwYWNpdHko
bG8t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