linux-f2fs-devel.lists.sourceforge.net archive mirror
 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 2/5] fsck.f2fs: show superblock features and encryption info
Date: Fri,  8 May 2015 21:24:38 -0700	[thread overview]
Message-ID: <1431145481-2184-2-git-send-email-jaegeuk@kernel.org> (raw)
In-Reply-To: <1431145481-2184-1-git-send-email-jaegeuk@kernel.org>

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fsck/mount.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/fsck/mount.c b/fsck/mount.c
index 1c55f40..11ab197 100644
--- a/fsck/mount.c
+++ b/fsck/mount.c
@@ -224,6 +224,23 @@ void print_cp_state(u32 flag)
 	MSG(0, "\n");
 }
 
+void print_sb_state(struct f2fs_super_block *sb)
+{
+	__le32 f = sb->feature;
+	int i;
+
+	MSG(0, "Info: superblock features = %x : ", f);
+	if (f & cpu_to_le32(F2FS_FEATURE_ENCRYPT)) {
+		MSG(0, "%s", " encrypt");
+	}
+	MSG(0, "\n");
+	MSG(0, "Info: superblock encrypt level = %d, salt = ",
+					sb->encryption_level);
+	for (i = 0; i < 16; i++)
+		MSG(0, "%02x", sb->encrypt_pw_salt[i]);
+	MSG(0, "\n");
+}
+
 int sanity_check_raw_super(struct f2fs_super_block *raw_super)
 {
 	unsigned int blocksize;
@@ -300,6 +317,7 @@ int validate_super_block(struct f2fs_sb_info *sbi, int block)
 			config.auto_fix = 0;
 			config.fix_on = 1;
 		}
+		print_sb_state(sbi->raw_super);
 		return 0;
 	}
 
-- 
2.1.1


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y

  reply	other threads:[~2015-05-09  4:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-09  4:24 [PATCH 1/5] mkfs.f2fs: set encryption feature Jaegeuk Kim
2015-05-09  4:24 ` Jaegeuk Kim [this message]
2015-05-09  4:24 ` [PATCH 3/5] dump.f2fs: show i_advise field in inode Jaegeuk Kim
2015-05-09  4:24 ` [PATCH 4/5] fsck.f2fs: avoid build warning Jaegeuk Kim
2015-05-09  4:24 ` [PATCH 5/5] fsck.f2fs: add hash conversion for encrypted dentries 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=1431145481-2184-2-git-send-email-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 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).