linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benny Halevy <bhalevy@panasas.com>
To: Dros Adamson <dros@netapp.com>
Cc: trond@netapp.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH] NFS: move pnfs layouts to nfs_server structure
Date: Fri, 29 Apr 2011 10:08:00 +0300	[thread overview]
Message-ID: <4DBA63D0.6060104@panasas.com> (raw)
In-Reply-To: <77373F14-888D-4817-9388-44DE4CD16607@netapp.com>

On 2011-04-28 21:21, Dros Adamson wrote:
> 
> On Apr 28, 2011, at 12:16 AM, Benny Halevy wrote:
> 
>> On 2011-04-28 01:40, Weston Andros Adamson wrote:
>> ...
>>
>>> @@ -167,18 +176,27 @@ static u32 initiate_bulk_draining(struct nfs_client *clp,
>>> 	};
>>>
>>> 	spin_lock(&clp->cl_lock);
>>> -	list_for_each_entry(lo, &clp->cl_layouts, plh_layouts) {
>>> +	rcu_read_lock();
>>> +	list_for_each_entry_rcu(server, &clp->cl_superblocks, client_link) {
>>> 		if ((args->cbl_recall_type == RETURN_FSID) &&
>>> -		    memcmp(&NFS_SERVER(lo->plh_inode)->fsid,
>>> -			   &args->cbl_fsid, sizeof(struct nfs_fsid)))
>>> -			continue;
>>> -		if (!igrab(lo->plh_inode))
>>> +		    memcmp(&server->fsid, &args->cbl_fsid,
>>> +			   sizeof(struct nfs_fsid)))
>>> 			continue;
>>> -		get_layout_hdr(lo);
>>> -		BUG_ON(!list_empty(&lo->plh_bulk_recall));
>>> -		list_add(&lo->plh_bulk_recall, &recall_list);
>>> +
>>> +		list_for_each_entry(lo, &server->layouts, plh_layouts) {
>>> +			if (!igrab(lo->plh_inode))
>>> +				continue;
>>> +			get_layout_hdr(lo);
>>> +			BUG_ON(!list_empty(&lo->plh_bulk_recall));
>>> +			list_add(&lo->plh_bulk_recall, &recall_list);
>>> +		}
>>> +
>>> +		if (args->cbl_recall_type == RETURN_FSID)
>>> +			break;
>>
>> I actually thought of suggesting that yesterday but
>> I'm not sure fsid is unique per nfs_server.  Is it?
>>
>> Benny
> 
> Ah!  I incorrectly assumed that fsids are unique.  client.c:nfs_clone_server() proves otherwise.
> 
> Thanks!

NP. I'm glad we caught that in time :)

Benny

> 
> -dros
> 
> 


  reply	other threads:[~2011-04-29  7:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27 22:40 [PATCH] NFS: move pnfs layouts to nfs_server structure Weston Andros Adamson
2011-04-27 22:40 ` Weston Andros Adamson
2011-04-28  4:16   ` Benny Halevy
2011-04-28 18:21     ` Dros Adamson
2011-04-29  7:08       ` Benny Halevy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-04-28 19:50 Weston Andros Adamson
2011-04-27 18:53 Weston Andros Adamson
2011-04-27 18:53 ` Weston Andros Adamson
2011-04-27 16:44 Weston Andros Adamson
2011-04-27 18:00 ` Trond Myklebust
2011-04-27 18:51 ` Benny Halevy
2011-04-27 18:56   ` Dros Adamson
2011-04-27 20:31     ` Benny Halevy
2011-04-27 22:38       ` Dros Adamson

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=4DBA63D0.6060104@panasas.com \
    --to=bhalevy@panasas.com \
    --cc=dros@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond@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).