NFSv4: Add tracepoints for debugging inode manipulations
Set up basic tracepoints for debugging NFSv4 setattr, access, readlink, readdir, get_acl set_acl get_security_label, and set_security_label. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
@@ -2315,6 +2315,7 @@ static int nfs4_do_setattr(struct inode *inode, struct rpc_cred *cred,
|
||||
int err;
|
||||
do {
|
||||
err = _nfs4_do_setattr(inode, cred, fattr, sattr, state, ilabel, olabel);
|
||||
trace_nfs4_setattr(inode, err);
|
||||
switch (err) {
|
||||
case -NFS4ERR_OPENMODE:
|
||||
if (!(sattr->ia_valid & ATTR_SIZE)) {
|
||||
@@ -3143,8 +3144,9 @@ static int nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry)
|
||||
struct nfs4_exception exception = { };
|
||||
int err;
|
||||
do {
|
||||
err = nfs4_handle_exception(NFS_SERVER(inode),
|
||||
_nfs4_proc_access(inode, entry),
|
||||
err = _nfs4_proc_access(inode, entry);
|
||||
trace_nfs4_access(inode, err);
|
||||
err = nfs4_handle_exception(NFS_SERVER(inode), err,
|
||||
&exception);
|
||||
} while (exception.retry);
|
||||
return err;
|
||||
@@ -3197,8 +3199,9 @@ static int nfs4_proc_readlink(struct inode *inode, struct page *page,
|
||||
struct nfs4_exception exception = { };
|
||||
int err;
|
||||
do {
|
||||
err = nfs4_handle_exception(NFS_SERVER(inode),
|
||||
_nfs4_proc_readlink(inode, page, pgbase, pglen),
|
||||
err = _nfs4_proc_readlink(inode, page, pgbase, pglen);
|
||||
trace_nfs4_readlink(inode, err);
|
||||
err = nfs4_handle_exception(NFS_SERVER(inode), err,
|
||||
&exception);
|
||||
} while (exception.retry);
|
||||
return err;
|
||||
@@ -3630,9 +3633,10 @@ static int nfs4_proc_readdir(struct dentry *dentry, struct rpc_cred *cred,
|
||||
struct nfs4_exception exception = { };
|
||||
int err;
|
||||
do {
|
||||
err = nfs4_handle_exception(NFS_SERVER(dentry->d_inode),
|
||||
_nfs4_proc_readdir(dentry, cred, cookie,
|
||||
pages, count, plus),
|
||||
err = _nfs4_proc_readdir(dentry, cred, cookie,
|
||||
pages, count, plus);
|
||||
trace_nfs4_readdir(dentry->d_inode, err);
|
||||
err = nfs4_handle_exception(NFS_SERVER(dentry->d_inode), err,
|
||||
&exception);
|
||||
} while (exception.retry);
|
||||
return err;
|
||||
@@ -4333,6 +4337,7 @@ static ssize_t nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t bufl
|
||||
ssize_t ret;
|
||||
do {
|
||||
ret = __nfs4_get_acl_uncached(inode, buf, buflen);
|
||||
trace_nfs4_get_acl(inode, ret);
|
||||
if (ret >= 0)
|
||||
break;
|
||||
ret = nfs4_handle_exception(NFS_SERVER(inode), ret, &exception);
|
||||
@@ -4412,8 +4417,9 @@ static int nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t buflen
|
||||
struct nfs4_exception exception = { };
|
||||
int err;
|
||||
do {
|
||||
err = nfs4_handle_exception(NFS_SERVER(inode),
|
||||
__nfs4_proc_set_acl(inode, buf, buflen),
|
||||
err = __nfs4_proc_set_acl(inode, buf, buflen);
|
||||
trace_nfs4_set_acl(inode, err);
|
||||
err = nfs4_handle_exception(NFS_SERVER(inode), err,
|
||||
&exception);
|
||||
} while (exception.retry);
|
||||
return err;
|
||||
@@ -4466,8 +4472,9 @@ static int nfs4_get_security_label(struct inode *inode, void *buf,
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
do {
|
||||
err = nfs4_handle_exception(NFS_SERVER(inode),
|
||||
_nfs4_get_security_label(inode, buf, buflen),
|
||||
err = _nfs4_get_security_label(inode, buf, buflen);
|
||||
trace_nfs4_get_security_label(inode, err);
|
||||
err = nfs4_handle_exception(NFS_SERVER(inode), err,
|
||||
&exception);
|
||||
} while (exception.retry);
|
||||
return err;
|
||||
@@ -4519,9 +4526,10 @@ static int nfs4_do_set_security_label(struct inode *inode,
|
||||
int err;
|
||||
|
||||
do {
|
||||
err = nfs4_handle_exception(NFS_SERVER(inode),
|
||||
_nfs4_do_set_security_label(inode, ilabel,
|
||||
fattr, olabel),
|
||||
err = _nfs4_do_set_security_label(inode, ilabel,
|
||||
fattr, olabel);
|
||||
trace_nfs4_set_security_label(inode, err);
|
||||
err = nfs4_handle_exception(NFS_SERVER(inode), err,
|
||||
&exception);
|
||||
} while (exception.retry);
|
||||
return err;
|
||||
|
Reference in New Issue
Block a user