Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169200
b: refs/heads/master
c: c14f573
h: refs/heads/master
v: v3
  • Loading branch information
Benjamin Marzinski authored and Steven Whitehouse committed Dec 3, 2009
1 parent fb27c6c commit 7f41088
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3d3c10f2ce80d2a19e5e02023c2b7ab7086c36d5
refs/heads/master: c14f5735e724cb5338ca8298d42b1658008a10d7
17 changes: 9 additions & 8 deletions trunk/fs/gfs2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,8 @@ void gfs2_statfs_change(struct gfs2_sbd *sdp, s64 total, s64 free,
struct gfs2_statfs_change_host *l_sc = &sdp->sd_statfs_local;
struct gfs2_statfs_change_host *m_sc = &sdp->sd_statfs_master;
struct buffer_head *l_bh;
int percent, sync_percent;
s64 x, y;
int need_sync = 0;
int error;

error = gfs2_meta_inode_buffer(l_ip, &l_bh);
Expand All @@ -486,16 +487,16 @@ void gfs2_statfs_change(struct gfs2_sbd *sdp, s64 total, s64 free,
l_sc->sc_free += free;
l_sc->sc_dinodes += dinodes;
gfs2_statfs_change_out(l_sc, l_bh->b_data + sizeof(struct gfs2_dinode));
if (m_sc->sc_free)
percent = (100 * l_sc->sc_free) / m_sc->sc_free;
else
percent = 100;
if (sdp->sd_args.ar_statfs_percent) {
x = 100 * l_sc->sc_free;
y = m_sc->sc_free * sdp->sd_args.ar_statfs_percent;
if (x >= y || x <= -y)
need_sync = 1;
}
spin_unlock(&sdp->sd_statfs_spin);

brelse(l_bh);
sync_percent = sdp->sd_args.ar_statfs_percent;
if (sync_percent && (percent >= sync_percent ||
percent <= -sync_percent))
if (need_sync)
gfs2_wake_up_statfs(sdp);
}

Expand Down

0 comments on commit 7f41088

Please sign in to comment.