Dan Yocum | 3 Jan 2003 16:06
Favicon

RPC: Unable to allocate resbuf from cache! - revisited

Hi all,

Looking back at the archives 
(http://marc.theaimsgroup.com/?t=101707335800002&r=1&w=2) I see that you 
(Trond) say that these copious "RPC: Unable..." messages shouldn't be a 
problem.  Could they be a problem?

The reason I ask is, occassionally, we're getting these strange files 
created with 0 size, date, and some gobble-dee-gook names, and they just so 
happen to show up when we get this error message in the logs.  Here's what 
one looks like:

bash-2.04$ ls -l |egrep -v '(fit|ps|fp|mem)'
total 5742612
-rwxr-xr-x    1 jen_a    sdss            0 Dec 31  1969
:N¨TL8Õ äðÿÿëþÿõ <at>                                       ¦,

The rest of the files are OK, but this is slightly disconcerting.

This is 2.4.18 + XFS + NFS_ALL - rpc_tweaks, IIRC (it's been a long time 
since I've built this kernel). The system has 2GB RAM and 4GB swap (himem is 
  enabled).

Any thoughts?

Thanks,
Dan

--

-- 
Dan Yocum
(Continue reading)

William Lee Irwin III | 4 Jan 2003 12:59

nfs/write.c warning

This trivially corrects an unused variable warning in nfs/write.c:

diff -urpN mm2-2.5.54-1/fs/nfs/write.c mm2-2.5.54-2/fs/nfs/write.c
--- mm2-2.5.54-1/fs/nfs/write.c	2003-01-01 19:22:39.000000000 -0800
+++ mm2-2.5.54-2/fs/nfs/write.c	2003-01-03 03:31:09.000000000 -0800
 <at>  <at>  -828,7 +828,6  <at>  <at>  nfs_writeback_done(struct rpc_task *task
 	struct nfs_write_data	*data = (struct nfs_write_data *) task->tk_calldata;
 	struct nfs_writeargs	*argp = &data->args;
 	struct nfs_writeres	*resp = &data->res;
-	struct inode		*inode = data->inode;
 	struct nfs_page		*req;
 	struct page		*page;

 <at>  <at>  -862,7 +861,7  <at>  <at>  nfs_writeback_done(struct rpc_task *task
 		if (time_before(complain, jiffies)) {
 			dprintk("NFS: faulty NFS server %s:"
 				" (committed = %d) != (stable = %d)\n",
-				NFS_SERVER(inode)->hostname,
+				NFS_SERVER(data->inode)->hostname,
 				data->verf.committed, argp->stable);
 			complain = jiffies + 300 * HZ;
 		}
NeilBrown | 6 Jan 2003 01:05
X-Face
Picon
Picon
Favicon

[PATCH] kNFSd - 4 of 15 - Handle -EAGAIN from exp_find properly in nfsfh.c


### Comments for ChangeSet

 ----------- Diffstat output ------------
 ./fs/nfsd/nfsfh.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff ./fs/nfsd/nfsfh.c~current~ ./fs/nfsd/nfsfh.c
--- ./fs/nfsd/nfsfh.c~current~	2003-01-06 09:55:50.000000000 +1100
+++ ./fs/nfsd/nfsfh.c	2003-01-06 09:55:50.000000000 +1100
 <at>  <at>  -146,11 +146,11  <at>  <at>  fh_verify(struct svc_rqst *rqstp, struct
 		}

 		error = nfserr_dropit;
-		if (IS_ERR(exp))
+		if (IS_ERR(exp) && PTR_ERR(exp) == -EAGAIN)
 			goto out;

 		error = nfserr_stale; 
-		if (!exp)
+		if (!exp || IS_ERR(exp))
 			goto out;

 		/* Check if the request originated from a secure port. */

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
(Continue reading)

NeilBrown | 6 Jan 2003 01:05
X-Face
Picon
Picon
Favicon

[PATCH] kNFSd - 14 of 15 - Use hash_long from hash.h for hashing in rpc/svc caches.


### Comments for ChangeSet

It works much better than my little toy hash functions.

 ----------- Diffstat output ------------
 ./fs/nfsd/export.c               |   27 ++++++++++-----------------
 ./include/linux/sunrpc/svcauth.h |    6 +++++-
 ./net/sunrpc/svcauth.c           |   21 +++++++++++++++------
 ./net/sunrpc/svcauth_unix.c      |    4 +++-
 4 files changed, 33 insertions(+), 25 deletions(-)

diff ./fs/nfsd/export.c~current~ ./fs/nfsd/export.c
--- ./fs/nfsd/export.c~current~	2003-01-06 10:56:30.000000000 +1100
+++ ./fs/nfsd/export.c	2003-01-06 10:36:22.000000000 +1100
 <at>  <at>  -24,6 +24,7  <at>  <at> 
 #include <linux/dcache.h>
 #include <linux/namei.h>
 #include <linux/mount.h>
+#include <linux/hash.h>

 #include <linux/sunrpc/svc.h>
 #include <linux/nfsd/nfsd.h>
 <at>  <at>  -59,12 +60,9  <at>  <at>  static inline int svc_expkey_hash(struct
 	int hash = item->ek_fsidtype;
 	char * cp = (char*)item->ek_fsid;
 	int len = (item->ek_fsidtype==0)?8:4;
-	while (len--)
-		hash += *cp++;
-	cp = (char*)&item->ek_client;
(Continue reading)

NeilBrown | 6 Jan 2003 01:05
X-Face
Picon
Picon
Favicon

[PATCH] kNFSd - 5 of 15 - Don't assume a reader on an RPC cache channel at statup.


### Comments for ChangeSet

Each cache channel remembers if there was a reader recently.
If there wasn't, then it doesn't bother with an up-call.
Currently, it initialises thinking there was a reader
recently incase the reader starts shortly afterwards.  However
this causes problems when a reader doesn't start soon, and
isn't necessary as the reader can easily be started before
the cache is initialised (e.g. before nfsd is started).

 ----------- Diffstat output ------------
 ./net/sunrpc/cache.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff ./net/sunrpc/cache.c~current~ ./net/sunrpc/cache.c
--- ./net/sunrpc/cache.c~current~	2003-01-06 09:54:47.000000000 +1100
+++ ./net/sunrpc/cache.c	2003-01-06 09:56:25.000000000 +1100
 <at>  <at>  -183,7 +183,7  <at>  <at>  void cache_register(struct cache_detail 
 	cd->nextcheck = 0;
 	cd->entries = 0;
 	atomic_set(&cd->readers, 0);
-	cd->last_close = get_seconds();
+	cd->last_close = 0;
 	list_add(&cd->others, &cache_list);
 	spin_unlock(&cache_list_lock);
 }

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
(Continue reading)

NeilBrown | 6 Jan 2003 01:05
X-Face
Picon
Picon
Favicon

[PATCH] kNFSd - 12 of 15 - Add 'filehandle' entry for nfsd filesystem for looking up a filehandle


### Comments for ChangeSet

The getfh system call takes an IP address, which is only
really appropriate for AUTH_UNIX authentication.

With this interface, you call can ask for a filehandle for a
particular domain.

You write 
 domainname pathname maxlength
to the file, and then read back the filehandle

All strings a qword quoted.

 ----------- Diffstat output ------------
 ./fs/nfsd/nfsctl.c |   63 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 62 insertions(+), 1 deletion(-)

diff ./fs/nfsd/nfsctl.c~current~ ./fs/nfsd/nfsctl.c
--- ./fs/nfsd/nfsctl.c~current~	2003-01-06 10:19:30.000000000 +1100
+++ ./fs/nfsd/nfsctl.c	2003-01-06 10:20:19.000000000 +1100
 <at>  <at>  -46,6 +46,8  <at>  <at>  enum {
 	NFSD_Getfd,
 	NFSD_Getfs,
 	NFSD_List,
+	NFSD_Fh,
+	NFSD_END
 };

(Continue reading)

NeilBrown | 6 Jan 2003 01:05
X-Face
Picon
Picon
Favicon

[PATCH] kNFSd - 13 of 15 - Add 'threads' file to nfsd filesystem to allow changing number of threads.


### Comments for ChangeSet

This uses the read-without-write style transaction files in nfsctl.
We can write a number of threads, and then read back the number of 
threads that resulted, or we can just open and read in which case 
we read back the number of threads without changing it.

 ----------- Diffstat output ------------
 ./fs/nfsd/nfsctl.c |   28 ++++++++++++++++++++++++++++
 ./fs/nfsd/nfssvc.c |    8 ++++++++
 2 files changed, 36 insertions(+)

diff ./fs/nfsd/nfsctl.c~current~ ./fs/nfsd/nfsctl.c
--- ./fs/nfsd/nfsctl.c~current~	2003-01-06 10:20:19.000000000 +1100
+++ ./fs/nfsd/nfsctl.c	2003-01-06 10:21:24.000000000 +1100
 <at>  <at>  -47,6 +47,7  <at>  <at>  enum {
 	NFSD_Getfs,
 	NFSD_List,
 	NFSD_Fh,
+	NFSD_Threads,
 	NFSD_END
 };

 <at>  <at>  -61,6 +62,7  <at>  <at>  static ssize_t write_unexport(struct fil
 static ssize_t write_getfd(struct file *file, char *buf, size_t size);
 static ssize_t write_getfs(struct file *file, char *buf, size_t size);
 static ssize_t write_filehandle(struct file *file, char *buf, size_t size);
+static ssize_t write_threads(struct file *file, char *buf, size_t size);

(Continue reading)

NeilBrown | 6 Jan 2003 01:05
X-Face
Picon
Picon
Favicon

[PATCH] kNFSd - 3 of 15 - Fix some bugs in qword management.


### Comments for ChangeSet

1/ converting to hex wasn't quite right
2/ make sure that decoding into the buffer holding
   original message works ok.

 ----------- Diffstat output ------------
 ./net/sunrpc/cache.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff ./net/sunrpc/cache.c~current~ ./net/sunrpc/cache.c
--- ./net/sunrpc/cache.c~current~	2003-01-06 09:52:33.000000000 +1100
+++ ./net/sunrpc/cache.c	2003-01-06 09:54:06.000000000 +1100
 <at>  <at>  -799,8 +799,8  <at>  <at>  void qword_addhex(char **bpp, int *lp, c
 		len -= 2;
 		while (blen && len >= 2) {
 			unsigned char c = *buf++;
-			*bp++ = '0' + ((c&0xf0)>>4) + (c>=0xa0)*('a'-'0');
-			*bp++ = '0' + (c&0x0f) + ((c&0x0f)>=0x0a)*('a'-'0');
+			*bp++ = '0' + ((c&0xf0)>>4) + (c>=0xa0)*('a'-'9'-1);
+			*bp++ = '0' + (c&0x0f) + ((c&0x0f)>=0x0a)*('a'-'9'-1);
 			len -= 2;
 			blen--;
 		}
 <at>  <at>  -902,7 +902,7  <at>  <at>  int qword_get(char **bpp, char *dest, in
 		}
 	} else {
 		/* text with \nnn octal quoting */
-		while (*bp != ' ' && *bp && len < bufsize-1) {
(Continue reading)

NeilBrown | 6 Jan 2003 01:05
X-Face
Picon
Picon
Favicon

[PATCH] kNFSd - 15 of 15 - NFSv4 server fixes


### Comments for ChangeSet
Assorted fixes particularly related to handling the new style
xdr_buf buffers for NFSv4 server

  ----------- Diffstat output ------------
 ./fs/nfsd/nfs4proc.c        |    2 +
 ./fs/nfsd/nfs4xdr.c         |   53 +++++++++++++++++++++++++++++++-------------
 ./include/linux/nfsd/xdr4.h |    1 
 3 files changed, 41 insertions(+), 15 deletions(-)

diff ./fs/nfsd/nfs4proc.c~current~ ./fs/nfsd/nfs4proc.c
--- ./fs/nfsd/nfs4proc.c~current~	2003-01-06 10:56:22.000000000 +1100
+++ ./fs/nfsd/nfs4proc.c	2003-01-06 10:56:51.000000000 +1100
 <at>  <at>  -568,6 +568,8  <at>  <at>  nfsd4_proc_compound(struct svc_rqst *rqs

 	resp->xbuf = &rqstp->rq_res;
 	resp->p = rqstp->rq_res.head[0].iov_base + rqstp->rq_res.head[0].iov_len;
+	resp->tagp = resp->p + 1; /* skip over status */
+	/* reserve space for: status, taglen, tag, and opcnt */
 	resp->p += 3 + XDR_QUADLEN(args->taglen);
 	resp->end = rqstp->rq_res.head[0].iov_base + PAGE_SIZE;
 	resp->taglen = args->taglen;

diff ./fs/nfsd/nfs4xdr.c~current~ ./fs/nfsd/nfs4xdr.c
--- ./fs/nfsd/nfs4xdr.c~current~	2003-01-06 10:56:22.000000000 +1100
+++ ./fs/nfsd/nfs4xdr.c	2003-01-06 10:56:51.000000000 +1100
 <at>  <at>  -1728,8 +1728,17  <at>  <at>  nfsd4_encode_read(struct nfsd4_compoundr
 	WRITE32(maxcount);
 	ADJUST_ARGS();
(Continue reading)

NeilBrown | 6 Jan 2003 01:05
X-Face
Picon
Picon
Favicon

[PATCH] kNFSd - 6 of 15 - rpc/svc auth_unix tidyup


### Comments for ChangeSet

Get auth_unix_lookup (maps IP address to clientname)
to use cache_check instead of checking the various state
bits manually.

 ----------- Diffstat output ------------
 ./net/sunrpc/svcauth_unix.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff ./net/sunrpc/svcauth_unix.c~current~ ./net/sunrpc/svcauth_unix.c
--- ./net/sunrpc/svcauth_unix.c~current~	2003-01-06 09:57:07.000000000 +1100
+++ ./net/sunrpc/svcauth_unix.c	2003-01-06 09:57:07.000000000 +1100
 <at>  <at>  -268,20 +268,17  <at>  <at>  struct auth_domain *auth_unix_lookup(str

 	if (!ipm)
 		return NULL;
+	if (cache_check(&ip_map_cache, &ipm->h, NULL))
+		return NULL;

-	if (test_bit(CACHE_VALID, &ipm->h.flags) &&
-	    (ipm->m_client->addr_changes - ipm->m_add_change) >0)
+	if ((ipm->m_client->addr_changes - ipm->m_add_change) >0) {
 		set_bit(CACHE_NEGATIVE, &ipm->h.flags);
-
-	if (!test_bit(CACHE_VALID, &ipm->h.flags))
-		rv = NULL;
-	else if (test_bit(CACHE_NEGATIVE, &ipm->h.flags))
 		rv = NULL;
(Continue reading)


Gmane