public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: andros@netapp.com
To: pnfs@linux-nfs.org
Cc: linux-nfs@vger.kernel.org, Andy Adamson <andros@netapp.com>
Subject: [PATCH 07/14] SQUASHME pnfs_submit: change get_device_info parameter
Date: Thu,  8 Apr 2010 15:54:03 -0400	[thread overview]
Message-ID: <1270756450-5570-8-git-send-email-andros@netapp.com> (raw)
In-Reply-To: <1270756450-5570-7-git-send-email-andros@netapp.com>

From: Andy Adamson <andros@netapp.com>

In preparation to use the generic deviceid cache.

Signed-off-by: Andy Adamson <andros@netapp.com>
---
 fs/nfs/nfs4filelayout.c    |    2 +-
 fs/nfs/nfs4filelayout.h    |    2 +-
 fs/nfs/nfs4filelayoutdev.c |    9 ++++-----
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 20b3ae2..f222c3b 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -399,7 +399,7 @@ filelayout_check_layout(struct pnfs_layout_type *lo,
 	dsaddr = nfs4_pnfs_device_item_find(FILE_MT(PNFS_INODE(lo))->hlist,
 					     &fl->dev_id);
 	if (dsaddr == NULL) {
-		dsaddr = get_device_info(FILE_MT(PNFS_INODE(lo)), &fl->dev_id);
+		dsaddr = get_device_info(PNFS_INODE(lo), &fl->dev_id);
 		if (dsaddr == NULL) {
 			dprintk("%s NO device for dev_id %s\n",
 				__func__, deviceid_fmt(&fl->dev_id));
diff --git a/fs/nfs/nfs4filelayout.h b/fs/nfs/nfs4filelayout.h
index 04cca7e..560f7f6 100644
--- a/fs/nfs/nfs4filelayout.h
+++ b/fs/nfs/nfs4filelayout.h
@@ -109,6 +109,6 @@ struct nfs4_file_layout_dsaddr *
 nfs4_pnfs_device_item_find(struct nfs4_pnfs_dev_hlist *hlist,
 			   struct pnfs_deviceid *dev_id);
 struct nfs4_file_layout_dsaddr *
-get_device_info(struct filelayout_mount_type *mt, struct pnfs_deviceid *dev_id);
+get_device_info(struct inode *inode, struct pnfs_deviceid *dev_id);
 
 #endif /* FS_NFS_NFS4FILELAYOUT_H */
diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c
index db6817d..9844a9c 100644
--- a/fs/nfs/nfs4filelayoutdev.c
+++ b/fs/nfs/nfs4filelayoutdev.c
@@ -623,8 +623,7 @@ decode_and_add_device(struct filelayout_mount_type *mt, struct pnfs_device *dev)
  * of available devices, and return it.
  */
 struct nfs4_file_layout_dsaddr *
-get_device_info(struct filelayout_mount_type *mt,
-		struct pnfs_deviceid *dev_id)
+get_device_info(struct inode *inode, struct pnfs_deviceid *dev_id)
 {
 	struct pnfs_device *pdev = NULL;
 	int maxpages = NFS4_GETDEVINFO_MAXSIZE >> PAGE_SHIFT;
@@ -632,7 +631,7 @@ get_device_info(struct filelayout_mount_type *mt,
 	struct nfs4_file_layout_dsaddr *dsaddr = NULL;
 	int rc, i, j, minpages = 1;
 
-	dprintk("%s mt %p\n", __func__, mt);
+	dprintk("%s \n", __func__);
 	pdev = kzalloc(sizeof(struct pnfs_device), GFP_KERNEL);
 	if (pdev == NULL)
 		return NULL;
@@ -664,7 +663,7 @@ retry_once:
 	/* TODO: Update types when CB_NOTIFY_DEVICEID is available */
 	pdev->dev_notify_types = 0;
 
-	rc = pnfs_callback_ops->nfs_getdeviceinfo(mt->fl_sb, pdev);
+	rc = pnfs_callback_ops->nfs_getdeviceinfo(inode->i_sb, pdev);
 	/* Retry once with the returned mincount if a page was too small */
 	dprintk("%s getdevice info returns %d minpages %d\n", __func__, rc,
 		minpages);
@@ -682,7 +681,7 @@ retry_once:
 	/* Found new device, need to decode it and then add it to the
 	 * list of known devices for this mountpoint.
 	 */
-	dsaddr = decode_and_add_device(mt, pdev);
+	dsaddr = decode_and_add_device(FILE_MT(inode), pdev);
 out_free:
 	if (minpages > 1 && pdev->area != NULL)
 		vunmap(pdev->area);
-- 
1.6.6


  reply	other threads:[~2010-04-08 19:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-08 19:53 [PATCH 0/14] pnfs_submit file layout client device management andros
2010-04-08 19:53 ` [PATCH 01/14] SQUASHME: pnfs_submit: remove unused getdevicelist functions andros
2010-04-08 19:53   ` [PATCH 02/14] SQUASHME pnfs-submit: call get_device_info from filelayout_check andros
2010-04-08 19:53     ` [PATCH 03/14] SQUASHME pnfs_submit: remove multilist4 caching andros
2010-04-08 19:54       ` [PATCH 04/14] SQUASHME pnfs_submit: wait for I/O for data server connect andros
2010-04-08 19:54         ` [PATCH 05/14] SQUASHME pnfs_submit: remove xdr macros andros
2010-04-08 19:54           ` [PATCH 06/14] SQUASHME pnfs_submit: remove unused nfs4_pnfs_device_put andros
2010-04-08 19:54             ` andros [this message]
2010-04-08 19:54               ` [PATCH 08/14] SQUASHME pnfs_submit: change decode_and_add_device parameter andros
2010-04-08 19:54                 ` [PATCH 09/14] SQUASHME pnfs_submit: change decode_device parameter andros
2010-04-08 19:54                   ` [PATCH 10/14] SQUASHME pnfs_submit: change decode_and_add_ds parameter andros
2010-04-08 19:54                     ` [PATCH 11/14] SQUASHME pnfs_submit: change nfs4_pnfs_ds_add parameter andros
2010-04-08 19:54                       ` [PATCH 12/14] SQUASHME pnfs_submit: remove filelayout CB_NOTIFY_DEVICE support andros
2010-04-08 19:54                         ` [PATCH 13/14] SQUASHME pnfs_submit: stand alone data server cache andros
2010-04-08 19:54                           ` [PATCH 14/14] SQUASHME pnfs_submit: remove kfree from under spinlock andros
2010-04-12 13:24                         ` [pnfs] [PATCH 12/14] SQUASHME pnfs_submit: remove filelayout CB_NOTIFY_DEVICE support Benny Halevy
2010-04-12 13:17               ` [pnfs] [PATCH 07/14] SQUASHME pnfs_submit: change get_device_info parameter Benny Halevy
2010-04-12 13:13     ` [pnfs] [PATCH 02/14] SQUASHME pnfs-submit: call get_device_info from filelayout_check Benny Halevy
2010-04-12 12:12 ` [pnfs] [PATCH 0/14] pnfs_submit file layout client device management J. Bruce Fields
2010-04-12 19:03 ` Benny Halevy

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=1270756450-5570-8-git-send-email-andros@netapp.com \
    --to=andros@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=pnfs@linux-nfs.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