summaryrefslogtreecommitdiff
path: root/fs/gfs2/meta_io.h
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2020-07-22 18:27:50 +0300
committerAndreas Gruenbacher <agruenba@redhat.com>2020-10-15 15:29:03 +0300
commit68942870c66a7983f1d2efb9c1c524f7ebef8097 (patch)
treed6b7b52882431b8a2b6d7ca04590e33e6637e4b6 /fs/gfs2/meta_io.h
parent97c5e43d51a44bffdc0eb3c4b40c8d2d4cbe1a73 (diff)
downloadlinux-68942870c66a7983f1d2efb9c1c524f7ebef8097.tar.xz
gfs2: Wipe jdata and ail1 in gfs2_journal_wipe, formerly gfs2_meta_wipe
Before this patch, when blocks were freed, it called gfs2_meta_wipe to take the metadata out of the pending journal blocks. It did this mostly by calling another function called gfs2_remove_from_journal. This is shortsighted because it does not do anything with jdata blocks which may also be in the journal. This patch expands the function so that it wipes out jdata blocks from the journal as well, and it wipes it from the ail1 list if it hasn't been written back yet. Since it now processes jdata blocks as well, the function has been renamed from gfs2_meta_wipe to gfs2_journal_wipe. New function gfs2_ail1_wipe wants a static view of the ail list, so it locks the sd_ail_lock when removing items. To accomplish this, function gfs2_remove_from_journal no longer locks the sd_ail_lock, and it's now the caller's responsibility to do so. I was going to make sd_ail_lock locking conditional, but the practice is generally frowned upon. For details, see: https://lwn.net/Articles/109066/ Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/meta_io.h')
-rw-r--r--fs/gfs2/meta_io.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/meta_io.h b/fs/gfs2/meta_io.h
index eafb74e861c6..4a8c01929b79 100644
--- a/fs/gfs2/meta_io.h
+++ b/fs/gfs2/meta_io.h
@@ -60,7 +60,7 @@ enum {
};
extern void gfs2_remove_from_journal(struct buffer_head *bh, int meta);
-extern void gfs2_meta_wipe(struct gfs2_inode *ip, u64 bstart, u32 blen);
+extern void gfs2_journal_wipe(struct gfs2_inode *ip, u64 bstart, u32 blen);
extern int gfs2_meta_indirect_buffer(struct gfs2_inode *ip, int height, u64 num,
struct buffer_head **bhp);