summaryrefslogtreecommitdiff
path: root/fs/gfs2/incore.h
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2020-01-15 11:54:14 +0300
committerAndreas Gruenbacher <agruenba@redhat.com>2020-06-05 21:19:21 +0300
commitb0dcffd8da3339ad0300587ce7030efdf2e914a9 (patch)
tree2f841d0407db819765fa0275c53216cf80869bb6 /fs/gfs2/incore.h
parentb66648ad6dcfefd9f02b5408c1381987c090cb13 (diff)
downloadlinux-b0dcffd8da3339ad0300587ce7030efdf2e914a9.tar.xz
gfs2: Check inode generation number in delete_work_func
In delete_work_func, if the iopen glock still has an inode attached, limit the inode lookup to that specific generation number: in the likely case that the inode was deleted on the node on which the inode's link count dropped to zero, we can skip verifying the on-disk block type and reading in the inode. The same applies if another node that had the inode open managed to delete the inode before us. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/incore.h')
-rw-r--r--fs/gfs2/incore.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 76ac2578e658..03ab11fab962 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -380,7 +380,10 @@ struct gfs2_glock {
struct delayed_work gl_work;
union {
/* For iopen glocks only */
- struct delayed_work gl_delete;
+ struct {
+ struct delayed_work gl_delete;
+ u64 gl_no_formal_ino;
+ };
/* For rgrp glocks only */
struct {
loff_t start;