linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Jeff Layton <jlayton@primarydata.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH v2 4/5] nfsd: remove redundant boot_time parm from grace_done client tracking op
Date: Thu, 4 Sep 2014 15:54:43 -0400	[thread overview]
Message-ID: <20140904195443.GC14576@fieldses.org> (raw)
In-Reply-To: <1408473509-14010-5-git-send-email-jlayton@primarydata.com>

On Tue, Aug 19, 2014 at 02:38:28PM -0400, Jeff Layton wrote:
> Since it's stored in nfsd_net, we don't need to pass it in separately.

OK.  I may as well take this for 3.18 now, I guess.

--b.

> 
> Signed-off-by: Jeff Layton <jlayton@primarydata.com>
> ---
>  fs/nfsd/nfs4recover.c | 17 ++++++++---------
>  fs/nfsd/nfs4state.c   |  2 +-
>  fs/nfsd/state.h       |  2 +-
>  3 files changed, 10 insertions(+), 11 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
> index 9c271f42604a..a0d2ba956a3f 100644
> --- a/fs/nfsd/nfs4recover.c
> +++ b/fs/nfsd/nfs4recover.c
> @@ -58,7 +58,7 @@ struct nfsd4_client_tracking_ops {
>  	void (*create)(struct nfs4_client *);
>  	void (*remove)(struct nfs4_client *);
>  	int (*check)(struct nfs4_client *);
> -	void (*grace_done)(struct nfsd_net *, time_t);
> +	void (*grace_done)(struct nfsd_net *);
>  };
>  
>  /* Globals */
> @@ -392,7 +392,7 @@ purge_old(struct dentry *parent, struct dentry *child, struct nfsd_net *nn)
>  }
>  
>  static void
> -nfsd4_recdir_purge_old(struct nfsd_net *nn, time_t boot_time)
> +nfsd4_recdir_purge_old(struct nfsd_net *nn)
>  {
>  	int status;
>  
> @@ -1016,7 +1016,7 @@ nfsd4_cld_check(struct nfs4_client *clp)
>  }
>  
>  static void
> -nfsd4_cld_grace_done(struct nfsd_net *nn, time_t boot_time)
> +nfsd4_cld_grace_done(struct nfsd_net *nn)
>  {
>  	int ret;
>  	struct cld_upcall *cup;
> @@ -1029,7 +1029,7 @@ nfsd4_cld_grace_done(struct nfsd_net *nn, time_t boot_time)
>  	}
>  
>  	cup->cu_msg.cm_cmd = Cld_GraceDone;
> -	cup->cu_msg.cm_u.cm_gracetime = (int64_t)boot_time;
> +	cup->cu_msg.cm_u.cm_gracetime = (int64_t)nn->boot_time;
>  	ret = cld_pipe_upcall(cn->cn_pipe, &cup->cu_msg);
>  	if (!ret)
>  		ret = cup->cu_msg.cm_status;
> @@ -1245,13 +1245,12 @@ nfsd4_umh_cltrack_check(struct nfs4_client *clp)
>  }
>  
>  static void
> -nfsd4_umh_cltrack_grace_done(struct nfsd_net __attribute__((unused)) *nn,
> -				time_t boot_time)
> +nfsd4_umh_cltrack_grace_done(struct nfsd_net *nn)
>  {
>  	char *legacy;
>  	char timestr[22]; /* FIXME: better way to determine max size? */
>  
> -	sprintf(timestr, "%ld", boot_time);
> +	sprintf(timestr, "%ld", nn->boot_time);
>  	legacy = nfsd4_cltrack_legacy_topdir();
>  	nfsd4_umh_cltrack_upcall("gracedone", timestr, legacy);
>  	kfree(legacy);
> @@ -1356,10 +1355,10 @@ nfsd4_client_record_check(struct nfs4_client *clp)
>  }
>  
>  void
> -nfsd4_record_grace_done(struct nfsd_net *nn, time_t boot_time)
> +nfsd4_record_grace_done(struct nfsd_net *nn)
>  {
>  	if (nn->client_tracking_ops)
> -		nn->client_tracking_ops->grace_done(nn, boot_time);
> +		nn->client_tracking_ops->grace_done(nn);
>  }
>  
>  static int
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index 711280e0e4ac..21becb29dae1 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -4116,7 +4116,7 @@ nfsd4_end_grace(struct nfsd_net *nn)
>  
>  	dprintk("NFSD: end of grace period\n");
>  	nn->grace_ended = true;
> -	nfsd4_record_grace_done(nn, nn->boot_time);
> +	nfsd4_record_grace_done(nn);
>  	locks_end_grace(&nn->nfsd4_manager);
>  	/*
>  	 * Now that every NFSv4 client has had the chance to recover and
> diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
> index ecf579904892..854f0c574ccf 100644
> --- a/fs/nfsd/state.h
> +++ b/fs/nfsd/state.h
> @@ -554,7 +554,7 @@ extern void nfsd4_client_tracking_exit(struct net *net);
>  extern void nfsd4_client_record_create(struct nfs4_client *clp);
>  extern void nfsd4_client_record_remove(struct nfs4_client *clp);
>  extern int nfsd4_client_record_check(struct nfs4_client *clp);
> -extern void nfsd4_record_grace_done(struct nfsd_net *nn, time_t boot_time);
> +extern void nfsd4_record_grace_done(struct nfsd_net *nn);
>  
>  /* nfs fault injection functions */
>  #ifdef CONFIG_NFSD_FAULT_INJECTION
> -- 
> 1.9.3
> 

  reply	other threads:[~2014-09-04 19:54 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-19 18:38 [PATCH v2 0/5] nfsd: support for lifting grace period early Jeff Layton
2014-08-19 18:38 ` [PATCH v2 1/5] lockd: move lockd's grace period handling into its own module Jeff Layton
2014-08-28 20:01   ` J. Bruce Fields
2014-08-28 20:24     ` J. Bruce Fields
2014-08-28 23:53       ` Jeff Layton
2014-09-03 21:54         ` J. Bruce Fields
2014-09-15 22:08       ` J. Bruce Fields
2014-09-15 22:09         ` J. Bruce Fields
2014-09-15 22:10           ` J. Bruce Fields
2014-09-15 23:19           ` Jeff Layton
2014-09-16  0:19             ` J. Bruce Fields
2014-09-15 23:11         ` Jeff Layton
2014-08-19 18:38 ` [PATCH v2 2/5] lockd: add a /proc/fs/lockd/nlm_end_grace file Jeff Layton
2014-09-04 19:52   ` J. Bruce Fields
2014-08-19 18:38 ` [PATCH v2 3/5] nfsd: add a v4_end_grace file to /proc/fs/nfsd Jeff Layton
2014-09-04 19:54   ` J. Bruce Fields
2014-09-05 11:40     ` Jeff Layton
2014-08-19 18:38 ` [PATCH v2 4/5] nfsd: remove redundant boot_time parm from grace_done client tracking op Jeff Layton
2014-09-04 19:54   ` J. Bruce Fields [this message]
2014-08-19 18:38 ` [PATCH v2 5/5] nfsd: pass extra info in env vars to upcalls to allow for early grace period end Jeff Layton
2014-09-04 19:59   ` J. Bruce Fields
2014-09-05 11:43     ` Jeff Layton
2014-09-05 15:58       ` J. Bruce Fields
2014-09-26 18:39 ` [PATCH v2 0/5] nfsd: support for lifting grace period early J. Bruce Fields
2014-09-26 18:54   ` Jeff Layton
2014-09-26 19:46     ` J. Bruce Fields
2014-09-26 20:37       ` Trond Myklebust
2014-09-26 20:45         ` J. Bruce Fields
2014-09-26 20:58           ` Trond Myklebust
2014-09-26 21:47             ` J. Bruce Fields
2014-09-26 22:17               ` Trond Myklebust
2014-09-26 22:35                 ` Trond Myklebust
2014-09-27 13:04       ` Jeff Layton
2014-09-29 16:44         ` J. Bruce Fields
2014-09-29 16:53           ` Trond Myklebust
2014-09-29 17:11           ` Jeff Layton
2014-09-29 17:55             ` 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=20140904195443.GC14576@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=jlayton@primarydata.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).