diff options
author | Jeff Layton <jlayton@primarydata.com> | 2014-07-03 15:15:54 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-07-09 20:55:03 -0400 |
commit | 62814d6a9bca1de4eb69cee161e01e0f670b486d (patch) | |
tree | a5d58917c4dac4690c9a13b3f0701d64e02bb6cf /fs/nfsd/nfsproc.c | |
parent | 722b620d1830fce69367b099ef6a83f41a4b9d72 (diff) |
nfsd: add a nfserrno mapping for -E2BIG to nfserr_fbig
I saw this pop up with some pynfs testing:
[ 123.609992] nfsd: non-standard errno: -7
...and -7 is -E2BIG. I think what happened is that XFS returned -E2BIG
due to some xattr operations with the ACL10 pynfs TEST (I guess it has
limited xattr size?).
Add a better mapping for that error since it's possible that we'll need
it. How about we convert it to NFSERR_FBIG? As Bruce points out, they
both have "BIG" in the name so it must be good.
Also, turn the printk in this function into a WARN() so that we can get
a bit more information about situations that don't have proper mappings.
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfsproc.c')
-rw-r--r-- | fs/nfsd/nfsproc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c index eff49552cdc8..b19c7e8bf64c 100644 --- a/fs/nfsd/nfsproc.c +++ b/fs/nfsd/nfsproc.c | |||
@@ -717,6 +717,7 @@ nfserrno (int errno) | |||
717 | { nfserr_noent, -ENOENT }, | 717 | { nfserr_noent, -ENOENT }, |
718 | { nfserr_io, -EIO }, | 718 | { nfserr_io, -EIO }, |
719 | { nfserr_nxio, -ENXIO }, | 719 | { nfserr_nxio, -ENXIO }, |
720 | { nfserr_fbig, -E2BIG }, | ||
720 | { nfserr_acces, -EACCES }, | 721 | { nfserr_acces, -EACCES }, |
721 | { nfserr_exist, -EEXIST }, | 722 | { nfserr_exist, -EEXIST }, |
722 | { nfserr_xdev, -EXDEV }, | 723 | { nfserr_xdev, -EXDEV }, |
@@ -751,7 +752,7 @@ nfserrno (int errno) | |||
751 | if (nfs_errtbl[i].syserr == errno) | 752 | if (nfs_errtbl[i].syserr == errno) |
752 | return nfs_errtbl[i].nfserr; | 753 | return nfs_errtbl[i].nfserr; |
753 | } | 754 | } |
754 | printk (KERN_INFO "nfsd: non-standard errno: %d\n", errno); | 755 | WARN(1, "nfsd: non-standard errno: %d\n", errno); |
755 | return nfserr_io; | 756 | return nfserr_io; |
756 | } | 757 | } |
757 | 758 | ||