linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Jeff Garzik <jeff@garzik.org>,
	open-osd mailing-list <osd-dev@open-osd.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Cc: Evgeniy Polyakov <zbr@ioremap.net>,
	Marcin Slusarz <marcin.slusarz@gmail.com>
Subject: [PATCH 1/3] [SQUASHME] prints in hex
Date: Wed, 25 Mar 2009 11:47:57 +0200	[thread overview]
Message-ID: <49C9FDCD.5080107@panasas.com> (raw)
In-Reply-To: <49C9FD2E.3030201@panasas.com>

Offsets and length should be printed in HEX for
easier debugging, when they get big.

[This patch will be squashed into: exofs: address_space_operations]

Boaz
---
 fs/exofs/inode.c |   49 +++++++++++++++++++++++++------------------------
 1 files changed, 25 insertions(+), 24 deletions(-)

diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
index 739629a..b77c197 100644
--- a/fs/exofs/inode.c
+++ b/fs/exofs/inode.c
@@ -145,6 +145,7 @@ static int update_read_page(struct page *page, int ret)
 		if (PageError(page))
 			ClearPageError(page);
 		ret = 0; /* recovered error */
+		EXOFS_DBGMSG("recovered read error\n");
 	} else /* Error */
 		SetPageError(page);
 
