From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: trond.myklebust@netapp.com, bfields@fieldses.org,
nfsv4@linux-nfs.org, ffilzlnx@us.ibm.com, agruen@suse.de,
aneesh.kumar@linux.vnet.ibm.com, sfrench@us.ibm.com
Cc: linux-nfs@vger.kernel.org
Subject: [RFC PATCH 4/8] nfs: use different capability flag for v4 and posix acl
Date: Wed, 2 Sep 2009 17:54:24 +0530 [thread overview]
Message-ID: <1251894268-1555-5-git-send-email-aneesh.kumar@linux.vnet.ibm.com> (raw)
In-Reply-To: <1251894268-1555-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
NVFSv4 can now support V4 acl and posix ACL. Use different
flag indicate the capability
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
fs/nfs/client.c | 6 +++---
fs/nfs/nfs3acl.c | 8 ++++----
fs/nfs/nfs4proc.c | 4 ++--
fs/nfs/super.c | 2 +-
include/linux/nfs_fs_sb.h | 4 ++--
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 8d25ccb..ea3a6b7 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -685,17 +685,17 @@ static void nfs_init_server_aclclient(struct nfs_server *server)
goto out_noacl;
/* No errors! Assume that Sun nfsacls are supported */
- server->caps |= NFS_CAP_ACLS;
+ server->caps |= NFS_CAP_PACLS;
return;
out_noacl:
- server->caps &= ~NFS_CAP_ACLS;
+ server->caps &= ~NFS_CAP_PACLS;
}
#else
static inline void nfs_init_server_aclclient(struct nfs_server *server)
{
server->flags &= ~NFS_MOUNT_NOACL;
- server->caps &= ~NFS_CAP_ACLS;
+ server->caps &= ~NFS_CAP_PACLS;
}
#endif
diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c
index bac6051..963b5d6 100644
--- a/fs/nfs/nfs3acl.c
+++ b/fs/nfs/nfs3acl.c
@@ -201,7 +201,7 @@ struct posix_acl *nfs3_proc_getacl(struct inode *inode, int type)
struct posix_acl *acl;
int status, count;
- if (!nfs_server_capable(inode, NFS_CAP_ACLS))
+ if (!nfs_server_capable(inode, NFS_CAP_PACLS))
return ERR_PTR(-EOPNOTSUPP);
status = nfs_revalidate_inode(server, inode);
@@ -242,7 +242,7 @@ struct posix_acl *nfs3_proc_getacl(struct inode *inode, int type)
case -EPFNOSUPPORT:
case -EPROTONOSUPPORT:
dprintk("NFS_V3_ACL extension not supported; disabling\n");
- server->caps &= ~NFS_CAP_ACLS;
+ server->caps &= ~NFS_CAP_PACLS;
case -ENOTSUPP:
status = -EOPNOTSUPP;
default:
@@ -304,7 +304,7 @@ static int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl,
int status;
status = -EOPNOTSUPP;
- if (!nfs_server_capable(inode, NFS_CAP_ACLS))
+ if (!nfs_server_capable(inode, NFS_CAP_PACLS))
goto out;
/* We are doing this here, because XDR marshalling can only
@@ -350,7 +350,7 @@ static int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl,
case -EPROTONOSUPPORT:
dprintk("NFS_V3_ACL SETACL RPC not supported"
"(will not retry)\n");
- server->caps &= ~NFS_CAP_ACLS;
+ server->caps &= ~NFS_CAP_PACLS;
case -ENOTSUPP:
status = -EOPNOTSUPP;
}
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index eb93426..2c71885 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -1999,7 +1999,7 @@ static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *f
if (status == 0) {
memcpy(server->attr_bitmask, res.attr_bitmask, sizeof(server->attr_bitmask));
if (res.attr_bitmask[0] & FATTR4_WORD0_ACL)
- server->caps |= NFS_CAP_ACLS;
+ server->caps |= NFS_CAP_V4ACLS;
if (res.has_links != 0)
server->caps |= NFS_CAP_HARDLINKS;
if (res.has_symlinks != 0)
@@ -3077,7 +3077,7 @@ int nfs4_proc_renew(struct nfs_client *clp, struct rpc_cred *cred)
static inline int nfs4_server_supports_acls(struct nfs_server *server)
{
- return (server->caps & NFS_CAP_ACLS)
+ return (server->caps & NFS_CAP_V4ACLS)
&& (server->acl_bitmask & ACL4_SUPPORT_ALLOW_ACL)
&& (server->acl_bitmask & ACL4_SUPPORT_DENY_ACL);
}
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 2f2a5bd..abe9251 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -2317,7 +2317,7 @@ static void nfs4_fill_super(struct super_block *sb)
static void nfs4_validate_mount_flags(struct nfs_parsed_mount_data *args)
{
- args->flags &= ~(NFS_MOUNT_NONLM|NFS_MOUNT_NOACL|NFS_MOUNT_VER3);
+ args->flags &= ~(NFS_MOUNT_NONLM|NFS_CAP_V4ACLS|NFS_MOUNT_VER3);
}
/*
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index 19fe15d..2837ce3 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -165,9 +165,9 @@ struct nfs_server {
#define NFS_CAP_READDIRPLUS (1U << 0)
#define NFS_CAP_HARDLINKS (1U << 1)
#define NFS_CAP_SYMLINKS (1U << 2)
-#define NFS_CAP_ACLS (1U << 3)
+#define NFS_CAP_PACLS (1U << 3)
#define NFS_CAP_ATOMIC_OPEN (1U << 4)
-
+#define NFS_CAP_V4ACLS (1U << 8)
/* maximum number of slots to use */
#define NFS4_MAX_SLOT_TABLE RPC_MAX_SLOT_TABLE
--
1.6.4.2.253.g0b1fac
next prev parent reply other threads:[~2009-09-02 12:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-02 12:24 POSIX ACL support for NFSV4 (using sideband protocol) Aneesh Kumar K.V
2009-09-02 12:24 ` [RFC PATCH 1/8] nfs4: Posix acl server side side-band protocol support Aneesh Kumar K.V
2009-09-02 12:24 ` [RFC PATCH 2/8] nfsv4: Switch to generic xattr handling code Aneesh Kumar K.V
2009-09-02 12:24 ` [RFC PATCH 3/8] nfsv4: Add support for posix ACL Aneesh Kumar K.V
2009-09-02 12:24 ` Aneesh Kumar K.V [this message]
2009-09-02 12:24 ` [RFC PATCH 5/8] nfsv4: Add nfsv4 rpc client side support Aneesh Kumar K.V
2009-09-02 12:24 ` [RFC PATCH 6/8] nfsv4: Implement posix listxattr Aneesh Kumar K.V
2009-09-02 12:24 ` [RFC PATCH 7/8] nfsv4: Implement getfacl Aneesh Kumar K.V
2009-09-02 12:24 ` [RFC PATCH 8/8] nfsv4: Implement setfacl Aneesh Kumar K.V
2009-09-02 16:42 ` POSIX ACL support for NFSV4 (using sideband protocol) J. Bruce Fields
2009-09-02 17:49 ` Aneesh Kumar K.V
2009-09-02 18:27 ` J. Bruce Fields
2009-09-03 19:09 ` Andreas Gruenbacher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1251894268-1555-5-git-send-email-aneesh.kumar@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=agruen@suse.de \
--cc=bfields@fieldses.org \
--cc=ffilzlnx@us.ibm.com \
--cc=linux-nfs@vger.kernel.org \
--cc=nfsv4@linux-nfs.org \
--cc=sfrench@us.ibm.com \
--cc=trond.myklebust@netapp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox