This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch master in repository gfs2-utils.
commit ce962c5456c3023a7bcb0212be25938e99af574a Author: Andrew Price anprice@redhat.com AuthorDate: Mon Mar 22 11:45:48 2021 +0000
libgfs2: Fold __ri_update into ri_update
ri_update is now only called with quiet == 1 so drop that and merge it with __ri_update.
Signed-off-by: Andrew Price anprice@redhat.com --- gfs2/libgfs2/libgfs2.h | 2 +- gfs2/libgfs2/super.c | 14 ++------------ 2 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h index 12275098..a54bdd1b 100644 --- a/gfs2/libgfs2/libgfs2.h +++ b/gfs2/libgfs2/libgfs2.h @@ -705,7 +705,7 @@ extern int check_sb(struct gfs2_sb *sb); extern int read_sb(struct gfs2_sbd *sdp); extern int rindex_read(struct gfs2_sbd *sdp, int fd, uint64_t *count1, int *sane); -extern int ri_update(struct gfs2_sbd *sdp, int fd, int *rgcount, int *sane); +extern int ri_update(struct gfs2_sbd *sdp, int fd, int *rgcount, int *ok); extern int write_sb(struct gfs2_sbd *sdp);
/* ondisk.c */ diff --git a/gfs2/libgfs2/super.c b/gfs2/libgfs2/super.c index 039b7428..9ac64126 100644 --- a/gfs2/libgfs2/super.c +++ b/gfs2/libgfs2/super.c @@ -299,8 +299,7 @@ static unsigned gfs2_rgrp_reada(struct gfs2_sbd *sdp, unsigned cur_window, * * Returns: 0 on success, -1 on failure. */ -static int __ri_update(struct gfs2_sbd *sdp, int fd, int *rgcount, int *sane, - int quiet) +int ri_update(struct gfs2_sbd *sdp, int fd, int *rgcount, int *ok) { struct rgrp_tree *rgd; struct gfs2_rindex *ri; @@ -313,7 +312,7 @@ static int __ri_update(struct gfs2_sbd *sdp, int fd, int *rgcount, int *sane, /* Turn off generic readhead */ posix_fadvise(sdp->device_fd, 0, 0, POSIX_FADV_RANDOM);
- if (rindex_read(sdp, fd, &count1, sane)) + if (rindex_read(sdp, fd, &count1, ok)) goto fail; for (n = osi_first(&sdp->rgtree); n; n = next) { next = osi_next(n); @@ -327,10 +326,6 @@ static int __ri_update(struct gfs2_sbd *sdp, int fd, int *rgcount, int *sane, return errblock; ra_window--; count2++; - if (!quiet && count2 % 100 == 0) { - printf("."); - fflush(stdout); - } ri = &rgd->ri; if (ri->ri_data0 + ri->ri_data - 1 > rmax) rmax = ri->ri_data0 + ri->ri_data - 1; @@ -349,8 +344,3 @@ static int __ri_update(struct gfs2_sbd *sdp, int fd, int *rgcount, int *sane, gfs2_rgrp_free(sdp, &sdp->rgtree); return -1; } - -int ri_update(struct gfs2_sbd *sdp, int fd, int *rgcount, int *sane) -{ - return __ri_update(sdp, fd, rgcount, sane, 1); -}
cluster-commits@lists.fedorahosted.org