@@ -181,8 +182,8 @@ static int __readpages_done(struct osd_request *or, struct page_collect *pcol,
 	else
 		good_bytes = pcol->length - resid;
 
-	EXOFS_DBGMSG("readpages_done(%ld) good_bytes=%llx"
-		     " length=%zx nr_pages=%u\n",
+	EXOFS_DBGMSG("readpages_done(0x%lx) good_bytes=0x%llx"
+		     " length=0x%zx nr_pages=%u\n",
 		     pcol->inode->i_ino, _LLU(good_bytes), pcol->length,
 		     pcol->nr_pages);
 
@@ -197,7 +198,7 @@ static int __readpages_done(struct osd_request *or, struct page_collect *pcol,
 			ret = update_read_page(page, (i == 0) ? ret : 0);
 			if (do_unlock)
 				unlock_page(page);
-			EXOFS_DBGMSG("    readpages_done(%ld, %ld)\n",
+			EXOFS_DBGMSG("    readpages_done(0x%lx, 0x%lx)\n",
 				     inode->i_ino, page->index);
 		} else {
 			/* can not happen on single sync_readpage */
@@ -206,8 +207,8 @@ static int __readpages_done(struct osd_request *or, struct page_collect *pcol,
 			/* try a single page read and only then it is
 			 * marked as SetPageError()
 			 */
-			EXOFS_ERR("    readpages_done(%ld, %ld) bad_bytes\n",
-				     inode->i_ino, page->index);
+			EXOFS_ERR("    readpages_done(0x%lx, 0x%lx)"
+				  " bad_bytes\n", inode->i_ino, page->index);
 			_readpage(page, false);
 		}
 
@@ -288,7 +289,7 @@ static int read_exec(struct page_collect *pcol, bool is_sync)
 
 	atomic_inc(&pcol->sbi->s_curr_pending);
 
-	EXOFS_DBGMSG("read_exec obj=%llx start=%llx length=%zx\n",
+	EXOFS_DBGMSG("read_exec obj=0x%llx start=0x%llx length=0x%zx\n",
 		  obj.id, _LLU(i_start), pcol->length);
 
 	/* pages ownership was passed to pcol_copy */
@@ -316,7 +317,7 @@ static int readpage_strip(void *data, struct page *page)
 
 	/* FIXME: Just for debugging, will be removed */
 	if (PageUptodate(page))
-		EXOFS_ERR("PageUptodate(%ld, %ld)\n", pcol->inode->i_ino,
+		EXOFS_ERR("PageUptodate(0x%lx, 0x%lx)\n", pcol->inode->i_ino,
 			  page->index);
 
 	if (page->index < end_index)
@@ -337,8 +338,8 @@ static int readpage_strip(void *data, struct page *page)
 			ClearPageError(page);
 
 		unlock_page(page);
-		EXOFS_DBGMSG("readpage_strip(%ld, %ld) empty page, splitting\n",
-			     inode->i_ino, page->index);
+		EXOFS_DBGMSG("readpage_strip(0x%lx, 0x%lx) empty page,"
+			     " splitting\n", inode->i_ino, page->index);
 
 		return read_exec(pcol, false);
 	}
@@ -365,13 +366,13 @@ try_again:
 	if (len != PAGE_CACHE_SIZE)
 		zero_user(page, len, PAGE_CACHE_SIZE - len);
 
-	EXOFS_DBGMSG("    readpage_strip(%ld, %ld) len=%zx\n", inode->i_ino,
-		  page->index, len);
+	EXOFS_DBGMSG("    readpage_strip(0x%lx, 0x%lx) len=0x%zx\n",
+		     inode->i_ino, page->index, len);
 
 	ret = pcol_add_page(pcol, page, len);
 	if (ret) {
 		EXOFS_DBGMSG("Failed pcol_add_page pages[i]=%p "
-			  "len=%zx nr_pages=%u length=%zx\n",
+			  "this_len=0x%zx nr_pages=%u length=0x%zx\n",
 			  page, len, pcol->nr_pages, pcol->length);
 
 		/* split the request, and start again with current page */
@@ -458,8 +459,8 @@ static void writepages_done(struct osd_request *or, void *p)
 	else
 		good_bytes = pcol->length - resid;
 
-	EXOFS_DBGMSG("writepages_done(%lx) good_bytes=%llx"
-		     " length=%zx nr_pages=%u\n",
+	EXOFS_DBGMSG("writepages_done(0x%lx) good_bytes=0x%llx"
+		     " length=0x%zx nr_pages=%u\n",
 		     pcol->inode->i_ino, _LLU(good_bytes), pcol->length,
 		     pcol->nr_pages);
 
@@ -473,15 +474,15 @@ static void writepages_done(struct osd_request *or, void *p)
 		if ((length < good_bytes) || (i == 0)) {
 			update_write_page(page, ret);
 			unlock_page(page);
-			EXOFS_DBGMSG("    writepages_done(%lx, %lx)"
-				     " good_bytes ret=%x\n",
+			EXOFS_DBGMSG("    writepages_done(0x%lx, 0x%lx)"
+				     " good_bytes ret=%d\n",
 				     inode->i_ino, page->index, ret);
 		} else {
 			/* try a single page write and only then it is
 			 * marked as SetPageError()
 			 */
-			EXOFS_ERR("    writepages_done(%lx, %lx) bad_bytes\n",
-				     inode->i_ino, page->index);
+			EXOFS_ERR("    writepages_done(0x%lx, 0x%lx)"
+				  " bad_bytes\n", inode->i_ino, page->index);
 
 			exofs_writepage(page, NULL);
 		}
@@ -531,7 +532,7 @@ static int write_exec(struct page_collect *pcol)
 	}
 
 	atomic_inc(&pcol->sbi->s_curr_pending);
-	EXOFS_DBGMSG("write_exec(%lx, %lx) start=%llx length=%zx\n",
+	EXOFS_DBGMSG("write_exec(0x%lx, 0x%lx) start=0x%llx length=0x%zx\n",
 		  pcol->inode->i_ino, pcol->pg_first, _LLU(i_start),
 		  pcol->length);
 	/* pages ownership was passed to pcol_copy */
@@ -602,13 +603,13 @@ try_again:
 			goto fail;
 	}
 
-	EXOFS_DBGMSG("    writepage_strip(%lx, %lx) len=%zx\n", inode->i_ino,
-		  page->index, len);
+	EXOFS_DBGMSG("    writepage_strip(0x%lx, 0x%lx) len=0x%zx\n",
+		     inode->i_ino, page->index, len);
 
 	ret = pcol_add_page(pcol, page, len);
 	if (unlikely(ret)) {
 		EXOFS_DBGMSG("Failed pcol_add_page "
-			     "nr_pages=%u total_length=%zx\n",
+			     "nr_pages=%u total_length=0x%zx\n",
 			     pcol->nr_pages, pcol->length);
 
 		/* split the request, next loop will start again */
@@ -649,8 +650,8 @@ static int exofs_writepages(struct address_space *mapping,
 	else
 		expected_pages = mapping->nrpages;
 
-	EXOFS_DBGMSG("inode(%lx) wbc->start=0x%llx wbc->end=0x%llx"
-		     " m->nrpages=%lu start=%ld end=%ld\n",
+	EXOFS_DBGMSG("inode(0x%lx) wbc->start=0x%llx wbc->end=0x%llx"
+		     " m->nrpages=%lu start=0x%lx end=0x%lx\n",
 		     mapping->host->i_ino, wbc->range_start, wbc->range_end,
 		     mapping->nrpages, start, end);
 
-- 
1.6.2.1


  reply	other threads:[~2009-03-25  9:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-25  9:45 [PATCHSET 0/3] exofs: Exportable by NFS Boaz Harrosh
2009-03-25  9:47 ` Boaz Harrosh [this message]
2009-03-25  9:50 ` [PATCH 2/3] [SQUASHME] exofs does support 64bit file sizes Boaz Harrosh
2009-03-25 10:07 ` [PATCH 3/3] exofs: export_operations Boaz Harrosh

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=49C9FDCD.5080107@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=akpm@linux-foundation.org \
    --cc=jeff@garzik.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=marcin.slusarz@gmail.com \
    --cc=osd-dev@open-osd.org \
    --cc=zbr@ioremap.net \
    /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;
as well as URLs for NNTP newsgroup(s).