From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-f2fs-devel@lists.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [PATCH 1/3] fsck.f2fs: fix sit types seamlessly
Date: Thu, 22 Jan 2015 16:48:50 -0800 [thread overview]
Message-ID: <1421974132-18330-1-git-send-email-jaegeuk@kernel.org> (raw)
SIT types can be wrong when active_logs are 2 or 4.
So, let's fix this implicitly.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fsck/fsck.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 09bb26f..a5f9adc 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -1023,6 +1023,7 @@ int fsck_verify(struct f2fs_sb_info *sbi)
{
unsigned int i = 0;
int ret = 0;
+ int force = 0;
u32 nr_unref_nid = 0;
struct f2fs_fsck *fsck = F2FS_FSCK(sbi);
struct hard_link_node *node = NULL;
@@ -1129,14 +1130,9 @@ int fsck_verify(struct f2fs_sb_info *sbi)
config.bug_on = 1;
}
- printf("[FSCK] SIT types ");
- if (check_sit_types(sbi) == 0) {
- printf(" [Ok..]\n");
- } else {
- printf(" [Fail]\n");
- ret = EXIT_ERR_CODE;
- config.bug_on = 1;
- }
+ printf("[FSCK] fixing SIT types\n");
+ if (check_sit_types(sbi) != 0)
+ force = 1;
printf("[FSCK] other corrupted bugs ");
if (config.bug_on == 0) {
@@ -1147,7 +1143,7 @@ int fsck_verify(struct f2fs_sb_info *sbi)
}
/* fix global metadata */
- if (config.bug_on && config.fix_on) {
+ if (force || (config.bug_on && config.fix_on)) {
fix_nat_entries(sbi);
rewrite_sit_area_bitmap(sbi);
fix_checkpoint(sbi);
--
2.1.1
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
next reply other threads:[~2015-01-23 0:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-23 0:48 Jaegeuk Kim [this message]
2015-01-23 0:48 ` [PATCH 2/3] dump.f2fs: show checkpoint flag Jaegeuk Kim
2015-01-29 21:43 ` [PATCH 2/3 v2] " Jaegeuk Kim
2015-01-23 0:48 ` [PATCH 3/3] fsck.f2fs: readahead node blocks to speed up 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=1421974132-18330-1-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).