]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.fixes/nfsd-09-fix-kabi
Reenabled linux-xen, added patches for Xen Kernel Version 2.6.27.31,
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / nfsd-09-fix-kabi
1 From: NeilBrown <neilb@suse.de
2 Subject: Fix kabi breakage in previous nfsd patch series
3 Patch-mainline: not needed
4 References: bnc#498708
5
6 Adding 'thread_wait' to struct cache_req breaks the kabi.
7 We don't really need this field. It seemed like a good idea
8 in terms of generality but:
9 1/ we don't need the set/not-set test in cache.c because there
10 is only one user and it always sets a value
11 2/ we don't really need the two different values - As long as we have
12 some small time limit, it isn't critical what the value is. The
13 two possibilities were mainly provided as a basis for discussion of
14 what would be ideal.
15 So just set to 3 seconds timeout for any request at any time.
16
17 Signed-off-by: Neil Brown <neilb@suse.de>
18
19 ---
20 include/linux/sunrpc/cache.h | 3 ---
21 net/sunrpc/cache.c | 12 +++++-------
22 net/sunrpc/svc_xprt.c | 9 ---------
23 3 files changed, 5 insertions(+), 19 deletions(-)
24
25 --- linux-2.6.27-working.orig/include/linux/sunrpc/cache.h
26 +++ linux-2.6.27-working/include/linux/sunrpc/cache.h
27 @@ -112,9 +112,6 @@ struct cache_detail {
28 */
29 struct cache_req {
30 struct cache_deferred_req *(*defer)(struct cache_req *req);
31 - int thread_wait; /* How long (jiffies) we can block the
32 - * current thread to wait for updates.
33 - */
34 };
35 /* this must be embedded in a deferred_request that is being
36 * delayed awaiting cache-fill
37 --- linux-2.6.27-working.orig/net/sunrpc/cache.c
38 +++ linux-2.6.27-working/net/sunrpc/cache.c
39 @@ -584,12 +584,10 @@ static int cache_defer_req(struct cache_
40 if (net_random()&1)
41 return 0;
42 }
43 - if (req->thread_wait) {
44 - dreq = &sleeper.handle;
45 - init_waitqueue_head(&sleeper.wait);
46 - dreq->revisit = cache_restart_thread;
47 - } else
48 - dreq = req->defer(req);
49 +
50 + dreq = &sleeper.handle;
51 + init_waitqueue_head(&sleeper.wait);
52 + dreq->revisit = cache_restart_thread;
53
54 retry:
55 if (dreq == NULL)
56 @@ -631,7 +629,7 @@ static int cache_defer_req(struct cache_
57 sleeper.wait,
58 !test_bit(CACHE_PENDING, &item->flags)
59 || list_empty(&sleeper.handle.hash),
60 - req->thread_wait);
61 + 3*HZ);
62 spin_lock(&cache_defer_lock);
63 if (!list_empty(&sleeper.handle.hash)) {
64 list_del_init(&sleeper.handle.recent);
65 --- linux-2.6.27-working.orig/net/sunrpc/svc_xprt.c
66 +++ linux-2.6.27-working/net/sunrpc/svc_xprt.c
67 @@ -594,10 +594,6 @@ int svc_recv(struct svc_rqst *rqstp, lon
68
69 spin_lock_bh(&pool->sp_lock);
70
71 - /* Normally we will wait up to 5 seconds for any required
72 - * cache information to be provided.
73 - */
74 - rqstp->rq_chandle.thread_wait = 5*HZ;
75 xprt = svc_xprt_dequeue(pool);
76 if (xprt) {
77 rqstp->rq_xprt = xprt;
78 @@ -605,11 +601,6 @@ int svc_recv(struct svc_rqst *rqstp, lon
79 rqstp->rq_reserved = serv->sv_max_mesg;
80 atomic_add(rqstp->rq_reserved, &xprt->xpt_reserved);
81
82 - /* As there is a shortage of threads and this request
83 - * had to be queue, don't allow the thread to wait so
84 - * long for cache updates.
85 - */
86 - rqstp->rq_chandle.thread_wait = 1*HZ;
87 } else {
88 /* No data pending. Go to sleep */
89 svc_thread_enqueue(pool, rqstp);