| // SPDX-License-Identifier: GPL-2.0-only |
| * OCFS2 cluster sysfs interface |
| * Copyright (C) 2005 Oracle. All rights reserved. |
| #include <linux/kernel.h> |
| #include <linux/module.h> |
| #include <linux/kobject.h> |
| #include "ocfs2_nodemanager.h" |
| static ssize_t version_show(struct kobject *kobj, struct kobj_attribute *attr, |
| return snprintf(buf, PAGE_SIZE, "%u\n", O2NM_API_VERSION); |
| static struct kobj_attribute attr_version = |
| __ATTR(interface_revision, S_IRUGO, version_show, NULL); |
| static struct attribute *o2cb_attrs[] = { |
| static struct attribute_group o2cb_attr_group = { |
| static struct kset *o2cb_kset; |
| void o2cb_sys_shutdown(void) |
| kset_unregister(o2cb_kset); |
| o2cb_kset = kset_create_and_add("o2cb", NULL, fs_kobj); |
| ret = sysfs_create_group(&o2cb_kset->kobj, &o2cb_attr_group); |
| ret = mlog_sys_init(o2cb_kset); |
| kset_unregister(o2cb_kset); |