[3.6.11] NFS: Cache request denied due to non-unique superblock keys.
Subsystems (2)
Hi,
i'm testing the 3.6.11 kernel on some small internal nfs network (1 server <-> 2 clients) and observing such info in dmesg on the client side. could you put some light on this dmesg entry? is it a bug or misconfiguration? i can provide more information about nfs configuration if necessary but denying caching doesn't look nicely.
i'm using following nfs related packages:
autofs-5.0.5-1.x86_64
libnfsidmap-0.25-4.x86_64
nfs-utils-1.2.7-1.x86_64
nfs-utils-clients-1.2.7-1.x86_64
nfs-utils-common-1.2.7-1.x86_64
BR,
Paweł.
please CC me on reply.
Paweł Sikora wrote:
Hi,
i'm testing the 3.6.11 kernel on some small internal nfs network (1 server <-> 2 clients) and observing such info in dmesg on the client side. could you put some light on this dmesg entry?
Are you mounting the same file system more than once? Why? I thought I remembered a mount option to uniquify the mounts but I can't find it now.
Quoted 9 lines · Paweł Sikora
Hi,
i'm testing the 3.6.11 kernel on some small internal nfs network (1 server <-> 2 clients) and observing such info in dmesg on the client side. could you put some light on this dmesg entry? is it a bug or misconfiguration? i can provide more information about nfs configuration if necessary but denying caching doesn't look nicely.
i'm using following nfs related packages:
Quoted 8 lines
autofs-5.0.5-1.x86_64
libnfsidmap-0.25-4.x86_64
nfs-utils-1.2.7-1.x86_64
nfs-utils-clients-1.2.7-1.x86_64
nfs-utils-common-1.2.7-1.x86_64BR,
Paweł.
It's hard to guess when you don't tell us anything about what you are doing to trigger this message, but it sounds as if you are trying to use the cachefs mount options incorrectly.
Signature · 6 lines
Trond Myklebust Linux NFS client maintainer NetApp [email protected] www.netapp.com
Quoted 19 lines · Trond
On Wed, 2012-12-19 at 19:58 +-0100, Pawe+AUI- Sikora wrote:
(quoted diff) +17
-0+AD4- Hi, +AD4- +AD4- i'm testing the 3.6.11 kernel on some small internal nfs network (1 server +ADw--+AD4- 2 clients) +AD4- and observing such info in dmesg on the client side. could you put some light on this dmesg entry? +AD4- is it a bug or misconfiguration? i can provide more information about nfs configuration +AD4- if necessary but denying caching doesn't look nicely. +AD4- +AD4- i'm using following nfs related packages: +AD4- +AD4- autofs-5.0.5-1.x86+AF8-64 +AD4- libnfsidmap-0.25-4.x86+AF8-64 +AD4- nfs-utils-1.2.7-1.x86+AF8-64 +AD4- nfs-utils-clients-1.2.7-1.x86+AF8-64 +AD4- nfs-utils-common-1.2.7-1.x86+AF8-64 +AD4- +AD4- BR, +AD4- Pawe+AUI-.
Quoted 3 lines
It's hard to guess when you don't tell us anything about what you are doing to trigger this message, but it sounds as if you are trying to use the cachefs mount options incorrectly.
on the server side there're following exports:
# exportfs -v
/home/atest/farm-local
<world>(rw,async,wdelay,nohide,crossmnt,no_root_squash,no_subtree_check,insecure_locks)
/home/atest/farm
<world>(rw,async,wdelay,nohide,crossmnt,no_root_squash,no_subtree_check,insecure_locks)
/home/users <world>(rw,no_root_squash,no_subtree_check,insecure_locks)in the exported /home/atest/* there're crossmounted/binded directories:
# fstab /home/atest/farm-local/results /home/atest/farm/results none bind /home/services/ftp /var/lib/ftp none bind /home/services/ftp /home/atest/farm-local/ftp none bind
# df -h Filesystem Size Used Avail Use% Mounted on rootfs 7.6G 4.5G 2.7G 63% / /dev/md0 7.6G 4.5G 2.7G 63% / run 32G 264K 32G 1% /run devtmpfs 32G 0 32G 0% /dev /dev/md1 7.2T 794G 6.4T 11% /home none 32G 0 32G 0% /dev/shm /dev/md1 7.2T 794G 6.4T 11% /home/atest/farm/results /dev/md1 7.2T 794G 6.4T 11% /var/lib/ftp /dev/md1 7.2T 794G 6.4T 11% /home/atest/farm-local/ftp
on the client side there's only a simple autofs configuration:
# cat /etc/autofs/auto.server farm -rw,soft,rsize=32768,wsize=32768,intr,vers=4,async,bg,noatime,retry=30,retrans=10 192.168.2.100:/home/atest/farm-local home -rw,soft,vers=4 192.168.2.100:/home/users
Quoted 53 lines · Paweł Sikora
Quoted 19 lines · Trond
On Wed, 2012-12-19 at 19:58 +--0100, Pawe+-AUI- Sikora wrote:
+-AD4- Hi, +-AD4- +-AD4- i'm testing the 3.6.11 kernel on some small internal nfs network (1 server +-ADw--+-AD4- 2 clients) +-AD4- and observing such info in dmesg on the client side. could you put some light on this dmesg entry? +-AD4- is it a bug or misconfiguration? i can provide more information about nfs configuration +-AD4- if necessary but denying caching doesn't look nicely. +-AD4- +-AD4- i'm using following nfs related packages: +-AD4- +-AD4- autofs-5.0.5-1.x86+-AF8-64 +-AD4- libnfsidmap-0.25-4.x86+-AF8-64 +-AD4- nfs-utils-1.2.7-1.x86+-AF8-64 +-AD4- nfs-utils-clients-1.2.7-1.x86+-AF8-64 +-AD4- nfs-utils-common-1.2.7-1.x86+-AF8-64 +-AD4- +-AD4- BR, +-AD4- Pawe+-AUI-.Quoted 3 lines
It's hard to guess when you don't tell us anything about what you are doing to trigger this message, but it sounds as if you are trying to use the cachefs mount options incorrectly.
on the server side there're following exports:
# exportfs -v /home/atest/farm-local <world>(rw,async,wdelay,nohide,crossmnt,no_root_squash,no_subtree_check,insecure_locks) /home/atest/farm <world>(rw,async,wdelay,nohide,crossmnt,no_root_squash,no_subtree_check,insecure_locks) /home/users <world>(rw,no_root_squash,no_subtree_check,insecure_locks)in the exported
/home/atest/*there're crossmounted/binded directories:# fstab /home/atest/farm-local/results /home/atest/farm/results none bind /home/services/ftp /var/lib/ftp none bind /home/services/ftp /home/atest/farm-local/ftp none bind# df -h Filesystem Size Used Avail Use% Mounted on rootfs 7.6G 4.5G 2.7G 63% / /dev/md0 7.6G 4.5G 2.7G 63% / run 32G 264K 32G 1% /run devtmpfs 32G 0 32G 0% /dev /dev/md1 7.2T 794G 6.4T 11% /home none 32G 0 32G 0% /dev/shm /dev/md1 7.2T 794G 6.4T 11% /home/atest/farm/results /dev/md1 7.2T 794G 6.4T 11% /var/lib/ftp /dev/md1 7.2T 794G 6.4T 11% /home/atest/farm-local/ftp
Quoted 6 lines
on the client side there's only a simple autofs configuration:
# cat /etc/autofs/auto.server farm -rw,soft,rsize=32768,wsize=32768,intr,vers=4,async,bg,noatime,retry=30,retrans=10 192.168.2.100:/home/atest/farm-local home -rw,soft,vers=4 192.168.2.100:/home/users
OK. If you are not specifying '-ofsc', then that warning is 100% confusing. How about the following patch?
8<---------------------------------------------------------------
Quoted 1 line
From
e8ed657ba5edc8c9339e00ab2fd235ab1dd94cd5Mon Sep 17 00:00:00 2001
From: Trond Myklebust <[email protected]>
Date: Wed, 19 Dec 2012 16:56:28 -0500
Subject: [PATCH] NFS: Kill fscache warnings when mounting without -ofsc
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The fscache code will currently bleat a "non-unique superblock keys" warning even if the user is mounting without the 'fsc' option. There should be no reason to even initialise the superblock cache cookie unless we're planning on using fscache for something, so ensure that we check for the NFS_OPTION_FSCACHE flag before calling into the fscache code.
--- fs/nfs/super.c | 19 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+----- 1 file changed, 15 insertions(+-), 4 deletions(-)
fs/nfs/super.c +0 -0
--- a/fs/nfs/super.c
+-+-+- b/fs/nfs/super.c
@@ -2375,19 +-2375,30 @@ static void nfs_get_cache_cookie(struct super_block *sb,
struct nfs_parsed_mount_data *parsed, struct nfs_clone_mount *cloned)
{
+- struct nfs_server *nfss = NFS_SB(sb);
char *uniq = NULL;
int ulen = 0;
- if (parsed && parsed->fscache_uniq) {
- uniq = parsed->fscache_uniq;
- ulen = strlen(parsed->fscache_uniq);
+- nfss->fscache_key = NULL;
+- nfss->fscache = NULL;
+-
+- if (parsed) {
+- if (!(parsed->options & NFS_OPTION_FSCACHE))
+- return;
+- if (parsed->fscache_uniq) {
+- uniq = parsed->fscache_uniq;
+- ulen = strlen(parsed->fscache_uniq);
+- }
} else if (cloned) {
struct nfs_server *mnt_s = NFS_SB(cloned->sb);
+- if (!(mnt_s->options & NFS_OPTION_FSCACHE))
+- return; if (mnt_s->fscache_key) {
uniq = mnt_s->fscache_key->key.uniquifier; ulen = mnt_s->fscache_key->key.uniq_len;
};
- }
+- } else +- return;
nfs_fscache_get_super_cookie(sb, uniq, ulen);
}
Signature · 10 lines
1.7.11.7 -- Trond Myklebust Linux NFS client maintainer NetApp [email protected] www.netapp.com
David Howells
Acked-byQuoted 15 lines · Trond
From
e8ed657ba5edc8c9339e00ab2fd235ab1dd94cd5Mon Sep 17 00:00:00 2001
From: Trond Myklebust <[email protected]>
Date: Wed, 19 Dec 2012 16:56:28 -0500
Subject: [PATCH] NFS: Kill fscache warnings when mounting without -ofsc
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bitThe fscache code will currently bleat a "non-unique superblock keys" warning even if the user is mounting without the 'fsc' option. There should be no reason to even initialise the superblock cache cookie unless we're planning on using fscache for something, so ensure that we check for the
NFS_OPTION_FSCACHEflag before calling into the fscache code.
Quoted 3 lines
Reported-by Paweł Sikora <[email protected]>Signed-off-by Trond Myklebust <[email protected]>Cc David Howells <[email protected]>