From f3708fb59f6c2498e8ec4f29010375f600b68642 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Sun, 13 Dec 2020 09:21:34 +0100 Subject: 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 --- fs/gfs2/log.h | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/gfs2/log.h') diff --git a/fs/gfs2/log.h b/fs/gfs2/log.h index a9cdbc990edf..16efbe614279 100644 --- a/fs/gfs2/log.h +++ b/fs/gfs2/log.h @@ -64,6 +64,7 @@ static inline void gfs2_ordered_add_inode(struct gfs2_inode *ip) extern void gfs2_ordered_del_inode(struct gfs2_inode *ip); extern unsigned int gfs2_struct2blk(struct gfs2_sbd *sdp, unsigned int nstruct); extern void gfs2_remove_from_ail(struct gfs2_bufdata *bd); +extern bool gfs2_log_is_empty(struct gfs2_sbd *sdp); extern void gfs2_log_release(struct gfs2_sbd *sdp, unsigned int blks); extern int gfs2_log_reserve(struct gfs2_sbd *sdp, unsigned int blks); extern void gfs2_write_log_header(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd, -- cgit v1.2.3