From d489e079960897f58a3c2798834d067fa59fcedf Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Wed, 26 Sep 2012 11:21:40 -0400 Subject: [PATCH] --- yaml --- r: 333129 b: refs/heads/master c: f86bbcf85db32596a0484477d1b8042005709049 h: refs/heads/master i: 333127: 5636c672b1a2f2c9781689eb54d05afc3725ea47 v: v3 --- [refs] | 2 +- trunk/fs/nfs/pnfs.c | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 0fd1d457f0c2..529d3f6fd15c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 78e4e05c643768af170e5a4b21712d9a7a26cce5 +refs/heads/master: f86bbcf85db32596a0484477d1b8042005709049 diff --git a/trunk/fs/nfs/pnfs.c b/trunk/fs/nfs/pnfs.c index 498af8779959..df45acaf91f7 100644 --- a/trunk/fs/nfs/pnfs.c +++ b/trunk/fs/nfs/pnfs.c @@ -1027,17 +1027,15 @@ pnfs_update_layout(struct inode *ino, bool first = false; if (!pnfs_enabled_sb(NFS_SERVER(ino))) - return NULL; + goto out; if (pnfs_within_mdsthreshold(ctx, ino, iomode)) - return NULL; + goto out; spin_lock(&ino->i_lock); lo = pnfs_find_alloc_layout(ino, ctx, gfp_flags); - if (lo == NULL) { - dprintk("%s ERROR: can't get pnfs_layout_hdr\n", __func__); + if (lo == NULL) goto out_unlock; - } /* Do we even need to bother with this? */ if (test_bit(NFS_LAYOUT_BULK_RECALL, &lo->plh_flags)) { @@ -1093,8 +1091,14 @@ pnfs_update_layout(struct inode *ino, atomic_dec(&lo->plh_outstanding); pnfs_put_layout_hdr(lo); out: - dprintk("%s end, state 0x%lx lseg %p\n", __func__, - nfsi->layout ? nfsi->layout->plh_flags : -1, lseg); + dprintk("%s: inode %s/%llu pNFS layout segment %s for " + "(%s, offset: %llu, length: %llu)\n", + __func__, ino->i_sb->s_id, + (unsigned long long)NFS_FILEID(ino), + lseg == NULL ? "not found" : "found", + iomode==IOMODE_RW ? "read/write" : "read-only", + (unsigned long long)pos, + (unsigned long long)count); return lseg; out_unlock: spin_unlock(&ino->i_lock);