2012-11-26 09:30:18

by Benny Halevy

[permalink] [raw]
Subject: [PATCH] pnfs: improve debug prints in filelayout_set_layoutcommit

Signed-off-by: Benny Halevy <[email protected]>
---
fs/nfs/nfs4filelayout.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 2e45fd9..5b5ce82 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -266,11 +266,16 @@ static int filelayout_read_done_cb(struct rpc_task *task,
struct nfs_pgio_header *hdr = wdata->header;

if (FILELAYOUT_LSEG(hdr->lseg)->commit_through_mds ||
- wdata->res.verf->committed == NFS_FILE_SYNC)
+ wdata->res.verf->committed == NFS_FILE_SYNC) {
+ dprintk("%s inode %lu commit_through_mds %d committed %d\n",
+ __func__, hdr->inode->i_ino,
+ FILELAYOUT_LSEG(hdr->lseg)->commit_through_mds != 0,
+ wdata->res.verf->committed == NFS_FILE_SYNC);
return;
+ }

pnfs_set_layoutcommit(wdata);
- dprintk("%s ionde %lu pls_end_pos %lu\n", __func__, hdr->inode->i_ino,
+ dprintk("%s inode %lu pls_end_pos %lu\n", __func__, hdr->inode->i_ino,
(unsigned long) NFS_I(hdr->inode)->layout->plh_lwb);
}

--
1.7.11.7