cluster: STABLE3 - fsck.gfs2: Force intermediate lost+found inode updates

Bob Peterson rpeterso at fedoraproject.org
Tue Jan 26 21:21:15 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=43632210b4fc2121005cb8ca5bbe1d10cdc97da6
Commit:        43632210b4fc2121005cb8ca5bbe1d10cdc97da6
Parent:        fbf9933c3626b3e670fec6f2d218eec3c36d81bc
Author:        Bob Peterson <bob at ganesha.peterson>
AuthorDate:    Mon Jan 25 14:27:31 2010 -0600
Committer:     Bob Peterson <rpeterso at redhat.com>
CommitterDate: Tue Jan 26 14:39:32 2010 -0600

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 c6a8a6e..c5051f9 100644
--- a/gfs2/fsck/lost_n_found.c
+++ b/gfs2/fsck/lost_n_found.c
@@ -183,5 +183,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