From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Alexandros Batsakis <batsakis@netapp.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 05/10] nfs4: return/expire delegations depending on their type
Date: Mon, 23 Nov 2009 18:07:03 -0500 [thread overview]
Message-ID: <1259017623.8700.102.camel@localhost> (raw)
In-Reply-To: <1259013287-3349-5-git-send-email-batsakis@netapp.com>
On Mon, 2009-11-23 at 13:54 -0800, Alexandros Batsakis wrote:
> Signed-off-by: Alexandros Batsakis <batsakis@netapp.com>
> ---
> fs/nfs/delegation.c | 20 ++++++++++++++++----
> 1 files changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
> index 71d5094..a14df44 100644
> --- a/fs/nfs/delegation.c
> +++ b/fs/nfs/delegation.c
> @@ -371,29 +371,41 @@ void nfs_super_return_all_delegations(struct super_block *sb)
> nfs_client_return_marked_delegations(clp);
> }
>
> -static void nfs_client_mark_return_all_delegations(struct nfs_client *clp)
> +static
> +void nfs_client_mark_return_all_delegation_types(struct nfs_client *clp, fmode_t flags)
> {
> struct nfs_delegation *delegation;
>
> rcu_read_lock();
> list_for_each_entry_rcu(delegation, &clp->cl_delegations, super_list) {
> - nfs_mark_return_delegation(clp, delegation);
> + if (delegation->type & flags)
> + nfs_mark_return_delegation(clp, delegation);
This will be confusing. In all other parts of the code, we label write
delegations as FMODE_READ|FMODE_WRITE, since a write delegation implies
a read delegation too.
> }
> rcu_read_unlock();
> }
>
> +static void nfs_client_mark_return_all_delegations(struct nfs_client *clp)
> +{
> + nfs_client_mark_return_all_delegation_types(clp, FMODE_READ|FMODE_WRITE);
> +}
> +
> static void nfs_delegation_run_state_manager(struct nfs_client *clp)
> {
> if (test_bit(NFS4CLNT_DELEGRETURN, &clp->cl_state))
> nfs4_schedule_state_manager(clp);
> }
>
> -void nfs_expire_all_delegations(struct nfs_client *clp)
> +void nfs_expire_all_delegation_types(struct nfs_client *clp, fmode_t flags)
Should be static void since there is no declaration of
nfs_expire_all_delegation types in any header files (that only appears
in patch 07/10).
> {
> - nfs_client_mark_return_all_delegations(clp);
> + nfs_client_mark_return_all_delegation_types(clp, flags);
> nfs_delegation_run_state_manager(clp);
> }
>
> +void nfs_expire_all_delegations(struct nfs_client *clp)
> +{
> + nfs_expire_all_delegation_types(clp, FMODE_READ|FMODE_WRITE);
> +}
> +
> /*
> * Return all delegations following an NFS4ERR_CB_PATH_DOWN error.
> */
next prev parent reply other threads:[~2009-11-23 23:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-23 21:54 [PATCH 01/10] nfs41: adjust max_rqst_sz, max_resp_sz w.r.t to rsize, wsize Alexandros Batsakis
2009-11-23 21:54 ` [PATCH 02/10] nfs41: add support for callback with RPC version number 4 Alexandros Batsakis
2009-11-23 21:54 ` [PATCH 03/10] nfs41: fix cb_recall bug Alexandros Batsakis
2009-11-23 21:54 ` [PATCH 04/10] nfs4: minor delegation cleaning Alexandros Batsakis
2009-11-23 21:54 ` [PATCH 05/10] nfs4: return/expire delegations depending on their type Alexandros Batsakis
2009-11-23 21:54 ` [PATCH 06/10] nfs41: initial support for CB_RECALL_ANY Alexandros Batsakis
2009-11-23 21:54 ` [PATCH 07/10] nfs41: check if session exists and if it is persistent Alexandros Batsakis
2009-11-23 21:54 ` [PATCH 08/10] nfs41: add support for the exclusive create flags Alexandros Batsakis
2009-11-23 21:54 ` [PATCH 09/10] nfs41: remove server-only EXCHGID4_FLAG_CONFIRMED_R flag from exchange_id Alexandros Batsakis
2009-11-23 21:54 ` [PATCH 10/10] nfs41: check SEQUENCE status flag Alexandros Batsakis
2009-11-23 23:07 ` Trond Myklebust [this message]
2009-11-23 23:16 ` [PATCH 03/10] nfs41: fix cb_recall bug Trond Myklebust
2009-11-23 22:06 ` [PATCH 01/10] nfs41: adjust max_rqst_sz, max_resp_sz w.r.t to rsize, wsize Peter Staubach
2009-11-23 22:57 ` Trond Myklebust
2009-11-23 23:14 ` Batsakis, Alexandros
2009-11-24 19:10 ` Peter Staubach
2009-11-24 20:39 ` 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=1259017623.8700.102.camel@localhost \
--to=trond.myklebust@fys.uio.no \
--cc=batsakis@netapp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.