Skip to content

Commit fe33cc1

Browse files
author
Boaz Harrosh
committed
exofs: dbg-print less
Iner-loops printing is converted to EXOFS_DBG2 which is #defined to nothing. It is now almost bareable to just leave debug-on. Every operation is printed once, with most relevant info (I hope). Signed-off-by: Boaz Harrosh <[email protected]>
1 parent 58311c4 commit fe33cc1

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

fs/exofs/inode.c

+7-5
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
# define EXOFS_DEBUG_OBJ_ISIZE 1
4242
#endif
4343

44+
#define EXOFS_DBGMSG2(M...) do {} while (0)
45+
4446
struct page_collect {
4547
struct exofs_sb_info *sbi;
4648
struct request_queue *req_q;
@@ -198,7 +200,7 @@ static int __readpages_done(struct osd_request *or, struct page_collect *pcol,
198200
else
199201
page_stat = ret;
200202

201-
EXOFS_DBGMSG(" readpages_done(0x%lx, 0x%lx) %s\n",
203+
EXOFS_DBGMSG2(" readpages_done(0x%lx, 0x%lx) %s\n",
202204
inode->i_ino, page->index,
203205
page_stat ? "bad_bytes" : "good_bytes");
204206

@@ -370,12 +372,12 @@ static int readpage_strip(void *data, struct page *page)
370372
if (len != PAGE_CACHE_SIZE)
371373
zero_user(page, len, PAGE_CACHE_SIZE - len);
372374

373-
EXOFS_DBGMSG(" readpage_strip(0x%lx, 0x%lx) len=0x%zx\n",
375+
EXOFS_DBGMSG2(" readpage_strip(0x%lx, 0x%lx) len=0x%zx\n",
374376
inode->i_ino, page->index, len);
375377

376378
ret = pcol_add_page(pcol, page, len);
377379
if (ret) {
378-
EXOFS_DBGMSG("Failed pcol_add_page pages[i]=%p "
380+
EXOFS_DBGMSG2("Failed pcol_add_page pages[i]=%p "
379381
"this_len=0x%zx nr_pages=%u length=0x%lx\n",
380382
page, len, pcol->nr_pages, pcol->length);
381383

@@ -482,7 +484,7 @@ static void writepages_done(struct osd_request *or, void *p)
482484

483485
update_write_page(page, page_stat);
484486
unlock_page(page);
485-
EXOFS_DBGMSG(" writepages_done(0x%lx, 0x%lx) status=%d\n",
487+
EXOFS_DBGMSG2(" writepages_done(0x%lx, 0x%lx) status=%d\n",
486488
inode->i_ino, page->index, page_stat);
487489

488490
length += bvec->bv_len;
@@ -609,7 +611,7 @@ static int writepage_strip(struct page *page,
609611
goto fail;
610612
}
611613

612-
EXOFS_DBGMSG(" writepage_strip(0x%lx, 0x%lx) len=0x%zx\n",
614+
EXOFS_DBGMSG2(" writepage_strip(0x%lx, 0x%lx) len=0x%zx\n",
613615
inode->i_ino, page->index, len);
614616

615617
ret = pcol_add_page(pcol, page, len);

0 commit comments

Comments
 (0)