[patch] fixes for NFS over TCP (not fully fixed but helps)

Dave Airlie (airlied@skynet.csn.ul.ie)
Tue, 5 Jan 1999 18:55:24 +0000 (GMT)


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.

---913833367-847209289-915562524=:11333
Content-Type: TEXT/PLAIN; charset=US-ASCII

Right,
here are some patches to the sunrpc code in should apply against
2.2.0pre4, these patches allow NFS over TCP ro mounts to work a lot more
resiliantly,

before these patches I could crash it with
mount -t nfs -o tcp,nolock oak:/foo /foo
cd /foo
find .
the find would stop and the rpc system would get stuck waiting for the tcp
dispatcher to wake up (which it would never do)...

with these patches I can now do multiple finds and du and file reads with
no problems, I'm looking into the file writing problem Alan mentioned now
(whenever my flu goes away)....

the diff is in 3 parts, the first piece to linux/net/sunrpc/sched.c is
most important, the next piece to xprt.c also seems to help as it ensures
that the xprt is on the rpc_xprt_pending list before waking the
tcp_dispatcher, and the fix to linux/include/linux/xprt.h just seems right
to me ...

Comments anyone please test ..

Dave.

------------ David Airlie, David.Airlie@ul.ie,airlied@skynet--------
Telecommunications Research Centre, ECE Dept, University of Limerick \
http://www.csn.ul.ie/~airlied -- Telecommunications Researcher \
--- TEL: +353-61-202695 -----------------------------------------------

---913833367-847209289-915562524=:11333
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="nfs_tcp_1.diff"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.3.95.990105185524.11333C@skynet.csn.ul.ie>
Content-Description:

ZGlmZiAtdXIgbGludXgvbmV0L3N1bnJwYy9zY2hlZC5jIGxpbnV4LWRhdmUv
bmV0L3N1bnJwYy9zY2hlZC5jDQotLS0gbGludXgvbmV0L3N1bnJwYy9zY2hl
ZC5jCVR1ZSBKYW4gIDUgMTg6Mzg6MjUgMTk5OQ0KKysrIGxpbnV4LWRhdmUv
bmV0L3N1bnJwYy9zY2hlZC5jCVR1ZSBKYW4gIDUgMTg6NDQ6NTQgMTk5O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W5kaW5nPT1OVUxMKQ0KLQkJ
CXRjcF9ycGNpb2RfcXVldWUoKTsNCisJCQlzdGFydF9xdWV1ZT0xOw0KIAkJ
eHBydC0+cnhfcGVuZGluZ19mbGFnPTE7DQogCQl4cHJ0LT5yeF9wZW5kaW5n
PXJwY194cHJ0X3BlbmRpbmc7DQogCQlycGNfeHBydF9wZW5kaW5nPXhwcnQ7
DQorCQlpZiAoc3RhcnRfcXVldWUpDQorCQkgIHsNCisJCSAgICB0Y3BfcnBj
aW9kX3F1ZXVlKCk7DQorCQkgICAgc3RhcnRfcXVldWU9MDsNCisJCSAgfQ0K
IAl9DQogCWVsc2UNCiAJCWRwcmludGsoIlJQQzogICAgIHhwcnQgcXVldWVk
IGFscmVhZHkgJXBcbiIsIHhwcnQpOw0KZGlmZiAtdXIgbGludXgvaW5jbHVk
ZS9saW51eC9zdW5ycGMveHBydC5oIGxpbnV4LWRhdmUvaW5jbHVkZS9saW51
eC9zdW5ycGMveHBydC5oDQotLS0gbGludXgvaW5jbHVkZS9saW51eC9zdW5y
cGMveHBydC5oCUZyaSBKYW4gIDEgMTk6NTM6NDggMTk5OQ0KKysrIGxpbnV4
LWRhdmUvaW5jbHVkZS9saW51eC9zdW5ycGMveHBydC5oCU1vbiBKYW4gIDQg
MjE6NTE6MzAgMTk5OQ0KQEAgLTE1OCw3ICsxNTgsNyBAQA0KIAkgKi8NCiAJ
dW5pb24gewkJCQkJLyogcmVjb3JkIG1hcmtlciAmIFhJRCAqLw0KIAkJdTMy
CQloZWFkZXJbMl07DQotCQl1OCAqCQlkYXRhWzhdOw0KKwkJdTggCQlkYXRh
WzhdOw0KIAl9CQkJdGNwX3JlY207DQogCXN0cnVjdCBycGNfcnFzdCAqCXRj
cF9ycXN0cDsNCiAJc3RydWN0IGlvdmVjCQl0Y3BfaW92ZWNbTUFYX0lPVkVD
XTsNCg==
---913833367-847209289-915562524=:11333--

-
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/