From: <andros@netapp.com>
To: <trond.myklebust@netapp.com>
Cc: <linux-nfs@vger.kernel.org>, Andy Adamson <andros@netapp.com>
Subject: [PATCH Version 5 2/5] NFS: Warn when attempting a buffered write or commit with an expired credential
Date: Wed, 14 Aug 2013 11:59:14 -0400 [thread overview]
Message-ID: <1376495957-7482-3-git-send-email-andros@netapp.com> (raw)
In-Reply-To: <1376495957-7482-1-git-send-email-andros@netapp.com>
From: Andy Adamson <andros@netapp.com>
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/write.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index f1bdb72..7b7d360 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1330,6 +1330,14 @@ void nfs_writeback_done(struct rpc_task *task, struct nfs_write_data *data)
dprintk("NFS: %5u nfs_writeback_done (status %d)\n",
task->tk_pid, task->tk_status);
+ if (task->tk_status == -EKEYEXPIRED)
+ pr_warn_ratelimited("NFS: write attempt with expired "
+ "credential req %s/%lld, %u bytes @ offset %llu\n",
+ inode->i_sb->s_id,
+ (long long)NFS_FILEID(inode),
+ data->args.count,
+ (unsigned long long)data->args.offset);
+
/*
* ->write_done will attempt to use post-op attributes to detect
* conflicting writes by other clients. A strict interpretation
@@ -1556,6 +1564,9 @@ static void nfs_commit_done(struct rpc_task *task, void *calldata)
dprintk("NFS: %5u nfs_commit_done (status %d)\n",
task->tk_pid, task->tk_status);
+ if (task->tk_status == -EKEYEXPIRED)
+ pr_warn_ratelimited("NFS: commit attempt with expired "
+ "credential\n");
/* Call the NFS version-specific code */
NFS_PROTO(data->inode)->commit_done(task, data);
--
1.8.3.1
next prev parent reply other threads:[~2013-08-14 15:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-14 15:59 [PATCH Version 5 0/5] Avoid expired credential keys for buffered writes andros
2013-08-14 15:59 ` [PATCH Version 5 1/5] SUNRPC: don't map EKEYEXPIRED to EACCES in call_refreshresult andros
2013-09-03 16:07 ` Myklebust, Trond
2013-08-14 15:59 ` andros [this message]
2013-09-03 16:10 ` [PATCH Version 5 2/5] NFS: Warn when attempting a buffered write or commit with an expired credential Myklebust, Trond
2013-08-14 15:59 ` [PATCH Version 5 3/5] SUNRPC new rpc_credops to test credential expiry andros
2013-09-03 16:12 ` Myklebust, Trond
2013-08-14 15:59 ` [PATCH Version 5 4/5] NFS avoid expired credential keys for buffered writes andros
2013-09-03 16:14 ` Myklebust, Trond
2013-08-14 15:59 ` [PATCH Version 5 5/5] SUNRPC refactor rpcauth_checkverf error returns andros
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=1376495957-7482-3-git-send-email-andros@netapp.com \
--to=andros@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).