This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch master
in repository gfs2-utils.
commit f84d84e7693b3d95095fc42d1b21d6a511a1d2c0
Author: Andrew Price <anprice(a)redhat.com>
Date: Mon Mar 5 16:41:32 2018 +0000
fsck.gfs2: Don't check lh_crc for older filesystems
This fixes the case where fsck.gfs2 is built against v2 log headers but
the filesystem pre-dates them and so lh_crc is 0.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/libgfs2/recovery.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gfs2/libgfs2/recovery.c b/gfs2/libgfs2/recovery.c
index 51d210e..b813d69 100644
--- a/gfs2/libgfs2/recovery.c
+++ b/gfs2/libgfs2/recovery.c
@@ -76,7 +76,10 @@ int get_log_header(struct gfs2_inode *ip, unsigned int blk,
#ifdef GFS2_HAS_LH_V2
lh_crc = lh.lh_crc;
#endif
- if (error || lh.lh_blkno != blk || lh.lh_hash != hash || lh_crc != crc)
+ if (error || lh.lh_blkno != blk || lh.lh_hash != hash)
+ return 1;
+ /* Don't check the crc if it's zero, as it is in pre-v2 log headers */
+ if (lh_crc != 0 && lh_crc != crc)
return 1;
*head = lh;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
Show replies by date