summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/sys.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2008-11-26 11:26:38 +0100
committerSteven Whitehouse <swhiteho@redhat.com>2009-01-05 08:39:10 +0100
commitfdd1062ebaa422c5684f97fa91da06f91167d76b (patch)
tree30ca8542e238bb04f4d80c8e009fa446ff66341b /fs/gfs2/sys.c
parentGFS2: Kill two daemons with one patch (diff)
downloadlinux-fdd1062ebaa422c5684f97fa91da06f91167d76b.tar.xz
linux-fdd1062ebaa422c5684f97fa91da06f91167d76b.zip
GFS2: Send some sensible sysfs stuff
We ought to inform the user of the locktable and lockproto for each uevent we generate. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/sys.c')
-rw-r--r--fs/gfs2/sys.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c
index 67ba5b7b759b..298bcb6c2713 100644
--- a/fs/gfs2/sys.c
+++ b/fs/gfs2/sys.c
@@ -461,11 +461,25 @@ void gfs2_sys_fs_del(struct gfs2_sbd *sdp)
kobject_put(&sdp->sd_kobj);
}
+static int gfs2_uevent(struct kset *kset, struct kobject *kobj,
+ struct kobj_uevent_env *env)
+{
+ struct gfs2_sbd *sdp = container_of(kobj, struct gfs2_sbd, sd_kobj);
+ add_uevent_var(env, "LOCKTABLE=%s", sdp->sd_table_name);
+ add_uevent_var(env, "LOCKPROTO=%s", sdp->sd_proto_name);
+ return 0;
+}
+
+static struct kset_uevent_ops gfs2_uevent_ops = {
+ .uevent = gfs2_uevent,
+};
+
+
int gfs2_sys_init(void)
{
gfs2_sys_margs = NULL;
spin_lock_init(&gfs2_sys_margs_lock);
- gfs2_kset = kset_create_and_add("gfs2", NULL, fs_kobj);
+ gfs2_kset = kset_create_and_add("gfs2", &gfs2_uevent_ops, fs_kobj);
if (!gfs2_kset)
return -ENOMEM;
return 0;