staging/lustre flatten some headers
cover staging/lustre flatten some headers
This series removes several headers from lustre/include/linux by taking whatever was worthwhile from linux/lustre_barf.h and moving it to lustre_barf.h or to wherever it's needed.
PATCH 1/11 staging/lustre: remove linux/lprocfs_status.h
From: "John L. Hammond" <[email protected]>
Remove lustre/include/linux/lprocfs_status.h. Include linux/statfs.h where needed.
--- .../lustre/lustre/include/linux/lprocfs_status.h | 57 -------------------- .../staging/lustre/lustre/include/lprocfs_status.h | 6 ++- drivers/staging/lustre/lustre/include/lustre_lib.h | 1 + drivers/staging/lustre/lustre/llite/llite_lib.c | 1 + .../staging/lustre/lustre/obdclass/statfs_pack.c | 2 +- 5 files changed, 8 insertions(+), 59 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/linux/lprocfs_status.h
drivers/staging/lustre/lustre/include/linux/lprocfs_status.h deleted +0 -57
@@ -1,57 +0,0 @@ -/* -* GPL HEADER START -* -* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 only, -* as published by the Free Software Foundation. -* -* 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 version 2 for more details (a copy is included -* in the LICENSE file that accompanied this code). -* -* You should have received a copy of the GNU General Public License -* version 2 along with this program; If not, see -* http://www.sun.com/software/products/lustre/docs/GPLv2.pdf -* -* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -* CA 95054 USA or visit www.sun.com if you need additional information or -* have any questions. -* -* GPL HEADER END -*/ -/* -* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. -* Use is subject to license terms. -* -* Copyright (c) 2011, Intel Corporation. -*/ -/* -* This file is part of Lustre, http://www.lustre.org/ -* Lustre is a trademark of Sun Microsystems, Inc. -* -* lustre/include/linux/lprocfs_status.h -* -* Top level header file for LProc SNMP -* -* Author: Hariharan Thantry [email protected] -*/ -#ifndef _LINUX_LPROCFS_SNMP_H -#define _LINUX_LPROCFS_SNMP_H - -#ifndef _LPROCFS_SNMP_H -#error Do not #include this file directly. #include <lprocfs_status.h> instead -#endif - -#include <linux/proc_fs.h> -#include <linux/seq_file.h> -#include <linux/smp.h> -#include <linux/rwsem.h> -#include "../../../include/linux/libcfs/libcfs.h" -#include <linux/statfs.h> - - -#endif /* LPROCFS_SNMP_H */
drivers/staging/lustre/lustre/include/lprocfs_status.h +5 -1
@@ -42,7 +42,11 @@#ifndef _LPROCFS_SNMP_H#define _LPROCFS_SNMP_H -#include "linux/lprocfs_status.h" +#include <linux/proc_fs.h> +#include <linux/seq_file.h> +#include <linux/spinlock.h> +#include <linux/types.h> +#include "lustre/lustre_idl.h" struct lprocfs_vars {
drivers/staging/lustre/lustre/include/lustre_lib.h +1 -0
@@ -53,6 +53,7 @@#include "linux/lustre_lib.h" /* target.c */ +struct kstatfs ;struct ptlrpc_request ;struct obd_export ;struct lu_target ;
drivers/staging/lustre/lustre/llite/llite_lib.c +1 -0
@@ -41,6 +41,7 @@#define DEBUG_SUBSYSTEM S_LLITE#include <linux/module.h> +#include <linux/statfs.h> #include <linux/types.h> #include <linux/mm.h>
drivers/staging/lustre/lustre/obdclass/statfs_pack.c +1 -1
@@ -40,7 +40,7 @@#define DEBUG_SUBSYSTEM S_CLASS - +#include <linux/statfs.h> #include "../include/lustre_export.h" #include "../include/lustre_net.h" #include "../include/obd_support.h"
Signature · 1 line
1.7.9.5
PATCH 2/11 staging/lustre remove linux/lustre_acl.h
In reply to John L. HammondFrom: "John L. Hammond" <[email protected]>
Move the contents of lustre/include/linux/lustre_acl.h to lustre/include/lustre_acl.h and remove the first header.
--- .../lustre/lustre/include/linux/lustre_acl.h | 66 -------------------- drivers/staging/lustre/lustre/include/lustre_acl.h | 9 ++- 2 files changed, 8 insertions(+), 67 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/linux/lustre_acl.h
drivers/staging/lustre/lustre/include/linux/lustre_acl.h deleted +0 -66
@@ -1,66 +0,0 @@ -/* -* GPL HEADER START -* -* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 only, -* as published by the Free Software Foundation. -* -* 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 version 2 for more details (a copy is included -* in the LICENSE file that accompanied this code). -* -* You should have received a copy of the GNU General Public License -* version 2 along with this program; If not, see -* http://www.sun.com/software/products/lustre/docs/GPLv2.pdf -* -* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -* CA 95054 USA or visit www.sun.com if you need additional information or -* have any questions. -* -* GPL HEADER END -*/ -/* -* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. -* Use is subject to license terms. -*/ -/* -* Copyright (c) 2011, Intel Corporation. -*/ -/* -* This file is part of Lustre, http://www.lustre.org/ -* Lustre is a trademark of Sun Microsystems, Inc. -* -* lustre/lustre/include/lustre_acl.h -* -* MDS data structures. -* See also lustre_idl.h for wire formats of requests. -*/ - -#ifndef _LUSTRE_LINUX_ACL_H -#define _LUSTRE_LINUX_ACL_H - -#ifndef _LUSTRE_ACL_H -#error Should not include directly. use #include <lustre_acl.h> instead -#endif - -#include <linux/fs.h> -#include <linux/dcache.h> - -#include <linux/posix_acl_xattr.h> -#define LUSTRE_POSIX_ACL_MAX_ENTRIES 32 -#define LUSTRE_POSIX_ACL_MAX_SIZE \ - (sizeof(posix_acl_xattr_header) + \ - LUSTRE_POSIX_ACL_MAX_ENTRIES * sizeof(posix_acl_xattr_entry)) - -#include "lustre_intent.h" -#include <linux/xattr.h> /* XATTR_{REPLACE,CREATE} */ - -#ifndef LUSTRE_POSIX_ACL_MAX_SIZE -# define LUSTRE_POSIX_ACL_MAX_SIZE 0 -#endif - -#endif /* _LUSTRE_LINUX_ACL_H */
drivers/staging/lustre/lustre/include/lustre_acl.h +8 -1
@@ -37,6 +37,13 @@#ifndef _LUSTRE_ACL_H#define _LUSTRE_ACL_H -#include "linux/lustre_acl.h" +#include <linux/fs.h> +#include <linux/dcache.h> +#include <linux/posix_acl_xattr.h> + +#define LUSTRE_POSIX_ACL_MAX_ENTRIES 32 +#define LUSTRE_POSIX_ACL_MAX_SIZE \ + (sizeof(posix_acl_xattr_header) + \ + LUSTRE_POSIX_ACL_MAX_ENTRIES * sizeof(posix_acl_xattr_entry))#endif
Signature · 1 line
1.7.9.5
PATCH 3/11 staging/lustre: remove linux/lustre_dlm.h
In reply to John L. HammondFrom: "John L. Hammond" <[email protected]>
Remove the superfluous header lustre/include/linux/lustre_dlm.h.
--- .../lustre/lustre/include/linux/lustre_dlm.h | 46 -------------------- drivers/staging/lustre/lustre/include/lustre_dlm.h | 2 - 2 files changed, 48 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/linux/lustre_dlm.h
drivers/staging/lustre/lustre/include/linux/lustre_dlm.h deleted +0 -46
@@ -1,46 +0,0 @@ -/* -* GPL HEADER START -* -* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 only, -* as published by the Free Software Foundation. -* -* 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 version 2 for more details (a copy is included -* in the LICENSE file that accompanied this code). -* -* You should have received a copy of the GNU General Public License -* version 2 along with this program; If not, see -* http://www.sun.com/software/products/lustre/docs/GPLv2.pdf -* -* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -* CA 95054 USA or visit www.sun.com if you need additional information or -* have any questions. -* -* GPL HEADER END -*/ -/* -* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. -* Use is subject to license terms. -*/ -/* -* This file is part of Lustre, http://www.lustre.org/ -* Lustre is a trademark of Sun Microsystems, Inc. -*/ - -#ifndef _LINUX_LUSTRE_DLM_H__ -#define _LINUX_LUSTRE_DLM_H__ - -#ifndef _LUSTRE_DLM_H__ -#error Do not #include this file directly. #include <lprocfs_status.h> instead -#endif - -# include <linux/proc_fs.h> -# include <asm/processor.h> -# include <linux/bit_spinlock.h> - -#endif
drivers/staging/lustre/lustre/include/lustre_dlm.h +0 -2
@@ -48,8 +48,6 @@#ifndef _LUSTRE_DLM_H__#define _LUSTRE_DLM_H__ -#include "linux/lustre_dlm.h" -#include "lustre_lib.h" #include "lustre_net.h" #include "lustre_import.h"
Signature · 1 line
1.7.9.5
PATCH 4/11 staging/lustre: remove linux/lustre_handles.h
In reply to John L. HammondFrom: "John L. Hammond" <[email protected]>
Remove lustre/include/linux/lustre_acl.h and kill the cfs_rcu_head_t typedef.
--- .../lustre/lustre/include/linux/lustre_handles.h | 52 -------------------- .../staging/lustre/lustre/include/lustre_handles.h | 10 ++-- .../lustre/lustre/obdclass/lustre_handles.c | 2 +- 3 files changed, 8 insertions(+), 56 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/linux/lustre_handles.h
drivers/staging/lustre/lustre/include/linux/lustre_handles.h deleted +0 -52
@@ -1,52 +0,0 @@ -/* -* GPL HEADER START -* -* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 only, -* as published by the Free Software Foundation. -* -* 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 version 2 for more details (a copy is included -* in the LICENSE file that accompanied this code). -* -* You should have received a copy of the GNU General Public License -* version 2 along with this program; If not, see -* http://www.sun.com/software/products/lustre/docs/GPLv2.pdf -* -* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -* CA 95054 USA or visit www.sun.com if you need additional information or -* have any questions. -* -* GPL HEADER END -*/ -/* -* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. -* Use is subject to license terms. -*/ -/* -* This file is part of Lustre, http://www.lustre.org/ -* Lustre is a trademark of Sun Microsystems, Inc. -*/ - -#ifndef __LINUX_LUSTRE_HANDLES_H_ -#define __LINUX_LUSTRE_HANDLES_H_ - -#ifndef __LUSTRE_HANDLES_H_ -#error Do not #include this file directly. #include <lustre_handles.h> instead -#endif - -#include <asm/types.h> -#include <asm/atomic.h> -#include <linux/list.h> -#include <linux/spinlock.h> -#include <linux/types.h> - -#include <linux/rcupdate.h> /* for rcu_head{} */ -typedef struct rcu_head cfs_rcu_head_t ; - - -#endif
drivers/staging/lustre/lustre/include/lustre_handles.h +7 -3
@@ -42,7 +42,11 @@* @{ */ -#include "linux/lustre_handles.h" +#include <linux/atomic.h> +#include <linux/list.h> +#include <linux/rcupdate.h> +#include <linux/spinlock.h> +#include <linux/types.h> #include "../../include/linux/libcfs/libcfs.h"
@@ -69,7 +73,7 @@ struct portals_handle {struct portals_handle_ops *h_ops;/* newly added fields to handle the RCU issue. -jxiong */ -cfs_rcu_head_t h_rcu; +struct rcu_head h_rcu;spinlock_t h_lock; unsigned int h_size:31; unsigned int h_in:1;
@@ -84,7 +88,7 @@ void class_handle_hash(struct portals_handle *,void class_handle_unhash (struct portals_handle *);void class_handle_hash_back (struct portals_handle *);void *class_handle2object (__u64 cookie); -void class_handle_free_cb (cfs_rcu_head_t *); +void class_handle_free_cb (struct rcu_head *rcu);int class_handle_init (void );void class_handle_cleanup (void );
drivers/staging/lustre/lustre/obdclass/lustre_handles.c +1 -1
@@ -178,7 +178,7 @@ void *class_handle2object(__u64 cookie) }EXPORT_SYMBOL (class_handle2object); -void class_handle_free_cb (cfs_rcu_head_t *rcu) +void class_handle_free_cb (struct rcu_head *rcu) {struct portals_handle *h =RCU2HANDLE (rcu);void *ptr = (void *)(unsigned long )h->h_cookie;
Signature · 1 line
1.7.9.5
PATCH 5/11 staging/lustre: move lustre_intent.h to ..
In reply to John L. HammondFrom: "John L. Hammond" <[email protected]>
Move lustre/include/linux/lustre_intent.h to lustre/include.
--- .../lustre/lustre/include/linux/lustre_intent.h | 62 -------------------- drivers/staging/lustre/lustre/include/linux/obd.h | 2 +- .../staging/lustre/lustre/include/lustre_intent.h | 62 ++++++++++++++++++++ drivers/staging/lustre/lustre/include/lustre_mdc.h | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 2 +- .../staging/lustre/lustre/llite/llite_internal.h | 2 +- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 2 +- 8 files changed, 68 insertions(+), 68 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/linux/lustre_intent.h create mode 100644 drivers/staging/lustre/lustre/include/lustre_intent.h
drivers/staging/lustre/lustre/include/linux/lustre_intent.h deleted +0 -62
@@ -1,62 +0,0 @@ -/* -* GPL HEADER START -* -* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 only, -* as published by the Free Software Foundation. -* -* 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 version 2 for more details (a copy is included -* in the LICENSE file that accompanied this code). -* -* You should have received a copy of the GNU General Public License -* version 2 along with this program; If not, see -* http://www.sun.com/software/products/lustre/docs/GPLv2.pdf -* -* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -* CA 95054 USA or visit www.sun.com if you need additional information or -* have any questions. -* -* GPL HEADER END -*/ -/* -* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. -* Use is subject to license terms. -* -* Copyright (c) 2011, Intel Corporation. -*/ -/* -* This file is part of Lustre, http://www.lustre.org/ -* Lustre is a trademark of Sun Microsystems, Inc. -*/ - -#ifndef LUSTRE_INTENT_H -#define LUSTRE_INTENT_H - -/* intent IT_XXX are defined in lustre/include/obd.h */ -struct lustre_intent_data { -int it_disposition; -int it_status; -__u64 it_lock_handle; -__u64 it_lock_bits; -int it_lock_mode; -int it_remote_lock_mode; -__u64 it_remote_lock_handle; -void *it_data; -unsigned int it_lock_set:1 ; -}; - -struct lookup_intent { -int it_op; -int it_create_mode; -__u64 it_flags; -union { -struct lustre_intent_data lustre; - } d; -}; - -#endif
drivers/staging/lustre/lustre/include/linux/obd.h +1 -1
@@ -48,7 +48,7 @@# include <linux/sched.h> /* for struct task_struct, for current.h */ # include <linux/proc_fs.h> # include <linux/mount.h> -#include "lustre_intent.h" +#include "../lustre_intent.h" struct ll_iattr {struct iattr iattr;
drivers/staging/lustre/lustre/include/lustre_intent.h new file +62 -0
62 lines not on this page · raw message
drivers/staging/lustre/lustre/include/lustre_mdc.h +1 -1
@@ -50,7 +50,7 @@#include <linux/fs.h> #include <linux/dcache.h> -#include "linux/lustre_intent.h" +#include "lustre_intent.h" #include "lustre_handles.h" #include "../../include/linux/libcfs/libcfs.h" #include "obd_class.h"
drivers/staging/lustre/lustre/ldlm/ldlm_lock.c +1 -1
@@ -42,7 +42,7 @@#define DEBUG_SUBSYSTEM S_LDLM#include "../../include/linux/libcfs/libcfs.h" -#include "../include/linux/lustre_intent.h" +#include "../include/lustre_intent.h" #include "../include/obd_class.h" #include "ldlm_internal.h"
drivers/staging/lustre/lustre/llite/llite_internal.h +1 -1
@@ -45,7 +45,7 @@#include "../include/cl_object.h" #include "../include/lclient.h" #include "../include/lustre_mdc.h" -#include "../include/linux/lustre_intent.h" +#include "../include/lustre_intent.h" #include <linux/compat.h> #include <linux/posix_acl_xattr.h>
drivers/staging/lustre/lustre/lmv/lmv_intent.c +1 -1
@@ -41,7 +41,7 @@#include <asm/div64.h> #include <linux/seq_file.h> #include <linux/namei.h> -#include "../include/linux/lustre_intent.h" +#include "../include/lustre_intent.h" #include "../include/obd_support.h" #include "../include/lustre/lustre_idl.h" #include "../include/lustre_lib.h"
drivers/staging/lustre/lustre/mdc/mdc_locks.c +1 -1
@@ -38,7 +38,7 @@# include <linux/module.h> -#include "../include/linux/lustre_intent.h" +#include "../include/lustre_intent.h" #include "../include/obd.h" #include "../include/obd_class.h" #include "../include/lustre_dlm.h"
Signature · 1 line
1.7.9.5
PATCH 6/11 staging/lustre: remove linux/lustre_lib.h
In reply to John L. HammondFrom: "John L. Hammond" <[email protected]>
Inline the only call to inode_init_lvb(). Move some definitions from lustre/include/linux/lustre_lib.h to lustre/include/lustre_lib.h and remove the first header.
--- .../lustre/lustre/include/linux/lustre_lib.h | 85 -------------------- drivers/staging/lustre/lustre/include/lustre_lib.h | 17 +++- drivers/staging/lustre/lustre/llite/file.c | 7 +- 3 files changed, 22 insertions(+), 87 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/linux/lustre_lib.h
drivers/staging/lustre/lustre/include/linux/lustre_lib.h deleted +0 -85
@@ -1,85 +0,0 @@ -/* -* GPL HEADER START -* -* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 only, -* as published by the Free Software Foundation. -* -* 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 version 2 for more details (a copy is included -* in the LICENSE file that accompanied this code). -* -* You should have received a copy of the GNU General Public License -* version 2 along with this program; If not, see -* http://www.sun.com/software/products/lustre/docs/GPLv2.pdf -* -* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -* CA 95054 USA or visit www.sun.com if you need additional information or -* have any questions. -* -* GPL HEADER END -*/ -/* -* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. -* Use is subject to license terms. -* -* Copyright (c) 2011, Intel Corporation. -*/ -/* -* This file is part of Lustre, http://www.lustre.org/ -* Lustre is a trademark of Sun Microsystems, Inc. -* -* lustre/include/linux/lustre_lib.h -* -* Basic Lustre library routines. -*/ - -#ifndef _LINUX_LUSTRE_LIB_H -#define _LINUX_LUSTRE_LIB_H - -#ifndef _LUSTRE_LIB_H -#error Do not #include this file directly. #include <lustre_lib.h> instead -#endif - -# include <linux/rwsem.h> -# include <linux/sched.h> -# include <linux/signal.h> -# include <linux/types.h> -#include "lustre_compat25.h" -#include "lustre_common.h" - -#ifndef LP_POISON -# define LI_POISON 0x5a5a5a5a -#if BITS_PER_LONG >32 -# define LL_POISON 0x5a5a5a5a5a5a5a5aL -#else -# define LL_POISON 0x5a5a5a5aL -#endif -# define LP_POISON ((void *)LL_POISON) -#endif - -/* This macro is only for compatibility reasons with older Linux Lustre user -* tools. New ioctls should NOT use this macro as the ioctl "size". Instead -* the ioctl should get a "size" argument which is the actual data type used -* by the ioctl, to ensure the ioctl interface is versioned correctly. */ -#define OBD_IOC_DATA_TYPE long - -#define LUSTRE_FATAL_SIGS (sigmask(SIGKILL) | sigmask(SIGINT) | \ - sigmask(SIGTERM) | sigmask(SIGQUIT) | \ - sigmask(SIGALRM)) - -/* initialize ost_lvb according to inode */ -static inline void inode_init_lvb (struct inode *inode,struct ost_lvb *lvb) -{ - lvb->lvb_size =i_size_read (inode); - lvb->lvb_blocks = inode->i_blocks; - lvb->lvb_mtime =LTIME_S (inode->i_mtime); - lvb->lvb_atime =LTIME_S (inode->i_atime); - lvb->lvb_ctime =LTIME_S (inode->i_ctime); -} - -#endif /* _LUSTRE_LIB_H */
drivers/staging/lustre/lustre/include/lustre_lib.h +16 -1
@@ -46,11 +46,13 @@* @{ */ +#include <linux/sched.h> +#include <linux/signal.h> +#include <linux/types.h> #include "../../include/linux/libcfs/libcfs.h" #include "lustre/lustre_idl.h" #include "lustre_ver.h" #include "lustre_cfg.h" -#include "linux/lustre_lib.h" /* target.c */ struct kstatfs ;
@@ -62,6 +64,13 @@ struct l_wait_info;#include "lustre_net.h" #include "lvfs.h" +#define LI_POISON 0x5a5a5a5a +#if BITS_PER_LONG >32 +# define LL_POISON 0x5a5a5a5a5a5a5a5aL +#else +# define LL_POISON 0x5a5a5a5aL +#endif +#define LP_POISON ((void *)LL_POISON)int target_pack_pool_reply (struct ptlrpc_request *req); int do_set_info_async(struct obd_import *imp,
@@ -270,6 +279,8 @@ static inline void obd_ioctl_freedata(char *buf, int len)* we change _IOR to _IOWR so BSD will copyin obd_ioctl_data * for us. Does this change affect Linux? (XXX Liang) */ +#define OBD_IOC_DATA_TYPE long +#define OBD_IOC_CREATE _IOWR('f', 101, OBD_IOC_DATA_TYPE)#define OBD_IOC_DESTROY _IOW ('f', 104, OBD_IOC_DATA_TYPE)#define OBD_IOC_PREALLOCATE _IOWR('f', 105, OBD_IOC_DATA_TYPE)
@@ -509,6 +520,10 @@ struct l_wait_info {#define LWI_INTR (cb, data) LWI_TIMEOUT_INTR(0, NULL, cb, data) +#define LUSTRE_FATAL_SIGS (sigmask(SIGKILL) | sigmask(SIGINT) | \ + sigmask(SIGTERM) | sigmask(SIGQUIT) | \ + sigmask(SIGALRM)) +/* * wait for @condition to become true, but no longer than timeout, specified
drivers/staging/lustre/lustre/llite/file.c +6 -1
@@ -994,7 +994,12 @@ int ll_merge_lvb(const struct lu_env *env, struct inode *inode)LTIME_S (inode->i_atime) = lli->lli_lvb.lvb_atime;LTIME_S (inode->i_mtime) = lli->lli_lvb.lvb_mtime;LTIME_S (inode->i_ctime) = lli->lli_lvb.lvb_ctime; -inode_init_lvb (inode, &lvb); + + lvb.lvb_size =i_size_read (inode); + lvb.lvb_blocks = inode->i_blocks; + lvb.lvb_mtime =LTIME_S (inode->i_mtime); + lvb.lvb_atime =LTIME_S (inode->i_atime); + lvb.lvb_ctime =LTIME_S (inode->i_ctime);cl_object_attr_lock (obj); rc =cl_object_attr_get (env, obj, attr);
Signature · 1 line
1.7.9.5
PATCH 7/11 staging/lustre: remove linux/lustre_log.h
In reply to John L. HammondFrom: "John L. Hammond" <[email protected]>
Remove the superfluous header lustre/include/linux/lustre_log.h.
--- .../lustre/lustre/include/linux/lustre_log.h | 57 -------------------- drivers/staging/lustre/lustre/include/lustre_log.h | 2 - 2 files changed, 59 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/linux/lustre_log.h
drivers/staging/lustre/lustre/include/linux/lustre_log.h deleted +0 -57
@@ -1,57 +0,0 @@ -/* -* GPL HEADER START -* -* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 only, -* as published by the Free Software Foundation. -* -* 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 version 2 for more details (a copy is included -* in the LICENSE file that accompanied this code). -* -* You should have received a copy of the GNU General Public License -* version 2 along with this program; If not, see -* http://www.sun.com/software/products/lustre/docs/GPLv2.pdf -* -* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -* CA 95054 USA or visit www.sun.com if you need additional information or -* have any questions. -* -* GPL HEADER END -*/ -/* -* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. -* Use is subject to license terms. -*/ -/* -* This file is part of Lustre, http://www.lustre.org/ -* Lustre is a trademark of Sun Microsystems, Inc. -* -* lustre/include/linux/lustre_log.h -* -* Generic infrastructure for managing a collection of logs. -* These logs are used for: -* - orphan recovery: OST adds record on create -* - mtime/size consistency: the OST adds a record on first write -* - open/unlinked objects: OST adds a record on destroy -* -* - mds unlink log: the MDS adds an entry upon delete -* -* - raid1 replication log between OST's -* - MDS replication logs -*/ - -#ifndef _LINUX_LUSTRE_LOG_H -#define _LINUX_LUSTRE_LOG_H - -#ifndef _LUSTRE_LOG_H -#error Do not #include this file directly. #include <lustre_log.h> instead -#endif - -#define LUSTRE_LOG_SERVER - -#endif
drivers/staging/lustre/lustre/include/lustre_log.h +0 -2
@@ -56,8 +56,6 @@* @{ */ -#include "linux/lustre_log.h" -#include "obd_class.h" #include "obd_ost.h" #include "lustre/lustre_idl.h"
Signature · 1 line
1.7.9.5
PATCH 8/11 staging/lustre: remove linux/lustre_net.h
In reply to John L. HammondFrom: "John L. Hammond" <[email protected]>
Remove the superfluous header lustre/include/linux/lustre_net.h.
--- .../lustre/lustre/include/linux/lustre_net.h | 49 -------------------- drivers/staging/lustre/lustre/include/lustre_net.h | 2 - drivers/staging/lustre/lustre/ptlrpc/service.c | 4 -- 3 files changed, 55 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/linux/lustre_net.h
drivers/staging/lustre/lustre/include/linux/lustre_net.h deleted +0 -49
@@ -1,49 +0,0 @@ -/* -* GPL HEADER START -* -* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 only, -* as published by the Free Software Foundation. -* -* 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 version 2 for more details (a copy is included -* in the LICENSE file that accompanied this code). -* -* You should have received a copy of the GNU General Public License -* version 2 along with this program; If not, see -* http://www.sun.com/software/products/lustre/docs/GPLv2.pdf -* -* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -* CA 95054 USA or visit www.sun.com if you need additional information or -* have any questions. -* -* GPL HEADER END -*/ -/* -* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. -* Use is subject to license terms. -*/ -/* -* This file is part of Lustre, http://www.lustre.org/ -* Lustre is a trademark of Sun Microsystems, Inc. -*/ - -#ifndef _LINUX_LUSTRE_NET_H -#define _LINUX_LUSTRE_NET_H - -#ifndef _LUSTRE_NET_H -#error Do not #include this file directly. #include <lustre_net.h> instead -#endif - -#include <linux/workqueue.h> - -/* XXX Liang: should be moved to other header instead of here */ -#ifndef WITH_GROUP_INFO -#define WITH_GROUP_INFO -#endif - -#endif
drivers/staging/lustre/lustre/include/lustre_net.h +0 -2
@@ -55,8 +55,6 @@* @{ */ -#include "linux/lustre_net.h" -#include "../../include/linux/libcfs/libcfs.h" // #include <obd.h> #include "../../include/linux/lnet/lnet.h"
drivers/staging/lustre/lustre/ptlrpc/service.c +0 -4
@@ -2262,9 +2262,7 @@ static int ptlrpc_main(void *arg)struct ptlrpc_service_part *svcpt = thread->t_svcpt;struct ptlrpc_service *svc = svcpt->scp_service;struct ptlrpc_reply_state *rs; -#ifdef WITH_GROUP_INFO struct group_info *ginfo =NULL ; -#endif struct lu_env *env;int counter =0 , rc =0 ;
@@ -2280,7 +2278,6 @@ static int ptlrpc_main(void *arg) svc->srv_name, thread->t_name, svcpt->scp_cpt); } -#ifdef WITH_GROUP_INFO ginfo =groups_alloc (0 );if (!ginfo) { rc = -ENOMEM ;
@@ -2289,7 +2286,6 @@ static int ptlrpc_main(void *arg)set_current_groups (ginfo);put_group_info (ginfo); -#endif if (svc->srv_ops.so_thr_init !=NULL ) { rc = svc->srv_ops.so_thr_init (thread);
Signature · 1 line
1.7.9.5
PATCH 9/11 staging/lustre: remove linux/lustre_quota.h
In reply to John L. HammondFrom: "John L. Hammond" <[email protected]>
Remove the superfluous header lustre/include/linux/lustre_quota.h.
--- .../lustre/lustre/include/linux/lustre_quota.h | 46 -------------------- .../staging/lustre/lustre/include/lustre_quota.h | 4 +- 2 files changed, 3 insertions(+), 47 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/linux/lustre_quota.h
drivers/staging/lustre/lustre/include/linux/lustre_quota.h deleted +0 -46
@@ -1,46 +0,0 @@ -/* -* GPL HEADER START -* -* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 only, -* as published by the Free Software Foundation. -* -* 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 version 2 for more details (a copy is included -* in the LICENSE file that accompanied this code). -* -* You should have received a copy of the GNU General Public License -* version 2 along with this program; If not, see -* http://www.sun.com/software/products/lustre/docs/GPLv2.pdf -* -* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -* CA 95054 USA or visit www.sun.com if you need additional information or -* have any questions. -* -* GPL HEADER END -*/ -/* -* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. -* Use is subject to license terms. -*/ -/* -* This file is part of Lustre, http://www.lustre.org/ -* Lustre is a trademark of Sun Microsystems, Inc. -*/ - -#ifndef _LINUX_LUSTRE_QUOTA_H -#define _LINUX_LUSTRE_QUOTA_H - -#ifndef _LUSTRE_QUOTA_H -#error Do not #include this file directly. #include <lustre_quota.h> instead -#endif - -#include <linux/fs.h> -#include <linux/quota.h> -#include <linux/quotaops.h> - -#endif /* _LUSTRE_QUOTA_H */
drivers/staging/lustre/lustre/include/lustre_quota.h +3 -1
@@ -32,7 +32,9 @@* */ -#include "linux/lustre_quota.h" +#include <linux/fs.h> +#include <linux/quota.h> +#include <linux/quotaops.h> #include "dt_object.h" #include "lustre_fid.h"
Signature · 1 line
1.7.9.5
PATCH 10/11 staging/lustre: remove linux/obd_class.h
In reply to John L. HammondFrom: "John L. Hammond" <[email protected]>
Kill the macro ll_inode_flags() and remove the superfluous header lustre/include/linux/obd_class.h.
--- .../lustre/lustre/include/linux/obd_class.h | 58 -------------------- drivers/staging/lustre/lustre/include/obd_class.h | 9 ++- drivers/staging/lustre/lustre/obdclass/obdo.c | 2 +- 3 files changed, 8 insertions(+), 61 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/linux/obd_class.h
drivers/staging/lustre/lustre/include/linux/obd_class.h deleted +0 -58
@@ -1,58 +0,0 @@ -/* -* GPL HEADER START -* -* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 only, -* as published by the Free Software Foundation. -* -* 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 version 2 for more details (a copy is included -* in the LICENSE file that accompanied this code). -* -* You should have received a copy of the GNU General Public License -* version 2 along with this program; If not, see -* http://www.sun.com/software/products/lustre/docs/GPLv2.pdf -* -* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -* CA 95054 USA or visit www.sun.com if you need additional information or -* have any questions. -* -* GPL HEADER END -*/ -/* -* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. -* Use is subject to license terms. -* -* Copyright (c) 2011, 2012, Intel Corporation. -*/ -/* -* This file is part of Lustre, http://www.lustre.org/ -* Lustre is a trademark of Sun Microsystems, Inc. -*/ - -#ifndef __LINUX_CLASS_OBD_H -#define __LINUX_CLASS_OBD_H - -#ifndef __CLASS_OBD_H -#error Do not #include this file directly. #include <obd_class.h> instead -#endif - -#include <asm/uaccess.h> -#include <linux/types.h> -#include <linux/fs.h> -#include <linux/time.h> -#include <linux/timer.h> - -/* obdo.c */ -void obdo_from_la (struct obdo *dst,struct lu_attr *la,__u64 valid); -void la_from_obdo (struct lu_attr *la,struct obdo *dst,u32 valid); -void obdo_refresh_inode (struct inode *dst,struct obdo *src,u32 valid); -void obdo_to_inode (struct inode *dst,struct obdo *src,u32 valid); -#define ll_inode_flags (inode) (inode->i_flags) - - -#endif /* __LINUX_OBD_CLASS_H */
drivers/staging/lustre/lustre/include/obd_class.h +7 -2
@@ -45,8 +45,6 @@#include "lustre/lustre_idl.h" #include "lprocfs_status.h" -#include "linux/obd_class.h" -#define OBD_STATFS_NODELAY 0x0001/* requests should be send without delay * and resends for avoid deadlocks */ #define OBD_STATFS_FROM_CACHE 0x0002/* the statfs callback should not update
@@ -307,6 +305,13 @@ static inline enum obd_option exp_flags_from_obd(struct obd_device *obd) 0); } +struct inode ; +struct lu_attr ; +struct obdo ; +void obdo_from_la (struct obdo *dst,struct lu_attr *la,__u64 valid); +void la_from_obdo (struct lu_attr *la,struct obdo *dst,u32 valid); +void obdo_refresh_inode (struct inode *dst,struct obdo *src,u32 valid); +void obdo_to_inode (struct inode *dst,struct obdo *src,u32 valid);void obdo_cpy_md (struct obdo *dst,struct obdo *src,u32 valid);void obdo_to_ioobj (struct obdo *oa,struct obd_ioobj *ioobj);
drivers/staging/lustre/lustre/obdclass/obdo.c +1 -1
@@ -108,7 +108,7 @@ void obdo_from_inode(struct obdo *dst, struct inode *src, u32 valid) newvalid |=OBD_MD_FLGID ; }if (valid &OBD_MD_FLFLAGS ) { - dst->o_flags =ll_inode_flags (src); + dst->o_flags = src->i_flags; newvalid |=OBD_MD_FLFLAGS ; } dst->o_valid |= newvalid;
Signature · 1 line
1.7.9.5
PATCH 11/11 staging/lustre: remove linux/obd_support.h
In reply to John L. HammondFrom: "John L. Hammond" <[email protected]>
Remove the superfluous header lustre/include/linux/obd_support.h.
--- .../lustre/lustre/include/linux/obd_support.h | 63 -------------------- .../staging/lustre/lustre/include/obd_support.h | 2 +- 2 files changed, 1 insertion(+), 64 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/linux/obd_support.h
drivers/staging/lustre/lustre/include/linux/obd_support.h deleted +0 -63
@@ -1,63 +0,0 @@ -/* -* GPL HEADER START -* -* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 only, -* as published by the Free Software Foundation. -* -* 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 version 2 for more details (a copy is included -* in the LICENSE file that accompanied this code). -* -* You should have received a copy of the GNU General Public License -* version 2 along with this program; If not, see -* http://www.sun.com/software/products/lustre/docs/GPLv2.pdf -* -* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -* CA 95054 USA or visit www.sun.com if you need additional information or -* have any questions. -* -* GPL HEADER END -*/ -/* -* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. -* Use is subject to license terms. -* -* Copyright (c) 2011, 2012, Intel Corporation. -*/ -/* -* This file is part of Lustre, http://www.lustre.org/ -* Lustre is a trademark of Sun Microsystems, Inc. -*/ - -#ifndef _LINUX_OBD_SUPPORT -#define _LINUX_OBD_SUPPORT - -#ifndef _OBD_SUPPORT -#error Do not #include this file directly. #include <obd_support.h> instead -#endif - -#ifdef CONFIG_X86 -#include <asm/cpufeature.h> -#endif -#include <asm/processor.h> -#include <linux/seq_file.h> -#include <linux/module.h> -#include <linux/slab.h> -#include <linux/highmem.h> -#include <linux/swap.h> -#include "../../include/linux/lustre_compat25.h" -#include "lustre_common.h" -#include "../../../include/linux/libcfs/libcfs.h" -#include "../lustre/lustre_idl.h" - - -# include <linux/types.h> -# include <linux/blkdev.h> -# include "../lvfs.h" - -#endif
drivers/staging/lustre/lustre/include/obd_support.h +1 -1
@@ -37,10 +37,10 @@#ifndef _OBD_SUPPORT#define _OBD_SUPPORT +#include <linux/slab.h> #include "../../include/linux/libcfs/libcfs.h" #include "lvfs.h" #include "lprocfs_status.h" -#include "linux/obd_support.h" /* global variables */ extern struct lprocfs_stats *obd_memory;
Signature · 1 line
1.7.9.5
Quoted 3 lines · John L. Hammond
This series removes several headers from lustre/include/linux by taking whatever was worthwhile from
linux/lustre_barf.hand moving it tolustre_barf.hor to wherever it's needed.
Very nice, all now applied, thanks.
greg k-h