aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/incore.h
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2021-02-08 20:44:26 +0100
committerAndreas Gruenbacher <agruenba@redhat.com>2021-02-17 19:30:28 +0100
commit9e514605c77451745ea9fca5a26fc3153893686a (patch)
treea1de848996ddcb7f19c564c153e79b3d493fa76e /fs/gfs2/incore.h
parentgfs2: Add per-reservation reserved block accounting (diff)
downloadlinux-dev-9e514605c77451745ea9fca5a26fc3153893686a.tar.xz
linux-dev-9e514605c77451745ea9fca5a26fc3153893686a.zip
gfs2: Add local resource group locking
Prepare for treating resource group glocks as exclusive among nodes but shared among all tasks running on a node: introduce another layer of node-specific locking that the local tasks can use to coordinate their accesses. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/incore.h')
-rw-r--r--fs/gfs2/incore.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 2679ba54798c..92f5a920ce61 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -20,6 +20,7 @@
#include <linux/percpu.h>
#include <linux/lockref.h>
#include <linux/rhashtable.h>
+#include <linux/mutex.h>
#define DIO_WAIT 0x00000010
#define DIO_METADATA 0x00000020
@@ -123,6 +124,7 @@ struct gfs2_rgrpd {
#define GFS2_RDF_PREFERRED 0x80000000 /* This rgrp is preferred */
#define GFS2_RDF_MASK 0xf0000000 /* mask for internal flags */
spinlock_t rd_rsspin; /* protects reservation related vars */
+ struct mutex rd_mutex;
struct rb_root rd_rstree; /* multi-block reservation tree */
};