[PATCH] Re: Current NBD 'stuff'

Paul Clements (kernel@steeleye.com)
Thu, 6 Dec 2001 17:13:12 -0500 (EST)


This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.

--296485894-1626290488-1007676792=:17617
Content-Type: TEXT/PLAIN; charset=US-ASCII

Pavel,

Here is the patch against 2.4.16. Please consider for
inclusion in 2.4 series kernel. We've been running this
code for several months now and it is working very well.

On Thu, 6 Dec 2001, Pavel Machek wrote:

> Do not comment code by //. Kill if it you want to.
>
> You added clean way to stop nbd. Good.
>
> DO NOT USE ALL CAPITALS not even in printks().
>
> Fix those and patch looks ike good idea for 2.5.

OK, done.

Thanks,

--
Paul Clements
Paul.Clements@SteelEye.com

--296485894-1626290488-1007676792=:17617 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="nbd_2_4_16.diff" Content-Transfer-Encoding: BASE64 Content-ID: <Pine.LNX.4.10.10112061713120.17617@clements.sc.steeleye.com> Content-Description: nbd patch Content-Disposition: attachment; filename="nbd_2_4_16.diff"

LS0tIGxpbnV4LTIuNC4xNi9kcml2ZXJzL2Jsb2NrL25iZC5jLm9yaWcJRnJp IE9jdCAyNiAxODozOTowMiAyMDAxDQorKysgbGludXgtMi40LjE2L2RyaXZl cnMvYmxvY2svbmJkLmMJVGh1IERlYyAgNiAxNzo1MDozMiAyMDAxDQpAQCAt MjQsNyArMjQsOSBAQA0KICAqIDAxLTMtMTEgTWFrZSBuYmQgd29yayB3aXRo IG5ldyBMaW51eCBibG9jayBsYXllciBjb2RlLiBJdCBub3cgc3VwcG9ydHMN CiAgKiAgIHBsdWdnaW5nIGxpa2UgYWxsIHRoZSBvdGhlciBibG9jayBkZXZp Y2VzLiBBbHNvIGFkZGVkIGluIE1TR19NT1JFIHRvDQogICogICByZWR1Y2Ug bnVtYmVyIG9mIHBhcnRpYWwgVENQIHNlZ21lbnRzIHNlbnQuIDxzdGV2ZUBj aHlnd3luLmNvbT4N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sgPSBOVUxM Ow0KKwkJdXAoJmxvLT5xdWV1ZV9sb2NrKTsNCisJCWlmKGZpbGUpDQorCQkJ ZnB1dChmaWxlKTsNCiAJCXJldHVybiBsby0+aGFyZGVycm9yOw0KIAljYXNl IE5CRF9DTEVBUl9RVUU6DQorCQlkb3duKCZsby0+cXVldWVfbG9jayk7DQog CQluYmRfY2xlYXJfcXVlKGxvKTsNCisJCXVwKCZsby0+cXVldWVfbG9jayk7 DQogCQlyZXR1cm4gMDsNCiAjaWZkZWYgUEFSQU5PSUENCiAJY2FzZSBOQkRf UFJJTlRfREVCVUc6DQpAQCAtNTEyLDcgKzU0OCw3IEBADQogCQlpbml0X01V VEVYKCZuYmRfZGV2W2ldLnF1ZXVlX2xvY2spOw0KIAkJbmJkX2Jsa3NpemVz W2ldID0gMTAyNDsNCiAJCW5iZF9ibGtzaXplX2JpdHNbaV0gPSAxMDsNCi0J CW5iZF9ieXRlc2l6ZXNbaV0gPSAweDdmZmZmYzAwOyAvKiAyR0IgKi8NCisJ CW5iZF9ieXRlc2l6ZXNbaV0gPSAoKHU2NCkweDdmZmZmYzAwKSA8PCAxMDsg LyogMlRCICovDQogCQluYmRfc2l6ZXNbaV0gPSBuYmRfYnl0ZXNpemVzW2ld ID4+IEJMT0NLX1NJWkVfQklUUzsNCiAJCXJlZ2lzdGVyX2Rpc2soTlVMTCwg TUtERVYoTUFKT1JfTlIsaSksIDEsICZuYmRfZm9wcywNCiAJCQkJbmJkX2J5 dGVzaXplc1tpXT4+OSk7DQo= --296485894-1626290488-1007676792=:17617-- - 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/