Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=e4…
Commit: e468b6f6588d22f22b3329deaaf62bea014e4a2e
Parent: 508b868e8c22a4dc454a406d9a1c0a32af94c21e
Author: Abhijith Das <adas(a)redhat.com>
AuthorDate: Mon Mar 21 17:23:20 2011 -0500
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Tue Mar 22 10:16:23 2011 +0100
gfs2_convert exits with success without doing anything
This is a correction to the previous patch that worked only for
the default 4K blocksizes because the internal blocksize value
was not yet updated with the actual value from the ondisk gfs1
superblock.
Resolves: rhbz#688734
Signed-off-by: Abhi Das <adas(a)redhat.com>
---
gfs2/convert/gfs2_convert.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gfs2/convert/gfs2_convert.c b/gfs2/convert/gfs2_convert.c
index 2b8f487..9cc3258 100644
--- a/gfs2/convert/gfs2_convert.c
+++ b/gfs2/convert/gfs2_convert.c
@@ -1498,7 +1498,6 @@ static int init(struct gfs2_sbd *sbp)
sbp->dinodes_alloced = 0; /* dinodes allocated - total them up later */
sbp->sd_sb.sb_bsize = GFS2_DEFAULT_BSIZE;
sbp->bsize = sbp->sd_sb.sb_bsize;
- sbp->fssize = lseek(sbp->device_fd, 0, SEEK_END) / sbp->sd_sb.sb_bsize;
osi_list_init(&sbp->rglist);
if (compute_constants(sbp)) {
log_crit("Error: Bad constants (1)\n");
@@ -1514,6 +1513,7 @@ static int init(struct gfs2_sbd *sbp)
rindex_addr = be64_to_cpu(raw_gfs1_ondisk_sb.sb_rindex_di.no_addr);
sbp->bsize = sbp->sd_sb.sb_bsize;
+ sbp->fssize = lseek(sbp->device_fd, 0, SEEK_END) / sbp->sd_sb.sb_bsize;
sbp->sd_inptrs = (sbp->bsize - sizeof(struct gfs_indirect)) /
sizeof(uint64_t);
sbp->sd_diptrs = (sbp->bsize - sizeof(struct gfs_dinode)) /