Linux-kernel mailing list archive 2000-06,: [CFT][PATCH] loopback fixes for 2.3

# [CFT][PATCH] loopback fixes for 2.3

Alexander Viro (aviro@redhat.com)
Sat, 12 Feb 2000 04:07:54 -0500 (EST)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Shay Rojansky: "file descriptor manipulation"
- Previous message: Sergey Kubushin: "Re: Why is ReGet breaking things?"

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.

---1345333206-831891448-950346474=:21646
Content-Type: TEXT/PLAIN; charset=US-ASCII

Attached patch fixes the problems with /dev/loop. It should also
work over NFS/smbfs/whatever. Please, help testing it.
Cheers,
Al

---1345333206-831891448-950346474=:21646
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=loop-patch-3
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.10.10002120407540.21646@aviro.devel.redhat.com>
Content-Description:
Content-Disposition: attachment; filename=loop-patch-3

ZGlmZiAtdXJOIGxpbnV4LTIuMy40NC1wcmU4L2RyaXZlcnMvYmxvY2svbG9v
cC5jIGxpbnV4LWJpcmQudm0vZHJpdmVycy9ibG9jay9sb29wLmMNCi0tLSBs
aW51eC0yLjMuNDQtcHJlOC9kcml2ZXJzL2Jsb2NrL2xvb3AuYwlUaHUgRmVi
IDEwIDE2OjQyOjExIDIwMDANCisrKyBsaW51eC1iaXJkLnZtL2RyaXZlcnMv
YmxvY2svbG9vcC5jCVNhdCBGZWIgMTIgMDM6NDE6MjcgMjAwMA0KQEAgLTQw
LDYgKzQwLDEwIEBADQogICogICBpdCBwYXNzZXMgdGhlIHVuZGVybHlpbmcg
ZGV2aWNlJ3MgYmxvY2sgbnVtYmVyIGluc3RlYWQgb2YgdGhlDQogICogICBv
ZmZzZXQuIFRoaXMgbWFrZXMgaXQgY2hhbmdlIGZvciBhIGdpdmVuIGJsb2Nr
IHdoZW4gdGhlIGZpbGUgaXMgDQogICogICBtb3Zl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xhciBmaWxlIC0gd2UgbmVl
ZCB0byBob2xkIG9udG8gYSBmaWxlDQorCQkgICBzdHJ1Y3R1cmUgZm9yIHRo
aXMgZmlsZS4gIEZyaWdnaW4nIE5GUyBjYW4ndCBsaXZlIHdpdGhvdXQNCisJ
CSAgIGl0IG9uIHdyaXRlIGFuZCBmb3IgcmVhZGluZyB3ZSB1c2UgZG9fZ2Vu
ZXJpY19maWxlX3JlYWQoKSwNCisJCSAgIHNvLi4uICBXZSBjcmVhdGUgYSBu
ZXcgZmlsZSBzdHJ1Y3R1cmUgYmFzZWQgb24gdGhlIG9uZQ0KKwkJICAgcGFz
c2VkIHRvIHVzIHZpYSAnYXJnJy4gIFRoaXMgaXMgdG8gYXZvaWQgY2hhbmdp
bmcgdGhlIGZpbGUNCisJCSAgIHN0cnVjdHVyZSB0aGF0IHRoZSBjYWxsZXIg
aXMgdXNpbmcgKi8NCiANCiAJCWxvLT5sb19kZXZpY2UgPSBpbm9kZS0+aV9k
ZXY7DQogCQlsby0+bG9fZmxhZ3MgPSBMT19GTEFHU19ET19CTUFQOw0KQEAg
LTQzMiw3ICs0NTIsNiBAQA0KIAkJbG8tPmxvX2ZsYWdzIHw9IExPX0ZMQUdT
X1JFQURfT05MWTsNCiAJCXNldF9kZXZpY2Vfcm8oZGV2LCAxKTsNCiAJfSBl
bHNlIHsNCi0JCXZtdHJ1bmNhdGUgKGlub2RlLCAwKTsNCiAJCXNldF9kZXZp
Y2Vfcm8oZGV2LCAwKTsNCiAJfQ0KIA0K
---1345333206-831891448-950346474=:21646--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

- Next message: Shay Rojansky: "file descriptor manipulation"
- Previous message: Sergey Kubushin: "Re: Why is ReGet breaking things?"