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 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html