cluster: RHEL56 - fsck.gfs2: Force intermediate lost+found inode updates
Bob Peterson
rpeterso at fedoraproject.org
Sat Apr 10 04:54:02 UTC 2010
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=cd6e9217b85f13c85b250180cf5590526d697c61
Commit: cd6e9217b85f13c85b250180cf5590526d697c61
Parent: d7710e6d9a4df4b28e715382bb028b817e514ba0
Author: Bob Peterson <bob at ganesha.peterson>
AuthorDate: Mon Jan 25 14:27:31 2010 -0600
Committer: Bob Peterson <rpeterso at redhat.com>
CommitterDate: Fri Apr 9 23:43:47 2010 -0500
fsck.gfs2: Force intermediate lost+found inode updates
This patch forces the lost+found dinode to be rewritten every time
an orphan inode is moved into lost+found. That way, if the user
interrupts fsck.gfs2 during pass4, they won't be left with a
lost+found dinode with an invalid number of blocks, links and so
forth.
rhbz#455300
---
gfs2/fsck/lost_n_found.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/gfs2/fsck/lost_n_found.c b/gfs2/fsck/lost_n_found.c
index b241201..ed12f13 100644
--- a/gfs2/fsck/lost_n_found.c
+++ b/gfs2/fsck/lost_n_found.c
@@ -189,5 +189,7 @@ int add_inode_to_lf(struct gfs2_inode *ip){
log_notice( _("Added inode #%llu (0x%llx) to lost+found dir\n"),
(unsigned long long)ip->i_di.di_num.no_addr,
(unsigned long long)ip->i_di.di_num.no_addr);
+ gfs2_dinode_out(&lf_dip->i_di, lf_dip->i_bh);
+ bwrite(lf_dip->i_bh);
return 0;
}
More information about the cluster-commits
mailing list