From: "J. Bruce Fields" <bfields@redhat.com>
To: linux-nfs@vger.kernel.org
Cc: "J. Bruce Fields" <bfields@redhat.com>
Subject: [PATCH 2/4] nfsd4: be forgiving in the absence of the recovery directory
Date: Tue, 3 Jan 2012 17:56:19 -0500 [thread overview]
Message-ID: <1325631381-9231-3-git-send-email-bfields@redhat.com> (raw)
In-Reply-To: <1325631381-9231-1-git-send-email-bfields@redhat.com>
From: "J. Bruce Fields" <bfields@redhat.com>
If the recovery directory doesn't exist, then behavior after a reboot
will be suboptimal. But it's unnecessarily harsh to then prevent the
nfsv4 server from working at all. Instead just print a warning
(already done in nfsd4_init_recdir()) and soldier on.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
fs/nfsd/nfs4recover.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
index 28712e2..eb01fff 100644
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@ -127,10 +127,11 @@ nfsd4_create_clid_dir(struct nfs4_client *clp)
dprintk("NFSD: nfsd4_create_clid_dir for \"%s\"\n", dname);
- if (!rec_file || clp->cl_firststate)
+ if (clp->cl_firststate)
return 0;
-
clp->cl_firststate = 1;
+ if (!rec_file)
+ return -ENOENT;
status = nfs4_save_creds(&original_cred);
if (status < 0)
return status;
--
1.7.5.4
next prev parent reply other threads:[~2012-01-03 22:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-03 22:56 3.3 nfsd fixes J. Bruce Fields
2012-01-03 22:56 ` [PATCH 1/4] nfsd4: fix spurious 4.1 post-reboot failures J. Bruce Fields
2012-01-03 22:56 ` J. Bruce Fields [this message]
2012-01-03 22:56 ` [PATCH 3/4] svcrpc: fix double-free on shutdown of nfsd after changing pool mode J. Bruce Fields
2012-01-03 22:57 ` J. Bruce Fields
2012-01-03 22:56 ` [PATCH 4/4] svcrpc: don't revert to SVC_POOL_DEFAULT on nfsd shutdown J. Bruce Fields
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=1325631381-9231-3-git-send-email-bfields@redhat.com \
--to=bfields@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/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).