[Ocfs2-commits] manish commits r2340 - in trunk: . fs/configfs
fs/ocfs2 fs/ocfs2/cluster fs/ocfs2/dlm include include/linux
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Mon May 30 16:32:33 CDT 2005
Author: manish
Signed-off-by: jlbec
Date: 2005-05-30 16:32:31 -0500 (Mon, 30 May 2005)
New Revision: 2340
Added:
trunk/include/
trunk/include/linux/
trunk/include/linux/configfs.h
Removed:
trunk/fs/configfs/configfs.h
Modified:
trunk/fs/configfs/Makefile
trunk/fs/configfs/bobtest.c
trunk/fs/configfs/configfs_example.c
trunk/fs/configfs/dir.c
trunk/fs/configfs/file.c
trunk/fs/configfs/inode.c
trunk/fs/configfs/item.c
trunk/fs/configfs/mount.c
trunk/fs/configfs/symlink.c
trunk/fs/ocfs2/Makefile
trunk/fs/ocfs2/cluster/Makefile
trunk/fs/ocfs2/cluster/heartbeat.c
trunk/fs/ocfs2/cluster/nodemanager.c
trunk/fs/ocfs2/cluster/nodemanager.h
trunk/fs/ocfs2/dlm/Makefile
Log:
Normalize configfs.h location
Signed-off-by: jlbec
Modified: trunk/fs/configfs/Makefile
===================================================================
--- trunk/fs/configfs/Makefile 2005-05-30 20:16:37 UTC (rev 2339)
+++ trunk/fs/configfs/Makefile 2005-05-30 21:32:31 UTC (rev 2340)
@@ -9,6 +9,8 @@
OUR_TOPDIR := $(M)/..
include $(OUR_TOPDIR)/Config.make
+
+CPPFLAGS := -I$(OUR_TOPDIR)/include $(CPPFLAGS)
endif
ifdef BACKING_DEV_CAPABILITIES
Modified: trunk/fs/configfs/bobtest.c
===================================================================
--- trunk/fs/configfs/bobtest.c 2005-05-30 20:16:37 UTC (rev 2339)
+++ trunk/fs/configfs/bobtest.c 2005-05-30 21:32:31 UTC (rev 2340)
@@ -26,7 +26,7 @@
#include <linux/module.h>
#include <linux/slab.h>
-#include "configfs.h"
+#include <linux/configfs.h>
Deleted: trunk/fs/configfs/configfs.h
===================================================================
--- trunk/fs/configfs/configfs.h 2005-05-30 20:16:37 UTC (rev 2339)
+++ trunk/fs/configfs/configfs.h 2005-05-30 21:32:31 UTC (rev 2340)
@@ -1,205 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; -*-
- * vim: noexpandtab sw=8 ts=8 sts=0:
- *
- * configfs.h - definitions for the device driver filesystem
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 021110-1307, USA.
- *
- * Based on sysfs:
- * sysfs is Copyright (C) 2001, 2002, 2003 Patrick Mochel
- *
- * Based on kobject.h:
- * Copyright (c) 2002-2003 Patrick Mochel
- * Copyright (c) 2002-2003 Open Source Development Labs
- *
- * configfs Copyright (C) 2005 Oracle. All rights reserved.
- *
- * Please read Documentation/filesystems/configfs.txt before using the
- * configfs interface, ESPECIALLY the parts about reference counts and
- * item destructors.
- */
-
-#ifndef _CONFIGFS_H_
-#define _CONFIGFS_H_
-
-#ifdef __KERNEL__
-
-#include <linux/types.h>
-#include <linux/list.h>
-#include <linux/kref.h>
-
-#include <asm/atomic.h>
-#include <asm/semaphore.h>
-
-#define CONFIGFS_ITEM_NAME_LEN 20
-
-struct module;
-
-struct configfs_item_operations;
-struct configfs_group_operations;
-struct configfs_attribute;
-struct configfs_subsystem;
-
-struct config_item {
- char *ci_name;
- char ci_namebuf[CONFIGFS_ITEM_NAME_LEN];
- struct kref ci_kref;
- struct list_head ci_entry;
- struct config_item *ci_parent;
- struct config_group *ci_group;
- struct config_item_type *ci_type;
- struct dentry *ci_dentry;
-};
-
-extern int config_item_set_name(struct config_item *, const char *, ...);
-
-static inline char *config_item_name(struct config_item * item)
-{
- return item->ci_name;
-}
-
-extern void config_item_init(struct config_item *);
-extern void config_item_init_type_name(struct config_item *item,
- const char *name,
- struct config_item_type *type);
-extern void config_item_cleanup(struct config_item *);
-
-extern struct config_item * config_item_get(struct config_item *);
-extern void config_item_put(struct config_item *);
-
-struct config_item_type {
- struct module *ct_owner;
- struct configfs_item_operations *ct_item_ops;
- struct configfs_group_operations *ct_group_ops;
- struct configfs_attribute **ct_attrs;
-};
-
-
-/**
- * group - a group of config_items of a specific type, belonging
- * to a specific subsystem.
- */
-
-struct config_group {
- struct config_item cg_item;
- struct list_head cg_children;
- struct configfs_subsystem *cg_subsys;
- struct config_group **default_groups;
-};
-
-
-extern void config_group_init(struct config_group *group);
-extern void config_group_init_type_name(struct config_group *group,
- const char *name,
- struct config_item_type *type);
-
-
-static inline struct config_group *to_config_group(struct config_item *item)
-{
- return item ? container_of(item,struct config_group,cg_item) : NULL;
-}
-
-static inline struct config_group *config_group_get(struct config_group *group)
-{
- return group ? to_config_group(config_item_get(&group->cg_item)) : NULL;
-}
-
-static inline void config_group_put(struct config_group *group)
-{
- config_item_put(&group->cg_item);
-}
-
-extern struct config_item *config_group_find_obj(struct config_group *, const char *);
-
-
-struct configfs_attribute {
- char *ca_name;
- struct module *ca_owner;
- mode_t ca_mode;
-};
-
-
-/*
- * If allow_link() exists, the item can symlink(2) out to other
- * items. If the item is a group, it may support mkdir(2).
- * Groups supply one of make_group() and make_item(). If the
- * group supports make_group(), one can create group children. If it
- * supports make_item(), one can create config_item children. If it has
- * default_groups on group->default_groups, it has automatically created
- * group children. default_groups may coexist alongsize make_group() or
- * make_item(), but if the group wishes to have only default_groups
- * children (disallowing mkdir(2)), it need not provide either function.
- * If the group has commit(), it supports pending and commited (active)
- * items.
- */
-struct configfs_item_operations {
- void (*release)(struct config_item *);
- ssize_t (*show_attribute)(struct config_item *, struct configfs_attribute *,char *);
- ssize_t (*store_attribute)(struct config_item *,struct configfs_attribute *,const char *, size_t);
- int (*allow_link)(struct config_item *src, struct config_item *target);
- int (*drop_link)(struct config_item *src, struct config_item *target);
-};
-
-struct configfs_group_operations {
- struct config_item *(*make_item)(struct config_group *group, const char *name);
- struct config_group *(*make_group)(struct config_group *group, const char *name);
- int (*commit_item)(struct config_item *item);
- void (*drop_item)(struct config_group *group, struct config_item *item);
-};
-
-
-
-/**
- * Use these macros to make defining attributes easier. See include/linux/device.h
- * for examples..
- */
-
-#if 0
-#define __ATTR(_name,_mode,_show,_store) { \
- .attr = {.ca_name = __stringify(_name), .ca_mode = _mode, .ca_owner = THIS_MODULE }, \
- .show = _show, \
- .store = _store, \
-}
-
-#define __ATTR_RO(_name) { \
- .attr = { .ca_name = __stringify(_name), .ca_mode = 0444, .ca_owner = THIS_MODULE }, \
- .show = _name##_show, \
-}
-
-#define __ATTR_NULL { .attr = { .name = NULL } }
-
-#define attr_name(_attr) (_attr).attr.name
-#endif
-
-
-struct configfs_subsystem {
- struct config_group su_group;
- struct semaphore su_sem;
-};
-
-static inline struct configfs_subsystem *to_configfs_subsystem(struct config_group *group)
-{
- return group ?
- container_of(group, struct configfs_subsystem, su_group) :
- NULL;
-}
-
-int configfs_register_subsystem(struct configfs_subsystem *subsys);
-void configfs_unregister_subsystem(struct configfs_subsystem *subsys);
-
-#endif /* __KERNEL__ */
-
-#endif /* _CONFIGFS_H_ */
Modified: trunk/fs/configfs/configfs_example.c
===================================================================
--- trunk/fs/configfs/configfs_example.c 2005-05-30 20:16:37 UTC (rev 2339)
+++ trunk/fs/configfs/configfs_example.c 2005-05-30 21:32:31 UTC (rev 2340)
@@ -29,7 +29,7 @@
#include <linux/module.h>
#include <linux/slab.h>
-#include "configfs.h"
+#include <linux/configfs.h>
Modified: trunk/fs/configfs/dir.c
===================================================================
--- trunk/fs/configfs/dir.c 2005-05-30 20:16:37 UTC (rev 2339)
+++ trunk/fs/configfs/dir.c 2005-05-30 21:32:31 UTC (rev 2340)
@@ -31,7 +31,7 @@
#include <linux/module.h>
#include <linux/slab.h>
-#include "configfs.h"
+#include <linux/configfs.h>
#include "configfs_internal.h"
DECLARE_RWSEM(configfs_rename_sem);
Modified: trunk/fs/configfs/file.c
===================================================================
--- trunk/fs/configfs/file.c 2005-05-30 20:16:37 UTC (rev 2339)
+++ trunk/fs/configfs/file.c 2005-05-30 21:32:31 UTC (rev 2340)
@@ -31,7 +31,7 @@
#include <asm/uaccess.h>
#include <asm/semaphore.h>
-#include "configfs.h"
+#include <linux/configfs.h>
#include "configfs_internal.h"
Modified: trunk/fs/configfs/inode.c
===================================================================
--- trunk/fs/configfs/inode.c 2005-05-30 20:16:37 UTC (rev 2339)
+++ trunk/fs/configfs/inode.c 2005-05-30 21:32:31 UTC (rev 2340)
@@ -32,7 +32,7 @@
#include <linux/namei.h>
#include <linux/backing-dev.h>
-#include "configfs.h"
+#include <linux/configfs.h>
#include "configfs_internal.h"
extern struct super_block * configfs_sb;
Modified: trunk/fs/configfs/item.c
===================================================================
--- trunk/fs/configfs/item.c 2005-05-30 20:16:37 UTC (rev 2339)
+++ trunk/fs/configfs/item.c 2005-05-30 21:32:31 UTC (rev 2340)
@@ -32,7 +32,7 @@
#include <linux/stat.h>
#include <linux/slab.h>
-#include "configfs.h"
+#include <linux/configfs.h>
static inline struct config_item * to_item(struct list_head * entry)
Modified: trunk/fs/configfs/mount.c
===================================================================
--- trunk/fs/configfs/mount.c 2005-05-30 20:16:37 UTC (rev 2339)
+++ trunk/fs/configfs/mount.c 2005-05-30 21:32:31 UTC (rev 2340)
@@ -30,7 +30,7 @@
#include <linux/pagemap.h>
#include <linux/init.h>
-#include "configfs.h"
+#include <linux/configfs.h>
#include "configfs_internal.h"
/* Random magic number */
Modified: trunk/fs/configfs/symlink.c
===================================================================
--- trunk/fs/configfs/symlink.c 2005-05-30 20:16:37 UTC (rev 2339)
+++ trunk/fs/configfs/symlink.c 2005-05-30 21:32:31 UTC (rev 2340)
@@ -29,7 +29,7 @@
#include <linux/module.h>
#include <linux/namei.h>
-#include "configfs.h"
+#include <linux/configfs.h>
#include "configfs_internal.h"
static int item_depth(struct config_item * item)
Modified: trunk/fs/ocfs2/Makefile
===================================================================
--- trunk/fs/ocfs2/Makefile 2005-05-30 20:16:37 UTC (rev 2339)
+++ trunk/fs/ocfs2/Makefile 2005-05-30 21:32:31 UTC (rev 2340)
@@ -10,12 +10,11 @@
include $(OUR_TOPDIR)/Config.make
-CLUSTERINC := $(OUR_TOPDIR)/fs/ocfs2
-CONFIGFSINC := $(OUR_TOPDIR)/fs/configfs
-EXTRA_CFLAGS += -I$(CLUSTERINC) -I$(CONFIGFSINC)
-
+CPPFLAGS := -I$(OUR_TOPDIR)/include $(CPPFLAGS)
endif
+EXTRA_CFLAGS += -I$(OUR_TOPDIR)/fs/ocfs2
+
ifdef OCFS_DEBUG
EXTRA_CFLAGS += -g
EXTRA_CFLAGS += -DDEBUG
Modified: trunk/fs/ocfs2/cluster/Makefile
===================================================================
--- trunk/fs/ocfs2/cluster/Makefile 2005-05-30 20:16:37 UTC (rev 2339)
+++ trunk/fs/ocfs2/cluster/Makefile 2005-05-30 21:32:31 UTC (rev 2340)
@@ -9,7 +9,6 @@
OUR_TOPDIR := $(M)/..
include $(OUR_TOPDIR)/Config.make
-
endif
ifdef MISSING_SOCK_CREATE_LITE
@@ -24,9 +23,6 @@
EXTRA_CFLAGS += -DINET_SK_RETURNS_INET_OPT
endif
-# this is going to get exciting if configfs is merged
-EXTRA_CFLAGS += -I$(OUR_TOPDIR)/fs/configfs/
-
SOURCES = \
heartbeat.c \
masklog.c \
Modified: trunk/fs/ocfs2/cluster/heartbeat.c
===================================================================
--- trunk/fs/ocfs2/cluster/heartbeat.c 2005-05-30 20:16:37 UTC (rev 2339)
+++ trunk/fs/ocfs2/cluster/heartbeat.c 2005-05-30 21:32:31 UTC (rev 2340)
@@ -27,7 +27,7 @@
#include <linux/delay.h>
#include <linux/file.h>
#include <linux/kthread.h>
-#include "configfs.h"
+#include <linux/configfs.h>
#include "heartbeat.h"
#include "tcp.h"
Modified: trunk/fs/ocfs2/cluster/nodemanager.c
===================================================================
--- trunk/fs/ocfs2/cluster/nodemanager.c 2005-05-30 20:16:37 UTC (rev 2339)
+++ trunk/fs/ocfs2/cluster/nodemanager.c 2005-05-30 21:32:31 UTC (rev 2340)
@@ -23,6 +23,7 @@
#include <linux/module.h>
#include <linux/sysctl.h>
#include <linux/proc_fs.h>
+#include <linux/configfs.h>
#include "tcp.h"
#include "nodemanager.h"
@@ -30,8 +31,6 @@
#include "masklog.h"
#include "ver.h"
-#include "configfs.h"
-
/* for now we operate under the assertion that there can be only one
* cluster active at a time. Changing this will require trickling
* cluster references throughout where nodes are looked up */
Modified: trunk/fs/ocfs2/cluster/nodemanager.h
===================================================================
--- trunk/fs/ocfs2/cluster/nodemanager.h 2005-05-30 20:16:37 UTC (rev 2339)
+++ trunk/fs/ocfs2/cluster/nodemanager.h 2005-05-30 21:32:31 UTC (rev 2340)
@@ -30,7 +30,7 @@
#include "ocfs2_nodemanager.h"
/* This totally doesn't belong here. */
-#include "configfs.h"
+#include <linux/configfs.h>
#include <linux/idr.h>
#define KERN_OCFS2 988
Modified: trunk/fs/ocfs2/dlm/Makefile
===================================================================
--- trunk/fs/ocfs2/dlm/Makefile 2005-05-30 20:16:37 UTC (rev 2339)
+++ trunk/fs/ocfs2/dlm/Makefile 2005-05-30 21:32:31 UTC (rev 2340)
@@ -4,19 +4,15 @@
include $(TOPDIR)/Preamble.make
-CLUSTERINC = $(TOPDIR)/fs/ocfs2
else
# We are included by kbuild.
OUR_TOPDIR := $(M)/..
include $(OUR_TOPDIR)/Config.make
-CLUSTERINC = $(OUR_TOPDIR)/fs/ocfs2
-CONFIGFSINC = $(OUR_TOPDIR)/fs/configfs
-
endif
-EXTRA_CFLAGS += -I$(CLUSTERINC) -I$(CONFIGFSINC)
+EXTRA_CFLAGS += -I$(OUR_TOPDIR)/fs/ocfs2
ifdef BACKING_DEV_CAPABILITIES
EXTRA_CFLAGS += -DBACKING_DEV_CAPABILITIES
Copied: trunk/include/linux/configfs.h (from rev 2338, trunk/fs/configfs/configfs.h)
More information about the Ocfs2-commits
mailing list