Re: [PATCH] NFS: move pnfs layouts to nfs_server structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

>  	}
> +	rcu_read_unlock();
>  	spin_unlock(&clp->cl_lock);
> +
>  	list_for_each_entry_safe(lo, tmp,
>  				 &recall_list, plh_bulk_recall) {
>  		ino = lo->plh_inode;
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux