[pnfs] [Re: [PATCH 1/5] pnfs: Several non-critical fixups.]

Dean Hildebrand seattleplus at gmail.com
Tue May 6 20:03:41 EDT 2008


Sorry, I made an error, there are only 4 patches (not 5 as the subject 
indicates)
Dean





Signed-off-by: Dean Hildebrand <dhildeb at us.ibm.com>
---
 fs/nfs/nfs4filelayout.c    |   12 +++++-------
 fs/nfs/nfs4filelayoutdev.c |    7 ++++---
 fs/nfs/nfs4proc.c          |    2 +-
 fs/nfs/pagelist.c          |    2 +-
 fs/nfs/pnfs.c              |    6 +++---
 5 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index a55d54e..4f4748b 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -301,9 +301,6 @@ static int filelayout_read_pagelist(

             /* In the case of aync reads, the offset will be reset in the
              * call_ops->rpc_call_done() routine.
-             *
-             * In the case of aync writes, the offset will be reset in the
-             * call_ops->rpc_call_done() routine
              */
             status = 0;

@@ -574,8 +571,8 @@ filelayout_free_layout(struct pnfs_layout_type
*layoutid)
  */
 static void
 filelayout_set_layout(struct nfs4_filelayout *flo,
-                                    struct nfs4_filelayout_segment *fl,
-                                    struct nfs4_pnfs_layoutget_res *lgr)
+                              struct nfs4_filelayout_segment *fl,
+                              struct nfs4_pnfs_layoutget_res *lgr)
 {
             int i;
             uint32_t *p = (uint32_t *)lgr->layout.buf;
@@ -605,8 +602,9 @@ filelayout_set_layout(struct nfs4_filelayout *flo,
             READ64(fl->pattern_offset);
             READ32(fl->num_fh);

-            dprintk("%s: nfl_util 0x%X num_fh %u dev_id %s\n",
-                        __func__, nfl_util, fl->num_fh, deviceid_fmt(&fl->
dev_id));
+            dprintk("%s: nfl_util 0x%X num_fh %u fsi %u po %llu dev_id %s
\n",
+                        __func__, nfl_util, fl->num_fh, fl->
first_stripe_index,
+                        fl->pattern_offset, deviceid_fmt(&fl->dev_id));

             for (i = 0; i < fl->num_fh; i++) {
                         /* fh */
diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c
index aee5425..d5fc9a6 100644
--- a/fs/nfs/nfs4filelayoutdev.c
+++ b/fs/nfs/nfs4filelayoutdev.c
@@ -499,10 +499,11 @@ decode_and_add_ds(uint32_t **pp, struct
filelayout_mount_type *mt)
              */
             if (!ds->ds_clp) {
                         err = nfs4_pnfs_ds_create(mds_srv, ds);
-                        printk(KERN_ERR
-                               "%s nfs4_pnfs_ds_create returned %d\n",
__func__, err);
-                        if (err)
+                        if (err) {
+                                    printk(KERN_ERR "%s
nfs4_pnfs_ds_create error %d\n",
+                                           __func__, err);
                                     goto out_err;
+                        }
             }

             /* adding ds to stripe */
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index cd1eee8..a68dbca 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3032,7 +3032,7 @@ static int pnfs4_write_done(struct rpc_task *task,
struct nfs_write_data *data)

             /* Is this a DS session */
             if (data->ds_nfs_client) {
-                        dprintk("%s DS read\n", __func__);
+                        dprintk("%s DS write\n", __func__);
                         session = data->ds_nfs_client->cl_ds_session;
                         client = NULL; /* do not update mds lease...*/
             }
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index 04f9fd6..b99fa0a 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -265,7 +265,7 @@ static int nfs_can_coalesce_requests(struct nfs_page
*prev,
             if (prev->wb_pgbase + prev->wb_bytes != PAGE_CACHE_SIZE)
                         return 0;
 #ifdef CONFIG_PNFS
-            if (pgio->pg_test && (pgio->pg_test(pgio, prev, req) == 0))
+            if (pgio->pg_test && !pgio->pg_test(pgio, prev, req))
                         return 0;
 #endif /* CONFIG_PNFS */
             return 1;
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 41950df..a17d2ba 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -517,7 +517,7 @@ pnfs_free_layout(struct pnfs_layout_type *lo,
                          struct nfs4_pnfs_layout_segment *range)
 {
             struct pnfs_layout_segment *lseg, *next;
-            dprintk("%s:Begin lo %p offset %llu length %lld iomode %d\n",
+            dprintk("%s:Begin lo %p offset %llu length %llu iomode %d\n",
                         __func__, lo, range->offset, range->length,
range->iomode);

             BUG_ON_UNLOCKED_LO(lo);
@@ -525,7 +525,7 @@ pnfs_free_layout(struct pnfs_layout_type *lo,
                         if (!free_matching_lseg(lseg, range))
                                     continue;
                         dprintk("%s: freeing lseg %p iomode %d "
-                                    "offset %llu length %lld\n", __func__,
+                                    "offset %llu length %llu\n", __func__,
                                     lseg, lseg->range.iomode, lseg->
range.offset,
                                     lseg->range.length);
                         list_del(&lseg->fi_list);
@@ -1184,7 +1184,7 @@ pnfs_update_layout_commit(struct inode *inode,
             struct nfs_page *nfs_page = nfs_list_entry(head->next);
             int status;

-            dprintk("--> %s inode %p layout range: %Zd@%Lu\n", __func__,
inode,
+            dprintk("--> %s inode %p layout range: %Zd@%Zu\n", __func__,
inode,
                                                 (size_t)(npages *
PAGE_SIZE),
                                                 (loff_t)idx_start *
PAGE_SIZE);

--
1.5.3.3






More information about the pNFS mailing list