diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2020-12-13 09:21:34 +0100 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2021-02-03 18:37:24 +0100 |
commit | f3708fb59f6c2498e8ec4f29010375f600b68642 (patch) | |
tree | 549fa0544864f8e01222d53f6220d6896bcce7e5 /fs/gfs2/trans.c | |
parent | gfs2: Clean up on-stack transactions (diff) | |
download | linux-f3708fb59f6c2498e8ec4f29010375f600b68642.tar.xz linux-f3708fb59f6c2498e8ec4f29010375f600b68642.zip |
gfs2: Get rid of sd_reserving_log
This counter and the associated wait queue are only used so that
gfs2_make_fs_ro can efficiently wait for all pending log space
allocations to fail after setting the filesystem to read-only. This
comes at the cost of waking up that wait queue very frequently.
Instead, when gfs2_log_reserve fails because the filesystem has become
read-only, Wake up sd_log_waitq. In gfs2_make_fs_ro, set the file
system read-only and then wait until all the log space has been
released. Give up and report the problem after a while. With that,
sd_reserving_log and sd_reserving_log_wait can be removed.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | fs/gfs2/trans.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index db29ca253853..aefe450e009e 100644 --- a/fs/gfs2/trans.c +++ b/fs/gfs2/trans.c @@ -71,6 +71,8 @@ int __gfs2_trans_begin(struct gfs2_trans *tr, struct gfs2_sbd *sdp, error = gfs2_log_reserve(sdp, tr->tr_reserved); if (error) { sb_end_intwrite(sdp->sd_vfs); + if (error == -EROFS) + wake_up(&sdp->sd_log_waitq); return error; } |