staging/lustre: remove the lvfs layer
cover staging/lustre: remove the lvfs layer
From: "John L. Hammond" <[email protected]>
Howdy,
This series removes the lvfs module, its headers, the headers that it headers included but were not needed, and some adjacent compatability code.
James Simmons (2):
staging/lustre/lvfs: remove the lvfs layer
staging/lustre: remove portals_compat25.h
John L. Hammond (5):
staging/lustre: remove linux/lustre_common.h
staging/lustre: remove lvfs_linux.h
staging/lustre: remove unused lvfs code
staging/lustre/libcfs: remove upcall cache
staging/lustre: remove lvfs.h
.../lustre/include/linux/libcfs/libcfs_fail.h | 4 +- .../lustre/include/linux/libcfs/linux/libcfs.h | 1 - .../lustre/include/linux/libcfs/linux/linux-time.h | 2 - .../include/linux/libcfs/linux/portals_compat25.h | 81 ---- .../staging/lustre/include/linux/libcfs/lucache.h | 162 ------- .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 4 +- .../lustre/lnet/klnds/socklnd/socklnd_lib-linux.h | 1 - drivers/staging/lustre/lustre/Makefile | 2 +- drivers/staging/lustre/lustre/include/cl_object.h | 2 +- .../lustre/lustre/include/linux/lustre_common.h | 22 - .../lustre/lustre/include/linux/lustre_compat25.h | 1 - .../lustre/lustre/include/linux/lustre_fsfilt.h | 172 -------- .../lustre/lustre/include/linux/lustre_lite.h | 1 - drivers/staging/lustre/lustre/include/linux/lvfs.h | 134 ------ .../lustre/lustre/include/linux/lvfs_linux.h | 61 --- .../staging/lustre/lustre/include/lustre_fsfilt.h | 48 --- drivers/staging/lustre/lustre/include/lustre_lib.h | 1 - drivers/staging/lustre/lustre/include/lvfs.h | 57 --- drivers/staging/lustre/lustre/include/obd.h | 5 +- drivers/staging/lustre/lustre/include/obd_class.h | 10 - .../staging/lustre/lustre/include/obd_support.h | 2 +- drivers/staging/lustre/lustre/libcfs/Makefile | 2 +- drivers/staging/lustre/lustre/libcfs/hash.c | 3 +- .../lustre/lustre/libcfs/linux/linux-debug.c | 5 +- .../lustre/lustre/libcfs/linux/linux-prim.c | 20 +- .../staging/lustre/lustre/libcfs/upcall_cache.c | 455 -------------------- drivers/staging/lustre/lustre/libcfs/workitem.c | 4 +- drivers/staging/lustre/lustre/llite/file.c | 2 +- drivers/staging/lustre/lustre/lvfs/Makefile | 4 - drivers/staging/lustre/lustre/lvfs/fsfilt.c | 139 ------ drivers/staging/lustre/lustre/lvfs/lvfs_lib.c | 170 -------- drivers/staging/lustre/lustre/lvfs/lvfs_linux.c | 297 ------------- drivers/staging/lustre/lustre/obdclass/Makefile | 2 + .../lustre/lustre/obdclass/lprocfs_counters.c | 139 ++++++ .../lustre/lustre/obdclass/lprocfs_status.c | 79 ++++ .../staging/lustre/lustre/obdclass/obd_config.c | 2 +- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 2 +- drivers/staging/lustre/lustre/obdclass/obdo.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/client.c | 2 - drivers/staging/lustre/lustre/ptlrpc/llog_net.c | 2 - 40 files changed, 251 insertions(+), 1853 deletions(-) delete mode 100644 drivers/staging/lustre/include/linux/libcfs/linux/portals_compat25.h delete mode 100644 drivers/staging/lustre/include/linux/libcfs/lucache.h delete mode 100644 drivers/staging/lustre/lustre/include/linux/lustre_common.h delete mode 100644 drivers/staging/lustre/lustre/include/linux/lustre_fsfilt.h delete mode 100644 drivers/staging/lustre/lustre/include/linux/lvfs.h delete mode 100644 drivers/staging/lustre/lustre/include/linux/lvfs_linux.h delete mode 100644 drivers/staging/lustre/lustre/include/lustre_fsfilt.h delete mode 100644 drivers/staging/lustre/lustre/include/lvfs.h delete mode 100644 drivers/staging/lustre/lustre/libcfs/upcall_cache.c delete mode 100644 drivers/staging/lustre/lustre/lvfs/Makefile delete mode 100644 drivers/staging/lustre/lustre/lvfs/fsfilt.c delete mode 100644 drivers/staging/lustre/lustre/lvfs/lvfs_lib.c delete mode 100644 drivers/staging/lustre/lustre/lvfs/lvfs_linux.c create mode 100644 drivers/staging/lustre/lustre/obdclass/lprocfs_counters.c
Signature · 1 line
1.7.9.5
PATCH 1/7 staging/lustre/lvfs: remove the lvfs layer
From: James Simmons <[email protected]>
The lvfs layer is obsolete and unused by Lustre clients. So remove it and integrate the last of the procfs code into the obdclass layer.
Reviewed-on: http://review.whamcloud.com/5512
--- drivers/staging/lustre/lustre/Makefile | 2 +- .../lustre/lustre/include/linux/lustre_fsfilt.h | 172 ------------ .../lustre/lustre/include/linux/lvfs_linux.h | 2 - .../staging/lustre/lustre/include/lustre_fsfilt.h | 48 ---- drivers/staging/lustre/lustre/include/lustre_lib.h | 1 - drivers/staging/lustre/lustre/include/lvfs.h | 4 +- drivers/staging/lustre/lustre/include/obd.h | 1 - drivers/staging/lustre/lustre/lvfs/Makefile | 4 - drivers/staging/lustre/lustre/lvfs/fsfilt.c | 139 --------- drivers/staging/lustre/lustre/lvfs/lvfs_lib.c | 170 ----------- drivers/staging/lustre/lustre/lvfs/lvfs_linux.c | 297 -------------------- drivers/staging/lustre/lustre/obdclass/Makefile | 2 + .../lustre/lustre/obdclass/lprocfs_counters.c | 139 +++++++++ .../lustre/lustre/obdclass/lprocfs_status.c | 79 ++++++ drivers/staging/lustre/lustre/ptlrpc/llog_net.c | 1 - 15 files changed, 222 insertions(+), 839 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/linux/lustre_fsfilt.h delete mode 100644 drivers/staging/lustre/lustre/include/lustre_fsfilt.h delete mode 100644 drivers/staging/lustre/lustre/lvfs/Makefile delete mode 100644 drivers/staging/lustre/lustre/lvfs/fsfilt.c delete mode 100644 drivers/staging/lustre/lustre/lvfs/lvfs_lib.c delete mode 100644 drivers/staging/lustre/lustre/lvfs/lvfs_linux.c create mode 100644 drivers/staging/lustre/lustre/obdclass/lprocfs_counters.c
drivers/staging/lustre/lustre/Makefile +1 -1
@@ -1,2 +1,2 @@ -obj-$(CONFIG_LUSTRE_FS) += libcfs/ lvfs/ obdclass/ ptlrpc/ fld/ osc/ mgc/ \ +obj-$(CONFIG_LUSTRE_FS) += libcfs/ obdclass/ ptlrpc/ fld/ osc/ mgc/ \ fid/ lov/ mdc/ lmv/ llite/ obdecho/
drivers/staging/lustre/lustre/include/linux/lustre_fsfilt.h deleted +0 -172
172 lines not on this page · raw message
drivers/staging/lustre/lustre/include/linux/lvfs_linux.h +0 -2
@@ -44,8 +44,6 @@#include "../lvfs.h" struct lvfs_run_ctxt ; -struct file *l_dentry_open (struct lvfs_run_ctxt *,struct dentry *, -int flags);struct l_linux_dirent {struct list_head lld_list;
drivers/staging/lustre/lustre/include/lustre_fsfilt.h deleted +0 -48
48 lines not on this page · raw message
drivers/staging/lustre/lustre/include/lustre_lib.h +0 -1
@@ -62,7 +62,6 @@ struct lu_target;struct l_wait_info ;#include "lustre_ha.h" #include "lustre_net.h" -#include "lvfs.h" #define LI_POISON 0x5a5a5a5a#if BITS_PER_LONG >32
drivers/staging/lustre/lustre/include/lvfs.h +1 -3
@@ -47,9 +47,7 @@#include "../../include/linux/libcfs/lucache.h" -/* lvfs_common.c */ -struct dentry *lvfs_fid2dentry (struct lvfs_run_ctxt *,__u64 ,__u32 ,__u64 ,void *data); - +/* lvfs_linux.c */ void push_ctxt (struct lvfs_run_ctxt *save,struct lvfs_run_ctxt *new_ctx,struct lvfs_ucred *cred); void pop_ctxt(struct lvfs_run_ctxt *saved, struct lvfs_run_ctxt *new_ctx,
drivers/staging/lustre/lustre/include/obd.h +0 -1
@@ -883,7 +883,6 @@ struct obd_device {spinlock_t obd_dev_lock;/* protect OBD bitfield above */ struct mutex obd_dev_mutex;__u64 obd_last_committed; -struct fsfilt_operations *obd_fsops;spinlock_t obd_osfs_lock;struct obd_statfs obd_osfs;/* locked by obd_osfs_lock */ __u64 obd_osfs_age;
drivers/staging/lustre/lustre/lvfs/Makefile deleted +0 -4
@@ -1,4 +0,0 @@ -obj-$(CONFIG_LUSTRE_FS) += lvfs.o - -lvfs-y := lvfs_linux.o fsfilt.o -lvfs-$(CONFIG_PROC_FS) += lvfs_lib.o
drivers/staging/lustre/lustre/lvfs/fsfilt.c deleted +0 -139
139 lines not on this page · raw message
drivers/staging/lustre/lustre/lvfs/lvfs_lib.c deleted +0 -170
170 lines not on this page · raw message
drivers/staging/lustre/lustre/lvfs/lvfs_linux.c deleted +0 -297
297 lines not on this page · raw message
drivers/staging/lustre/lustre/obdclass/Makefile +2 -0
@@ -7,3 +7,5 @@ obdclass-y := linux/linux-module.o linux/linux-obdo.o linux/linux-sysctl.o \ statfs_pack.o obdo.o obd_config.o obd_mount.o \ lu_object.o dt_object.o capa.o cl_object.o \ cl_page.o cl_lock.o cl_io.o lu_ref.o acl.o + +obdclass-$(CONFIG_PROC_FS) += lprocfs_counters.o
drivers/staging/lustre/lustre/obdclass/lprocfs_counters.c new file +139 -0
139 lines not on this page · raw message
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c +79 -0
91 lines not on this page · raw message
drivers/staging/lustre/lustre/ptlrpc/llog_net.c +0 -1
@@ -52,7 +52,6 @@#include "../include/lustre_log.h" #include <linux/list.h> #include "../include/lvfs.h" -#include "../include/lustre_fsfilt.h" int llog_initiator_connect (struct llog_ctxt *ctxt) {
Signature · 1 line
1.7.9.5
PATCH 2/7 staging/lustre: remove linux/lustre_common.h
In reply to John L. HammondFrom: "John L. Hammond" <[email protected]>
Expand the two uses of ll_inode_blksize() and remove the then unnecessary header lustre/include/linux/lustre_common.h.
Reviewed-on: http://review.whamcloud.com/11495
--- .../lustre/lustre/include/linux/lustre_common.h | 22 -------------------- .../lustre/lustre/include/linux/lustre_lite.h | 1 - drivers/staging/lustre/lustre/include/linux/lvfs.h | 1 - drivers/staging/lustre/lustre/llite/file.c | 2 +- drivers/staging/lustre/lustre/obdclass/obdo.c | 2 +- 5 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/linux/lustre_common.h
drivers/staging/lustre/lustre/include/linux/lustre_common.h deleted +0 -22
@@ -1,22 +0,0 @@ -#ifndef LUSTRE_COMMON_H -#define LUSTRE_COMMON_H - -#include <linux/sched.h> - -static inline int cfs_cleanup_group_info (void ) -{ -struct group_info *ginfo; - - ginfo =groups_alloc (0 ); -if (!ginfo) -return -ENOMEM ; - -set_current_groups (ginfo); -put_group_info (ginfo); - -return 0 ; -} - -#define ll_inode_blksize (a) (1<<(a)->i_blkbits) - -#endif
drivers/staging/lustre/lustre/include/linux/lustre_lite.h +0 -1
@@ -52,7 +52,6 @@#include <linux/rbtree.h> #include "../../include/linux/lustre_compat25.h" -#include "../../include/linux/lustre_common.h" #include <linux/pagemap.h> /* lprocfs.c */
drivers/staging/lustre/lustre/include/linux/lvfs.h +0 -1
@@ -46,7 +46,6 @@#endif #include "lustre_compat25.h" -#include "lustre_common.h" #include "lvfs_linux.h" #define LLOG_LVFS
drivers/staging/lustre/lustre/llite/file.c +1 -1
@@ -991,7 +991,7 @@ int ll_inode_getattr(struct inode *inode, struct obdo *obdo,CDEBUG (D_INODE ,"objid " DOSTID " size %llu, blocks %llu," " blksize %lu\n" ,POSTID (oi),i_size_read (inode), (unsigned long long )inode->i_blocks, - (unsigned long )ll_inode_blksize (inode)); +1UL << inode->i_blkbits); }ccc_inode_lsm_put (inode, lsm);return rc;
drivers/staging/lustre/lustre/obdclass/obdo.c +1 -1
@@ -86,7 +86,7 @@ void obdo_from_inode(struct obdo *dst, struct inode *src, u32 valid) newvalid |=OBD_MD_FLBLOCKS ; }if (valid &OBD_MD_FLBLKSZ ) {/* optimal block size */ - dst->o_blksize =ll_inode_blksize (src); + dst->o_blksize =1 << src->i_blkbits; newvalid |=OBD_MD_FLBLKSZ ; }if (valid &OBD_MD_FLTYPE ) {
Signature · 1 line
1.7.9.5
PATCH 3/7 staging/lustre: remove portals_compat25.h
In reply to John L. HammondFrom: James Simmons <[email protected]>
Remove include/linux/libcfs/linux/portals_compat25.h.
. remove some unused/unnecessary macros such as smp_num_cpus /
SIGNAL_MASK_ASSERT etc.
. replace some macros with direct kernel API calls such as
RECALC_SIGPENDING/CLEAR_SIGPENDING/CURRENT_SECONDS, cfs_wait_event_interruptible/_exclusive etc.
Reviewed-on: http://review.whamcloud.com/4778
--- .../lustre/include/linux/libcfs/libcfs_fail.h | 4 +- .../lustre/include/linux/libcfs/linux/libcfs.h | 1 - .../lustre/include/linux/libcfs/linux/linux-time.h | 2 - .../include/linux/libcfs/linux/portals_compat25.h | 81 -------------------- .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 4 +- .../lustre/lnet/klnds/socklnd/socklnd_lib-linux.h | 1 - .../lustre/lustre/include/linux/lustre_compat25.h | 1 - drivers/staging/lustre/lustre/libcfs/hash.c | 3 +- .../lustre/lustre/libcfs/linux/linux-debug.c | 5 +- .../lustre/lustre/libcfs/linux/linux-prim.c | 20 ++--- drivers/staging/lustre/lustre/libcfs/workitem.c | 4 +- .../staging/lustre/lustre/obdclass/obd_config.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/client.c | 2 - 13 files changed, 20 insertions(+), 110 deletions(-) delete mode 100644 drivers/staging/lustre/include/linux/libcfs/linux/portals_compat25.h
drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h +2 -2
@@ -156,8 +156,8 @@ static inline void cfs_race(__u32 id) cfs_race_state =0 ;CERROR ("cfs_race id %x sleeping\n" , id); -cfs_wait_event_interruptible (cfs_race_waitq, - cfs_race_state !=0 , rc); + rc =wait_event_interruptible (cfs_race_waitq, + cfs_race_state !=0 );CERROR ("cfs_fail_race id %x awake, rc=%d\n" , id, rc); }else {CERROR ("cfs_fail_race id %x waking\n" , id);
drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h +0 -1
@@ -86,7 +86,6 @@#include "linux-cpu.h" #include "linux-time.h" #include "linux-mem.h" -#include "portals_compat25.h" #define LUSTRE_TRACE_SIZE (THREAD_SIZE >> 5)
drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h +0 -2
@@ -53,8 +53,6 @@#include <linux/time.h> #include <asm/div64.h> -#include "portals_compat25.h" -/* * post 2.5 kernels. */
drivers/staging/lustre/include/linux/libcfs/linux/portals_compat25.h deleted +0 -81
81 lines not on this page · raw message
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c +2 -2
@@ -1537,9 +1537,9 @@ int ksocknal_scheduler(void *arg) nloops =0 ;if (!did_something) {/* wait for something to do */ -cfs_wait_event_interruptible_exclusive ( + rc =wait_event_interruptible_exclusive ( sched->kss_waitq, - !ksocknal_sched_cansleep (sched), rc); + !ksocknal_sched_cansleep (sched));LASSERT (rc ==0 ); }else {cond_resched ();
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib-linux.h +0 -1
@@ -63,7 +63,6 @@#include <linux/syscalls.h> #include "../../../include/linux/libcfs/libcfs.h" -#include "../../../include/linux/libcfs/linux/portals_compat25.h" #include <linux/crc32.h> static inline __u32 ksocknal_csum (__u32 crc,unsigned char const *p,size_t len)
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +0 -1
@@ -39,7 +39,6 @@#include <linux/fs_struct.h> #include <linux/namei.h> -#include "../../../include/linux/libcfs/linux/portals_compat25.h" #include "lustre_patchless_compat.h"
drivers/staging/lustre/lustre/libcfs/hash.c +1 -2
@@ -2092,8 +2092,7 @@ int cfs_hash_debug_str(struct cfs_hash *hs, struct seq_file *m) maxdepb =ffz (~maxdep); } total += bd.bd_bucket->hsb_count; - dist[min (__cfs_fls (bd.bd_bucket->hsb_count/max (theta, -1 )),7 )]++; + dist[min (fls (bd.bd_bucket->hsb_count /max (theta,1 )),7 )]++;cfs_hash_bd_unlock (hs, &bd,0 ); }
drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c +2 -3
@@ -56,7 +56,6 @@# define DEBUG_SUBSYSTEM S_LNET#include "../../../include/linux/libcfs/libcfs.h" -#include "../../../include/linux/libcfs/linux/portals_compat25.h" #include "../tracefile.h"
@@ -86,7 +85,7 @@ void libcfs_run_debug_log_upcall(char *file) argv[2 ] =NULL ; - rc =USERMODEHELPER (argv[0 ], argv, envp); + rc =call_usermodehelper (argv[0 ], argv, envp,1 );if (rc <0 && rc != -ENOENT ) { CERROR("Error %d invoking LNET debug log upcall %s %s; " "check /proc/sys/lnet/debug_log_upcall\n",
@@ -113,7 +112,7 @@ void libcfs_run_upcall(char **argv)LASSERT (argc >=2 ); - rc =USERMODEHELPER (argv[0 ], argv, envp); + rc =call_usermodehelper (argv[0 ], argv, envp,1 );if (rc <0 && rc != -ENOENT ) { CERROR("Error %d invoking LNET upcall %s %s%s%s%s%s%s%s%s; " "check /proc/sys/lnet/upcall\n",
drivers/staging/lustre/lustre/libcfs/linux/linux-prim.c +10 -10
@@ -130,11 +130,11 @@ cfs_block_allsigs(void)unsigned long flags;sigset_t old; -SIGNAL_MASK_LOCK (current, flags); +spin_lock_irqsave (¤t->sighand->siglock, flags); old = current->blocked;sigfillset (¤t->blocked);recalc_sigpending (); -SIGNAL_MASK_UNLOCK (current, flags); +spin_unlock_irqrestore (¤t->sighand->siglock, flags);return old; }
@@ -144,11 +144,11 @@ sigset_t cfs_block_sigs(unsigned long sigs)unsigned long flags;sigset_t old; -SIGNAL_MASK_LOCK (current, flags); +spin_lock_irqsave (¤t->sighand->siglock, flags); old = current->blocked;sigaddsetmask (¤t->blocked, sigs);recalc_sigpending (); -SIGNAL_MASK_UNLOCK (current, flags); +spin_unlock_irqrestore (¤t->sighand->siglock, flags);return old; }
@@ -158,11 +158,11 @@ sigset_t cfs_block_sigsinv(unsigned long sigs)unsigned long flags;sigset_t old; -SIGNAL_MASK_LOCK (current, flags); +spin_lock_irqsave (¤t->sighand->siglock, flags); old = current->blocked;sigaddsetmask (¤t->blocked, ~sigs);recalc_sigpending (); -SIGNAL_MASK_UNLOCK (current, flags); +spin_unlock_irqrestore (¤t->sighand->siglock, flags);return old; }
@@ -172,10 +172,10 @@ cfs_restore_sigs (sigset_t old) {unsigned long flags; -SIGNAL_MASK_LOCK (current, flags); +spin_lock_irqsave (¤t->sighand->siglock, flags); current->blocked = old;recalc_sigpending (); -SIGNAL_MASK_UNLOCK (current, flags); +spin_unlock_irqrestore (¤t->sighand->siglock, flags); }int
@@ -189,9 +189,9 @@ cfs_clear_sigpending(void) {unsigned long flags; -SIGNAL_MASK_LOCK (current, flags); +spin_lock_irqsave (¤t->sighand->siglock, flags);clear_tsk_thread_flag (current,TIF_SIGPENDING ); -SIGNAL_MASK_UNLOCK (current, flags); +spin_unlock_irqrestore (¤t->sighand->siglock, flags); }int
drivers/staging/lustre/lustre/libcfs/workitem.c +2 -2
@@ -288,8 +288,8 @@ cfs_wi_scheduler (void *arg) }cfs_wi_sched_unlock (sched); -cfs_wait_event_interruptible_exclusive (sched->ws_waitq, - !cfs_wi_sched_cansleep (sched), rc); + rc =wait_event_interruptible_exclusive (sched->ws_waitq, + !cfs_wi_sched_cansleep (sched));cfs_wi_sched_lock (sched); }
drivers/staging/lustre/lustre/obdclass/obd_config.c +1 -1
@@ -1067,7 +1067,7 @@ static int process_param2_config(struct lustre_cfg *lcfg) }do_gettimeofday (&start); - rc =USERMODEHELPER (argv[0 ], argv,NULL ); + rc =call_usermodehelper (argv[0 ], argv,NULL ,1 );do_gettimeofday (&end);if (rc <0 ) {
drivers/staging/lustre/lustre/ptlrpc/client.c +0 -2
@@ -2041,8 +2041,6 @@ int ptlrpc_set_next_timeout(struct ptlrpc_request_set *set)struct ptlrpc_request *req;int deadline; -SIGNAL_MASK_ASSERT ();/* XXX BUG 1511 */ -list_for_each (tmp, &set->set_requests) { req = list_entry(tmp, struct ptlrpc_request, rq_set_chain);
Signature · 1 line
1.7.9.5
PATCH 4/7 staging/lustre: remove lvfs_linux.h
In reply to John L. HammondFrom: "John L. Hammond" <[email protected]>
The definitions in lustre/include/linux/lvfs_linux.h are not used so remove that header.
--- drivers/staging/lustre/lustre/include/linux/lvfs.h | 4 +- .../lustre/lustre/include/linux/lvfs_linux.h | 59 -------------------- 2 files changed, 3 insertions(+), 60 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/linux/lvfs_linux.h
drivers/staging/lustre/lustre/include/linux/lvfs.h +3 -1
@@ -45,8 +45,10 @@#error Do not #include this file directly. #include <lvfs.h> instead#endif +#include <linux/kernel.h> +#include <linux/fs.h> +#include <linux/sched.h> #include "lustre_compat25.h" -#include "lvfs_linux.h" #define LLOG_LVFS
drivers/staging/lustre/lustre/include/linux/lvfs_linux.h deleted +0 -59
59 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 5/7 staging/lustre: remove unused lvfs code
In reply to John L. HammondFrom: "John L. Hammond" <[email protected]>
Remove the unused "lvfs" functions obd_lvfs_fid2dentry(), ll_lookup_one_len(), l_dput(), lustre_rename(), push_ctxt(), and pop_ctxt(). Remove the unused members of struct lvfs_run_ctxt.
--- drivers/staging/lustre/lustre/include/linux/lvfs.h | 78 -------------------- drivers/staging/lustre/lustre/include/lvfs.h | 8 -- drivers/staging/lustre/lustre/include/obd_class.h | 10 --- 3 files changed, 96 deletions(-)
drivers/staging/lustre/lustre/include/linux/lvfs.h +0 -78
@@ -50,86 +50,8 @@#include <linux/sched.h> #include "lustre_compat25.h" -#define LLOG_LVFS - -/* simple.c */ - -struct lvfs_ucred { -kuid_t luc_uid; -kgid_t luc_gid; -kuid_t luc_fsuid; -kgid_t luc_fsgid; -kernel_cap_t luc_cap; -__u32 luc_umask; -struct group_info *luc_ginfo; -struct md_identity *luc_identity; -}; - -struct lvfs_callback_ops { -struct dentry *(*l_fid2dentry)(__u64 id_ino,__u32 gen,__u64 gr,void *data); -}; - -#define OBD_RUN_CTXT_MAGIC 0xC0FFEEAA -#define OBD_CTXT_DEBUG /* development-only debugging */ struct lvfs_run_ctxt { -struct vfsmount *pwdmnt; -struct dentry *pwd; -mm_segment_t fs; -struct lvfs_ucred luc; -int ngroups; -struct lvfs_callback_ops cb_ops; -struct group_info *group_info;struct dt_device *dt; -#ifdef OBD_CTXT_DEBUG -__u32 magic; -#endif }; -#ifdef OBD_CTXT_DEBUG -#define OBD_SET_CTXT_MAGIC (ctxt) (ctxt)->magic = OBD_RUN_CTXT_MAGIC -#else -#define OBD_SET_CTXT_MAGIC (ctxt) do {} while (0) -#endif - - -int lustre_rename (struct dentry *dir,struct vfsmount *mnt,char *oldname, -char *newname); - -static inline void l_dput (struct dentry *de) -{ -if (!de ||IS_ERR (de)) -return ; -//shrink_dcache_parent(de); -LASSERT (d_count (de) >0 ); -dput (de); -} - -/* We need to hold the inode semaphore over the dcache lookup itself, or we -* run the risk of entering the filesystem lookup path concurrently on SMP -* systems, and instantiating two inodes for the same entry. We still -* protect against concurrent addition/removal races with the DLM locking. -*/ -static inline struct dentry *ll_lookup_one_len (const char *fid_name, -struct dentry *dparent, -int fid_namelen) -{ -struct dentry *dchild; - -mutex_lock (&dparent->d_inode->i_mutex); - dchild =lookup_one_len (fid_name, dparent, fid_namelen); -mutex_unlock (&dparent->d_inode->i_mutex); - -if (IS_ERR (dchild) || dchild->d_inode ==NULL ) -return dchild; - -if (is_bad_inode (dchild->d_inode)) { -CERROR ("bad inode returned %lu/%u\n" , - dchild->d_inode->i_ino, dchild->d_inode->i_generation); -dput (dchild); - dchild =ERR_PTR (-ENOENT ); - } -return dchild; -} - -#endif
drivers/staging/lustre/lustre/include/lvfs.h +0 -8
@@ -39,17 +39,9 @@#ifndef __LVFS_H__#define __LVFS_H__ -#define LL_FID_NAMELEN (16 + 1 + 8 + 1) -#include "../../include/linux/libcfs/libcfs.h" #include "linux/lvfs.h" #include "../../include/linux/libcfs/lucache.h" - -/* lvfs_linux.c */ -void push_ctxt (struct lvfs_run_ctxt *save,struct lvfs_run_ctxt *new_ctx, -struct lvfs_ucred *cred); -void pop_ctxt (struct lvfs_run_ctxt *saved,struct lvfs_run_ctxt *new_ctx, -struct lvfs_ucred *cred);#endif
drivers/staging/lustre/lustre/include/obd_class.h +0 -10
@@ -1090,16 +1090,6 @@ static inline int obd_destroy_export(struct obd_export *exp)return 0 ; } -static inline struct dentry * -obd_lvfs_fid2dentry (struct obd_export *exp,struct ost_id *oi,__u32 gen) -{ -struct lvfs_run_ctxt *ctxt = &exp->exp_obd->obd_lvfs_ctxt; -LASSERT (exp->exp_obd); - -return ctxt->cb_ops.l_fid2dentry (ostid_id (oi), gen,ostid_seq (oi), - exp->exp_obd); -} -/* @max_age is the oldest time in jiffies that we accept using a cached data. * If the cache is older than @max_age we will get a new value from the * target. Use a value of "cfs_time_current() + HZ" to guarantee freshness. */
Signature · 1 line
1.7.9.5
PATCH 6/7 staging/lustre/libcfs: remove upcall cache
In reply to John L. HammondFrom: "John L. Hammond" <[email protected]>
The upcall cache is unused so remove include/linux/libcfs/lucache.h and lustre/libcfs/upcall_cache.c.
--- .../staging/lustre/include/linux/libcfs/lucache.h | 162 ------- drivers/staging/lustre/lustre/include/lvfs.h | 2 - drivers/staging/lustre/lustre/libcfs/Makefile | 2 +- .../staging/lustre/lustre/libcfs/upcall_cache.c | 455 -------------------- 4 files changed, 1 insertion(+), 620 deletions(-) delete mode 100644 drivers/staging/lustre/include/linux/libcfs/lucache.h delete mode 100644 drivers/staging/lustre/lustre/libcfs/upcall_cache.c
drivers/staging/lustre/include/linux/libcfs/lucache.h deleted +0 -162
@@ -1,162 +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) 2012, Intel Corporation. -*/ -/* -* This file is part of Lustre, http://www.lustre.org/ -* Lustre is a trademark of Sun Microsystems, Inc. -*/ - -#ifndef _LUCACHE_H -#define _LUCACHE_H - -#include "libcfs.h" - -/** \defgroup ucache ucache -* -* @{ -*/ - -#define UC_CACHE_NEW 0x01 -#define UC_CACHE_ACQUIRING 0x02 -#define UC_CACHE_INVALID 0x04 -#define UC_CACHE_EXPIRED 0x08 - -#define UC_CACHE_IS_NEW (i) ((i)->ue_flags & UC_CACHE_NEW) -#define UC_CACHE_IS_INVALID (i) ((i)->ue_flags & UC_CACHE_INVALID) -#define UC_CACHE_IS_ACQUIRING (i) ((i)->ue_flags & UC_CACHE_ACQUIRING) -#define UC_CACHE_IS_EXPIRED (i) ((i)->ue_flags & UC_CACHE_EXPIRED) -#define UC_CACHE_IS_VALID (i) ((i)->ue_flags == 0) - -#define UC_CACHE_SET_NEW (i) (i)->ue_flags |= UC_CACHE_NEW -#define UC_CACHE_SET_INVALID (i) (i)->ue_flags |= UC_CACHE_INVALID -#define UC_CACHE_SET_ACQUIRING (i) (i)->ue_flags |= UC_CACHE_ACQUIRING -#define UC_CACHE_SET_EXPIRED (i) (i)->ue_flags |= UC_CACHE_EXPIRED -#define UC_CACHE_SET_VALID (i) (i)->ue_flags = 0 - -#define UC_CACHE_CLEAR_NEW (i) (i)->ue_flags &= ~UC_CACHE_NEW -#define UC_CACHE_CLEAR_ACQUIRING (i) (i)->ue_flags &= ~UC_CACHE_ACQUIRING -#define UC_CACHE_CLEAR_INVALID (i) (i)->ue_flags &= ~UC_CACHE_INVALID -#define UC_CACHE_CLEAR_EXPIRED (i) (i)->ue_flags &= ~UC_CACHE_EXPIRED - -struct upcall_cache_entry ; - -struct md_perm { -lnet_nid_t mp_nid; -__u32 mp_perm; -}; - -struct md_identity { -struct upcall_cache_entry *mi_uc_entry; -uid_t mi_uid; -gid_t mi_gid; -struct group_info *mi_ginfo; -int mi_nperms; -struct md_perm *mi_perms; -}; - -struct upcall_cache_entry { -struct list_head ue_hash; -__u64 ue_key; -atomic_t ue_refcount; -int ue_flags; -wait_queue_head_t ue_waitq; -unsigned long ue_acquire_expire; -unsigned long ue_expire; -union { -struct md_identity identity; - } u; -}; - -#define UC_CACHE_HASH_SIZE (128) -#define UC_CACHE_HASH_INDEX (id) ((id) & (UC_CACHE_HASH_SIZE - 1)) -#define UC_CACHE_UPCALL_MAXPATH (1024UL) - -struct upcall_cache ; - -struct upcall_cache_ops { -void (*init_entry)(struct upcall_cache_entry *,void *args); -void (*free_entry)(struct upcall_cache *, -struct upcall_cache_entry *); -int (*upcall_compare)(struct upcall_cache *, -struct upcall_cache_entry *, -__u64 key,void *args); -int (*downcall_compare)(struct upcall_cache *, -struct upcall_cache_entry *, -__u64 key,void *args); -int (*do_upcall)(struct upcall_cache *, -struct upcall_cache_entry *); -int (*parse_downcall)(struct upcall_cache *, -struct upcall_cache_entry *,void *); -}; - -struct upcall_cache { -struct list_head uc_hashtable[UC_CACHE_HASH_SIZE ]; -spinlock_t uc_lock; -rwlock_t uc_upcall_rwlock; - -char uc_name[40 ];/* for upcall */ -char uc_upcall[UC_CACHE_UPCALL_MAXPATH ]; -int uc_acquire_expire;/* seconds */ -int uc_entry_expire;/* seconds */ -struct upcall_cache_ops *uc_ops; -}; - -struct upcall_cache_entry *upcall_cache_get_entry (struct upcall_cache *cache, -__u64 key,void *args); -void upcall_cache_put_entry (struct upcall_cache *cache, -struct upcall_cache_entry *entry); -int upcall_cache_downcall (struct upcall_cache *cache,__u32 err,__u64 key, -void *args); -void upcall_cache_flush_idle (struct upcall_cache *cache); -void upcall_cache_flush_all (struct upcall_cache *cache); -void upcall_cache_flush_one (struct upcall_cache *cache,__u64 key,void *args); -struct upcall_cache *upcall_cache_init (const char *name,const char *upcall, -struct upcall_cache_ops *ops); -void upcall_cache_cleanup (struct upcall_cache *cache); - -#if 0 -struct upcall_cache_entry *upcall_cache_get_entry (struct upcall_cache *hash, -__u64 key,__u32 primary, -__u32 ngroups,__u32 *groups); -void upcall_cache_put_entry (struct upcall_cache *hash, -struct upcall_cache_entry *entry); -int upcall_cache_downcall (struct upcall_cache *hash,__u32 err,__u64 key, -__u32 primary,__u32 ngroups,__u32 *groups); -void upcall_cache_flush_idle (struct upcall_cache *cache); -void upcall_cache_flush_all (struct upcall_cache *cache); -struct upcall_cache *upcall_cache_init (const char *name); -void upcall_cache_cleanup (struct upcall_cache *hash); - -#endif - -/** @} ucache */ - -#endif /* _LUCACHE_H */
drivers/staging/lustre/lustre/include/lvfs.h +0 -2
@@ -42,6 +42,4 @@#include "../../include/linux/libcfs/libcfs.h" #include "linux/lvfs.h" -#include "../../include/linux/libcfs/lucache.h" -#endif
drivers/staging/lustre/lustre/libcfs/Makefile +1 -1
@@ -12,7 +12,7 @@ libcfs-linux-objs := $(addprefix linux/,$(libcfs-linux-objs)) libcfs-all-objs := debug.o fail.o nidstrings.o module.o tracefile.o \ libcfs_string.o hash.o kernel_user_comm.o \ - prng.o workitem.o upcall_cache.o libcfs_cpu.o \ + prng.o workitem.o libcfs_cpu.o \ libcfs_mem.o libcfs_lock.o libcfs-objs := $(libcfs-linux-objs) $(libcfs-all-objs)
drivers/staging/lustre/lustre/libcfs/upcall_cache.c deleted +0 -455
455 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 7/7 staging/lustre: remove lvfs.h
In reply to John L. HammondFrom: "John L. Hammond" <[email protected]>
Move the definition of struct lvfs_run_ctxt to the one file that needed it (lustre/include/obd.h). Remove the then unneeded headers lustre/include/lvfs.h and lustre/include/linux/lvfs.h.
--- drivers/staging/lustre/lustre/include/cl_object.h | 2 +- drivers/staging/lustre/lustre/include/linux/lvfs.h | 57 -------------------- drivers/staging/lustre/lustre/include/lvfs.h | 45 ---------------- drivers/staging/lustre/lustre/include/obd.h | 4 ++ .../staging/lustre/lustre/include/obd_support.h | 2 +- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/llog_net.c | 1 - 7 files changed, 7 insertions(+), 106 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/linux/lvfs.h delete mode 100644 drivers/staging/lustre/lustre/include/lvfs.h
drivers/staging/lustre/lustre/include/cl_object.h +1 -1
@@ -98,7 +98,7 @@* super-class definitions. */ #include "lu_object.h" -#include "lvfs.h" +#include "linux/lustre_compat25.h" #include <linux/mutex.h> #include <linux/radix-tree.h>
drivers/staging/lustre/lustre/include/linux/lvfs.h deleted +0 -57
57 lines not on this page · raw message
drivers/staging/lustre/lustre/include/lvfs.h deleted +0 -45
45 lines not on this page · raw message
drivers/staging/lustre/lustre/include/obd.h +4 -0
@@ -830,6 +830,10 @@ struct obd_llog_group {#define OBD_DEVICE_MAGIC 0XAB5CD6EF#define OBD_DEV_BY_DEVNAME 0xffffd0de +struct lvfs_run_ctxt { +struct dt_device *dt; +}; +struct obd_device {struct obd_type *obd_type;__u32 obd_magic;
drivers/staging/lustre/lustre/include/obd_support.h +1 -1
@@ -39,7 +39,7 @@#include <linux/slab.h> #include "../../include/linux/libcfs/libcfs.h" -#include "lvfs.h" +#include "linux/lustre_compat25.h" #include "lprocfs_status.h" /* global variables */
drivers/staging/lustre/lustre/obdclass/obd_mount.c +1 -1
@@ -46,7 +46,7 @@#define PRINT_CMD CDEBUG#include "../include/obd.h" -#include "../include/lvfs.h" +#include "../include/linux/lustre_compat25.h" #include "../include/obd_class.h" #include "../include/lustre/lustre_user.h" #include "../include/lustre_log.h"
drivers/staging/lustre/lustre/ptlrpc/llog_net.c +0 -1
@@ -51,7 +51,6 @@#include "../include/obd_class.h" #include "../include/lustre_log.h" #include <linux/list.h> -#include "../include/lvfs.h" int llog_initiator_connect (struct llog_ctxt *ctxt) {
Signature · 1 line
1.7.9.5