All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-f2fs-devel@lists.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [PATCH 1/2] resize.f2fs: add more information in debug messages
Date: Wed,  2 Nov 2016 17:01:45 -0700	[thread overview]
Message-ID: <20161103000146.64292-1-jaegeuk@kernel.org> (raw)

Print more information.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fsck/resize.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/fsck/resize.c b/fsck/resize.c
index 565555c..b8d3f39 100644
--- a/fsck/resize.c
+++ b/fsck/resize.c
@@ -171,7 +171,9 @@ static void migrate_main(struct f2fs_sb_info *sbi,
 		}
 	}
 	free(raw);
-	DBG(0, "Info: Done to migrate data and node blocks\n");
+	DBG(0, "Info: Done to migrate Main area: main_blkaddr = 0x%x -> 0x%x\n",
+				START_BLOCK(sbi, 0),
+				START_BLOCK(sbi, 0) + offset);
 }
 
 static void move_ssa(struct f2fs_sb_info *sbi, unsigned int segno,
@@ -214,7 +216,8 @@ static void migrate_ssa(struct f2fs_sb_info *sbi,
 			move_ssa(sbi, segno, new_sum_blkaddr + segno - offset);
 	}
 
-	DBG(0, "Info: Done to migrate SSA blocks\n");
+	DBG(0, "Info: Done to migrate SSA blocks: sum_blkaddr = 0x%x -> 0x%x\n",
+				old_sum_blkaddr, new_sum_blkaddr);
 }
 
 static int shrink_nats(struct f2fs_sb_info *sbi,
@@ -323,9 +326,10 @@ static void migrate_nat(struct f2fs_sb_info *sbi,
 				(block_off & ((1 << sbi->log_blocks_per_seg) - 1)));
 		ret = dev_write_block(nat_block, block_addr);
 		ASSERT(ret >= 0);
-		DBG(1, "Write NAT: %lx\n", block_addr);
+		DBG(3, "Write NAT: %lx\n", block_addr);
 	}
-	DBG(0, "Info: Done to migrate NAT blocks\n");
+	DBG(0, "Info: Done to migrate NAT blocks: nat_blkaddr = 0x%x -> 0x%x\n",
+			old_nat_blkaddr, new_nat_blkaddr);
 }
 
 static void migrate_sit(struct f2fs_sb_info *sbi,
@@ -347,7 +351,7 @@ static void migrate_sit(struct f2fs_sb_info *sbi,
 	for (index = 0; index < sit_blks; index++) {
 		ret = dev_write_block(sit_blk, get_newsb(sit_blkaddr) + index);
 		ASSERT(ret >= 0);
-		DBG(1, "Write zero sit: %x\n", get_newsb(sit_blkaddr) + index);
+		DBG(3, "Write zero sit: %x\n", get_newsb(sit_blkaddr) + index);
 	}
 
 	for (segno = 0; segno < TOTAL_SEGS(sbi); segno++) {
@@ -382,7 +386,8 @@ static void migrate_sit(struct f2fs_sb_info *sbi,
 	ASSERT(ret >= 0);
 
 	free(sit_blk);
-	DBG(0, "Info: Done to migrate SIT blocks\n");
+	DBG(0, "Info: Done to restore new SIT blocks: 0x%x\n",
+					get_newsb(sit_blkaddr));
 }
 
 static void rebuild_checkpoint(struct f2fs_sb_info *sbi,
@@ -545,10 +550,8 @@ int f2fs_resize(struct f2fs_sb_info *sbi)
 		}
 	}
 
-	c.dbg_lv = 1;
 	print_raw_sb_info(sb);
 	print_raw_sb_info(new_sb);
-	c.dbg_lv = 0;
 
 	old_main_blkaddr = get_sb(main_blkaddr);
 	new_main_blkaddr = get_newsb(main_blkaddr);
-- 
2.8.3


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi

             reply	other threads:[~2016-11-03  0:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-03  0:01 Jaegeuk Kim [this message]
2016-11-03  0:01 ` [PATCH 2/2] resize.f2fs: fix wrong offset calculation Jaegeuk Kim

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=20161103000146.64292-1-jaegeuk@kernel.org \
    --to=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.