aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_fstype.c
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2017-01-05 16:01:45 -0500
committerBob Peterson <rpeterso@redhat.com>2017-01-05 16:01:45 -0500
commitf07b352021483a3a38f081dc284928400a9c1d2c (patch)
treefeef7f57a98a0fc58ebfa693d7c435f2029c68bb /fs/gfs2/ops_fstype.c
parentGFS2: Limit number of transaction blocks requested for truncates (diff)
downloadlinux-dev-f07b352021483a3a38f081dc284928400a9c1d2c.tar.xz
linux-dev-f07b352021483a3a38f081dc284928400a9c1d2c.zip
GFS2: Made logd daemon take into account log demand
Before this patch, the logd daemon only tried to flush things when the log blocks pinned exceeded a certain threshold. But when we're deleting very large files, it may require a huge number of journal blocks, and that, in turn, may exceed the threshold. This patch factors that into account. Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2/ops_fstype.c')
-rw-r--r--fs/gfs2/ops_fstype.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index ff72ac6439c8..86281a918c7a 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -683,6 +683,7 @@ static int init_journal(struct gfs2_sbd *sdp, int undo)
goto fail_jindex;
}
+ atomic_set(&sdp->sd_log_blks_needed, 0);
if (sdp->sd_args.ar_spectator) {
sdp->sd_jdesc = gfs2_jdesc_find(sdp, 0);
atomic_set(&sdp->sd_log_blks_free, sdp->sd_jdesc->jd_blocks);