Whamcloud - gitweb
LU-1330 obdclass: add obd_target.h 78/2678/10
authorLiu Xuezhao <xuezhao.liu@emc.com>
Mon, 17 Dec 2012 14:25:19 +0000 (22:25 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 1 Jul 2013 21:26:01 +0000 (21:26 +0000)
Move some server-side data structures form obd.h to obd_target.h.  To
remove some code dependencies use HAVE_SERVER_SUPPORT to protect some
llog/fsfilt_* functions.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I4e79f76220cc194c31ca4005ff6286a4a6bd72e9
Reviewed-on: http://review.whamcloud.com/2678
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
21 files changed:
lustre/include/Makefile.am
lustre/include/linux/lustre_fsfilt.h
lustre/include/obd.h
lustre/include/obd_target.h [new file with mode: 0644]
lustre/ldlm/ldlm_lib.c
lustre/lvfs/lvfs_linux.c
lustre/mdd/mdd_internal.h
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_mds.c
lustre/mgc/libmgc.c
lustre/obdclass/Makefile.in
lustre/obdclass/autoMakefile.am
lustre/obdclass/lprocfs_status.c
lustre/obdclass/obd_mount.c
lustre/obdclass/obd_mount_server.c
lustre/osd-zfs/osd_index.c
lustre/osd-zfs/osd_io.c
lustre/osd-zfs/osd_object.c
lustre/osd-zfs/osd_xattr.c
lustre/ptlrpc/llog_net.c
lustre/quota/lproc_quota.c

index 7b0b369..97202f9 100644 (file)
@@ -40,15 +40,55 @@ SUBDIRS = linux lustre
 
 DIST_SUBDIRS = linux lustre darwin
 
 
 DIST_SUBDIRS = linux lustre darwin
 
-EXTRA_DIST = ioctl.h liblustre.h lprocfs_status.h lustre_cfg.h         \
-            lustre_debug.h lustre_disk.h lustre_dlm.h lustre_export.h \
-             lustre_fsfilt.h lustre_ha.h lustre_handles.h lustre_import.h \
-             lustre_lib.h lustre_sec.h lustre_lite.h lustre_log.h lustre_mds.h \
-             lustre_mdc.h lustre_net.h lustre_quota.h lvfs.h \
-             obd_cache.h obd_class.h obd.h obd_lov.h lustre_dlm_flags.h \
-            obd_ost.h obd_support.h lustre_ver.h lu_object.h \
-             md_object.h dt_object.h lustre_param.h lustre_mdt.h \
-             lustre_fid.h lustre_fld.h lustre_req_layout.h lustre_capa.h \
-             lustre_idmap.h lustre_eacl.h interval_tree.h obd_cksum.h \
-            lu_ref.h cl_object.h lustre_acl.h lclient.h lu_target.h \
-            lustre_update.h lustre_linkea.h lustre_lfsck.h
+EXTRA_DIST = \
+       cl_object.h \
+       dt_object.h \
+       interval_tree.h \
+       ioctl.h \
+       lclient.h \
+       liblustre.h \
+       lprocfs_status.h \
+       lu_object.h \
+       lu_ref.h \
+       lustre_acl.h \
+       lustre_capa.h \
+       lustre_cfg.h \
+       lustre_debug.h \
+       lustre_disk.h \
+       lustre_dlm_flags.h \
+       lustre_dlm.h \
+       lustre_eacl.h \
+       lustre_export.h \
+       lustre_fid.h \
+       lustre_fld.h \
+       lustre_fsfilt.h \
+       lustre_ha.h \
+       lustre_handles.h \
+       lustre_idmap.h \
+       lustre_import.h \
+       lustre_lfsck.h \
+       lustre_lib.h \
+       lustre_linkea.h \
+       lustre_lite.h \
+       lustre_log.h \
+       lustre_mdc.h \
+       lustre_mds.h \
+       lustre_mdt.h \
+       lustre_net.h \
+       lustre_param.h \
+       lustre_quota.h \
+       lustre_req_layout.h \
+       lustre_sec.h \
+       lustre_update.h \
+       lustre_ver.h \
+       lu_target.h \
+       lvfs.h \
+       md_object.h \
+       obd_cache.h \
+       obd_cksum.h \
+       obd_class.h \
+       obd.h \
+       obd_lov.h \
+       obd_ost.h \
+       obd_support.h \
+       obd_target.h
index aed29d8..e320817 100644 (file)
@@ -146,16 +146,6 @@ static inline int fsfilt_commit(struct obd_device *obd, struct inode *inode,
         return rc;
 }
 
         return rc;
 }
 
-static inline int fsfilt_map_inode_pages(struct obd_device *obd,
-                                        struct inode *inode,
-                                        struct page **page, int pages,
-                                        unsigned long *blocks,
-                                        int create, struct mutex *mutex)
-{
-        return obd->obd_fsops->fs_map_inode_pages(inode, page, pages, blocks,
-                                                 create, mutex);
-}
-
 static inline int fsfilt_read_record(struct obd_device *obd, struct file *file,
                                      void *buf, loff_t size, loff_t *offs)
 {
 static inline int fsfilt_read_record(struct obd_device *obd, struct file *file,
                                      void *buf, loff_t size, loff_t *offs)
 {
index 9747623..6afec97 100644 (file)
 #define IOC_MDC_MAX_NR       50
 
 #include <lustre/lustre_idl.h>
 #define IOC_MDC_MAX_NR       50
 
 #include <lustre/lustre_idl.h>
+#include <lustre_lib.h>
+#include <libcfs/bitmap.h>
 #ifdef HAVE_SERVER_SUPPORT
 # include <lu_target.h>
 #ifdef HAVE_SERVER_SUPPORT
 # include <lu_target.h>
+# include <obd_target.h>
 #endif
 #include <lu_ref.h>
 #endif
 #include <lu_ref.h>
-#include <lustre_lib.h>
 #include <lustre_export.h>
 #include <lustre_fid.h>
 #include <lustre_fld.h>
 #include <lustre_capa.h>
 
 #include <lustre_export.h>
 #include <lustre_fid.h>
 #include <lustre_fld.h>
 #include <lustre_capa.h>
 
-#include <libcfs/bitmap.h>
-
-
 #define MAX_OBD_DEVICES 8192
 
 struct osc_async_rc {
 #define MAX_OBD_DEVICES 8192
 
 struct osc_async_rc {
@@ -265,33 +264,6 @@ struct brw_page {
        obd_flag flag;
 };
 
        obd_flag flag;
 };
 
-/* Individual type definitions */
-
-struct ost_server_data;
-
-struct osd_properties {
-        size_t osd_max_ea_size;
-};
-
-#define OBT_MAGIC       0xBDDECEAE
-/* hold common fields for "target" device */
-struct obd_device_target {
-        __u32                     obt_magic;
-        __u32                     obt_instance;
-        struct super_block       *obt_sb;
-        /** last_rcvd file */
-        struct file              *obt_rcvd_filp;
-#ifdef HAVE_SERVER_SUPPORT
-        struct lu_target         *obt_lut;
-#endif
-        __u64                     obt_mount_count;
-       struct rw_semaphore       obt_rwsem;
-        struct vfsmount          *obt_vfsmnt;
-        struct file              *obt_health_check_filp;
-       struct osd_properties     obt_osd_properties;
-       struct obd_job_stats      obt_jobstats;
-};
-
 /* llog contexts */
 enum llog_ctxt_id {
         LLOG_CONFIG_ORIG_CTXT  =  0,
 /* llog contexts */
 enum llog_ctxt_id {
         LLOG_CONFIG_ORIG_CTXT  =  0,
@@ -312,94 +284,6 @@ enum llog_ctxt_id {
         LLOG_MAX_CTXTS
 };
 
         LLOG_MAX_CTXTS
 };
 
-#define FILTER_SUBDIR_COUNT      32            /* set to zero for no subdirs */
-
-struct filter_subdirs {
-       struct dentry *dentry[FILTER_SUBDIR_COUNT];
-};
-
-
-struct filter_ext {
-        __u64                fe_start;
-        __u64                fe_end;
-};
-
-struct filter_obd {
-       /* NB this field MUST be first */
-       struct obd_device_target fo_obt;
-       const char              *fo_fstype;
-
-       int                     fo_group_count;
-       struct dentry           *fo_dentry_O;
-       struct dentry           **fo_dentry_O_groups;
-       struct filter_subdirs   *fo_dentry_O_sub;
-       struct mutex            fo_init_lock;   /* group initialization lock*/
-       int                     fo_committed_group;
-
-       spinlock_t              fo_objidlock;   /* protect fo_lastobjid */
-
-       unsigned long           fo_destroys_in_progress;
-       struct mutex            fo_create_locks[FILTER_SUBDIR_COUNT];
-
-        cfs_list_t fo_export_list;
-        int                  fo_subdir_count;
-
-        obd_size             fo_tot_dirty;      /* protected by obd_osfs_lock */
-        obd_size             fo_tot_granted;    /* all values in bytes */
-        obd_size             fo_tot_pending;
-        int                  fo_tot_granted_clients;
-
-        obd_size             fo_readcache_max_filesize;
-       spinlock_t              fo_flags_lock;
-        unsigned int         fo_read_cache:1,   /**< enable read-only cache */
-                             fo_writethrough_cache:1,/**< read cache writes */
-                             fo_mds_ost_sync:1, /**< MDS-OST orphan recovery*/
-                             fo_raid_degraded:1;/**< RAID device degraded */
-
-        struct obd_import   *fo_mdc_imp;
-        struct obd_uuid      fo_mdc_uuid;
-        struct lustre_handle fo_mdc_conn;
-        struct file        **fo_last_objid_files;
-        __u64               *fo_last_objids; /* last created objid for groups,
-                                              * protected by fo_objidlock */
-
-       struct mutex            fo_alloc_lock;
-
-        cfs_atomic_t         fo_r_in_flight;
-        cfs_atomic_t         fo_w_in_flight;
-
-       /*
-        * per-filter pool of kiobuf's allocated by filter_common_setup() and
-        * torn down by filter_cleanup().
-        *
-        * This pool contains kiobuf used by
-        * filter_{prep,commit}rw_{read,write}() and is shared by all OST
-        * threads.
-        *
-        * Locking: protected by internal lock of cfs_hash, pool can be
-        * found from this hash table by t_id of ptlrpc_thread.
-        */
-       struct cfs_hash         *fo_iobuf_hash;
-
-        struct brw_stats         fo_filter_stats;
-
-        int                      fo_fmd_max_num; /* per exp filter_mod_data */
-        int                      fo_fmd_max_age; /* jiffies to fmd expiry */
-        unsigned long            fo_syncjournal:1, /* sync journal on writes */
-                                 fo_sync_lock_cancel:2;/* sync on lock cancel */
-
-
-        /* sptlrpc stuff */
-       rwlock_t                fo_sptlrpc_lock;
-        struct sptlrpc_rule_set  fo_sptlrpc_rset;
-
-        /* capability related */
-        unsigned int             fo_fl_oss_capa;
-        cfs_list_t               fo_capa_keys;
-        cfs_hlist_head_t        *fo_capa_hash;
-        int                      fo_sec_level;
-};
-
 struct timeout_item {
         enum timeout_event ti_event;
         cfs_time_t         ti_timeout;
 struct timeout_item {
         enum timeout_event ti_event;
         cfs_time_t         ti_timeout;
@@ -565,25 +449,6 @@ struct obd_id_info {
         obd_id  *data;
 };
 
         obd_id  *data;
 };
 
-/* */
-
-struct echo_obd {
-       struct obd_device_target eo_obt;
-       struct obdo             eo_oa;
-       spinlock_t               eo_lock;
-       __u64                    eo_lastino;
-       struct lustre_handle    eo_nl_lock;
-       cfs_atomic_t            eo_prep;
-};
-
-struct ost_obd {
-       struct ptlrpc_service   *ost_service;
-       struct ptlrpc_service   *ost_create_service;
-       struct ptlrpc_service   *ost_io_service;
-       struct ptlrpc_service   *ost_seq_service;
-       struct mutex            ost_health_mutex;
-};
-
 struct echo_client_obd {
        struct obd_export       *ec_exp;   /* the local connection to osc/lov */
        spinlock_t              ec_lock;
 struct echo_client_obd {
        struct obd_export       *ec_exp;   /* the local connection to osc/lov */
        spinlock_t              ec_lock;
@@ -1071,19 +936,21 @@ struct obd_device {
         cfs_list_t                       obd_final_req_queue;
         int                              obd_recovery_stage;
 
         cfs_list_t                       obd_final_req_queue;
         int                              obd_recovery_stage;
 
-        union {
-                struct obd_device_target obt;
-                struct filter_obd filter;
-                struct client_obd cli;
-                struct ost_obd ost;
-                struct echo_client_obd echo_client;
-                struct echo_obd echo;
-                struct lov_obd lov;
-                struct lmv_obd lmv;
-        } u;
-        /* Fields used by LProcFS */
-        unsigned int           obd_cntr_base;
-        struct lprocfs_stats  *obd_stats;
+       union {
+#ifdef HAVE_SERVER_SUPPORT
+               struct obd_device_target obt;
+               struct filter_obd filter;
+               struct ost_obd ost;
+               struct echo_obd echo;
+#endif
+               struct client_obd cli;
+               struct echo_client_obd echo_client;
+               struct lov_obd lov;
+               struct lmv_obd lmv;
+       } u;
+       /* Fields used by LProcFS */
+       unsigned int           obd_cntr_base;
+       struct lprocfs_stats  *obd_stats;
 
         unsigned int           md_cntr_base;
         struct lprocfs_stats  *md_stats;
 
         unsigned int           md_cntr_base;
         struct lprocfs_stats  *md_stats;
@@ -1626,13 +1493,13 @@ static inline struct md_open_data *obd_mod_alloc(void)
 }
 
 #define obd_mod_get(mod) cfs_atomic_inc(&(mod)->mod_refcount)
 }
 
 #define obd_mod_get(mod) cfs_atomic_inc(&(mod)->mod_refcount)
-#define obd_mod_put(mod)                                        \
-({                                                              \
-        if (cfs_atomic_dec_and_test(&(mod)->mod_refcount)) {          \
-                if ((mod)->mod_open_req)                          \
-                        ptlrpc_req_finished((mod)->mod_open_req);   \
-                OBD_FREE_PTR(mod);                              \
-        }                                                       \
+#define obd_mod_put(mod)                                          \
+({                                                                \
+       if (cfs_atomic_dec_and_test(&(mod)->mod_refcount)) {      \
+               if ((mod)->mod_open_req)                          \
+                       ptlrpc_req_finished((mod)->mod_open_req); \
+               OBD_FREE_PTR(mod);                                \
+       }                                                         \
 })
 
 void obdo_from_inode(struct obdo *dst, struct inode *src, obd_flag valid);
 })
 
 void obdo_from_inode(struct obdo *dst, struct inode *src, obd_flag valid);
diff --git a/lustre/include/obd_target.h b/lustre/include/obd_target.h
new file mode 100644 (file)
index 0000000..0d7ea23
--- /dev/null
@@ -0,0 +1,83 @@
+/* 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, 2012, Intel, Inc.
+ */
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ * Lustre is a trademark of Sun Microsystems, Inc.
+ */
+
+#ifndef __OBD_TARGET_H
+#define __OBD_TARGET_H
+
+/* server-side individual type definitions */
+
+#define OBT_MAGIC       0xBDDECEAE
+/* hold common fields for "target" device */
+struct obd_device_target {
+       __u32                   obt_magic;
+       __u32                   obt_instance;
+       struct lu_target       *obt_lut;
+       __u64                   obt_mount_count;
+       struct obd_job_stats    obt_jobstats;
+};
+
+#define FILTER_SUBDIR_COUNT 32 /* set to zero for no subdirs */
+
+struct filter_obd {
+       /* NB this field MUST be first */
+       struct obd_device_target        fo_obt;
+       rwlock_t                        fo_sptlrpc_lock;
+       struct sptlrpc_rule_set         fo_sptlrpc_rset;
+
+       /* capability related */
+       unsigned int                    fo_fl_oss_capa;
+       cfs_list_t                      fo_capa_keys;
+       cfs_hlist_head_t               *fo_capa_hash;
+       int                             fo_sec_level;
+};
+
+struct echo_obd {
+       struct obd_device_target        eo_obt;
+       struct obdo                     eo_oa;
+       spinlock_t                      eo_lock;
+       __u64                           eo_lastino;
+       struct lustre_handle            eo_nl_lock;
+       cfs_atomic_t                    eo_prep;
+};
+
+struct ost_obd {
+       struct ptlrpc_service          *ost_service;
+       struct ptlrpc_service          *ost_create_service;
+       struct ptlrpc_service          *ost_io_service;
+       struct ptlrpc_service          *ost_seq_service;
+       struct mutex                    ost_health_mutex;
+};
+
+#endif /* __OBD_TARGET_H */
index 8879797..eafe743 100644 (file)
@@ -1627,7 +1627,6 @@ check_and_start_recovery_timer(struct obd_device *obd,
 {
         int service_time = lustre_msg_get_service_time(req->rq_reqmsg);
         struct obd_device_target *obt = &obd->u.obt;
 {
         int service_time = lustre_msg_get_service_time(req->rq_reqmsg);
         struct obd_device_target *obt = &obd->u.obt;
-        struct lustre_sb_info *lsi;
 
         if (!new_client && service_time)
                 /* Teach server about old server's estimates, as first guess
 
         if (!new_client && service_time)
                 /* Teach server about old server's estimates, as first guess
@@ -1647,12 +1646,9 @@ check_and_start_recovery_timer(struct obd_device *obd,
         service_time += 2 * INITIAL_CONNECT_TIMEOUT;
 
         LASSERT(obt->obt_magic == OBT_MAGIC);
         service_time += 2 * INITIAL_CONNECT_TIMEOUT;
 
         LASSERT(obt->obt_magic == OBT_MAGIC);
-        lsi = s2lsi(obt->obt_sb);
-       if (!(lsi->lsi_flags | LDD_F_IR_CAPABLE))
-                service_time += 2 * (CONNECTION_SWITCH_MAX +
-                                     CONNECTION_SWITCH_INC);
-        if (service_time > obd->obd_recovery_timeout && !new_client)
-                extend_recovery_timer(obd, service_time, false);
+       service_time += 2 * (CONNECTION_SWITCH_MAX + CONNECTION_SWITCH_INC);
+       if (service_time > obd->obd_recovery_timeout && !new_client)
+               extend_recovery_timer(obd, service_time, false);
 }
 
 /** Health checking routines */
 }
 
 /** Health checking routines */
index b7f3c8c..8252d53 100644 (file)
@@ -48,7 +48,6 @@
 #include <linux/quotaops.h>
 #include <linux/version.h>
 #include <libcfs/libcfs.h>
 #include <linux/quotaops.h>
 #include <linux/version.h>
 #include <libcfs/libcfs.h>
-#include <lustre_fsfilt.h>
 #include <obd.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <obd.h>
 #include <linux/module.h>
 #include <linux/init.h>
index 2c34466..4d965d9 100644 (file)
@@ -45,7 +45,6 @@
 #include <lustre_eacl.h>
 #include <md_object.h>
 #include <dt_object.h>
 #include <lustre_eacl.h>
 #include <md_object.h>
 #include <dt_object.h>
-#include <lustre_fsfilt.h>
 #include <lustre_lfsck.h>
 #include <lustre_fid.h>
 #include <lustre_capa.h>
 #include <lustre_lfsck.h>
 #include <lustre_fid.h>
 #include <lustre_capa.h>
index 0597b6c..4873b02 100644 (file)
 
 #if defined(__KERNEL__)
 
 
 #if defined(__KERNEL__)
 
-/*
- * struct ptlrpc_client
- */
+#include <obd_class.h>
 #include <lustre_net.h>
 #include <lustre_net.h>
-#include <obd.h>
-/*
- * struct obd_connect_data
- * struct lustre_handle
- */
 #include <lustre/lustre_idl.h>
 #include <lustre_disk.h>
 #include <lu_target.h>
 #include <lustre/lustre_idl.h>
 #include <lustre_disk.h>
 #include <lu_target.h>
@@ -71,7 +64,6 @@
 #include <lvfs.h>
 #include <lustre_idmap.h>
 #include <lustre_eacl.h>
 #include <lvfs.h>
 #include <lustre_idmap.h>
 #include <lustre_eacl.h>
-#include <lustre_fsfilt.h>
 #include <lustre_quota.h>
 
 /* check if request's xid is equal to last one or not*/
 #include <lustre_quota.h>
 
 /* check if request's xid is equal to last one or not*/
index 4e06880..ab00870 100644 (file)
@@ -54,7 +54,6 @@
 #include <lustre_quota.h>
 #include <lustre_acl.h>
 #include <lustre_param.h>
 #include <lustre_quota.h>
 #include <lustre_acl.h>
 #include <lustre_param.h>
-#include <lustre_fsfilt.h>
 
 struct mds_device {
        /* super-class */
 
 struct mds_device {
        /* super-class */
index 4ba5fe3..ff98ece 100644 (file)
 #include <obd_class.h>
 #include <lustre_dlm.h>
 #include <lustre_log.h>
 #include <obd_class.h>
 #include <lustre_dlm.h>
 #include <lustre_log.h>
-#include <lustre_fsfilt.h>
 #include <lustre_disk.h>
 
 #include <lustre_disk.h>
 
-
 static int mgc_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
 {
         int rc;
 static int mgc_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
 {
         int rc;
index 69238d0..aee15cb 100644 (file)
@@ -10,7 +10,7 @@ sources:
 obdclass-all-objs := llog.o llog_cat.o llog_obd.o llog_swab.o
 @LDISKFS_ENABLED_TRUE@ obdclass-all-objs += llog_lvfs.o
 obdclass-all-objs += class_obd.o debug.o genops.o uuid.o llog_ioctl.o
 obdclass-all-objs := llog.o llog_cat.o llog_obd.o llog_swab.o
 @LDISKFS_ENABLED_TRUE@ obdclass-all-objs += llog_lvfs.o
 obdclass-all-objs += class_obd.o debug.o genops.o uuid.o llog_ioctl.o
-obdclass-all-objs += lprocfs_status.o lprocfs_jobstats.o lustre_handles.o lustre_peer.o
+obdclass-all-objs += lprocfs_status.o lustre_handles.o lustre_peer.o
 obdclass-all-objs += llog_osd.o local_storage.o
 obdclass-all-objs += statfs_pack.o obdo.o obd_config.o obd_mount.o mea.o
 obdclass-all-objs += lu_object.o dt_object.o capa.o
 obdclass-all-objs += llog_osd.o local_storage.o
 obdclass-all-objs += statfs_pack.o obdo.o obd_config.o obd_mount.o mea.o
 obdclass-all-objs += lu_object.o dt_object.o capa.o
@@ -19,6 +19,7 @@ obdclass-all-objs += acl.o idmap.o
 obdclass-all-objs += md_attrs.o linkea.o
 obdclass-all-objs += lu_ucred.o
 
 obdclass-all-objs += md_attrs.o linkea.o
 obdclass-all-objs += lu_ucred.o
 
+@SERVER_TRUE@obdclass-all-objs += lprocfs_jobstats.o
 @SERVER_TRUE@obdclass-all-objs += obd_mount_server.o
 
 obdclass-objs := $(obdclass-linux-objs) $(obdclass-all-objs)
 @SERVER_TRUE@obdclass-all-objs += obd_mount_server.o
 
 obdclass-objs := $(obdclass-linux-objs) $(obdclass-all-objs)
index 50efaf3..ba8b75a 100644 (file)
@@ -12,7 +12,7 @@ liblustreclass_a_SOURCES += lustre_handles.c lustre_peer.c lprocfs_status.c
 liblustreclass_a_SOURCES += obdo.c obd_config.c llog.c llog_obd.c llog_cat.c 
 liblustreclass_a_SOURCES += llog_lvfs.c llog_swab.c capa.c
 liblustreclass_a_SOURCES += lu_object.c cl_object.c lu_ref.c
 liblustreclass_a_SOURCES += obdo.c obd_config.c llog.c llog_obd.c llog_cat.c 
 liblustreclass_a_SOURCES += llog_lvfs.c llog_swab.c capa.c
 liblustreclass_a_SOURCES += lu_object.c cl_object.c lu_ref.c
-liblustreclass_a_SOURCES += cl_page.c cl_lock.c cl_io.c lprocfs_jobstats.c
+liblustreclass_a_SOURCES += cl_page.c cl_lock.c cl_io.c
 liblustreclass_a_SOURCES += #llog_ioctl.c rbtree.c
 liblustreclass_a_CPPFLAGS = $(LLCPPFLAGS)
 liblustreclass_a_CFLAGS = $(LLCFLAGS)
 liblustreclass_a_SOURCES += #llog_ioctl.c rbtree.c
 liblustreclass_a_CPPFLAGS = $(LLCPPFLAGS)
 liblustreclass_a_CFLAGS = $(LLCFLAGS)
index 5cef00b..1579559 100644 (file)
@@ -2579,6 +2579,7 @@ int lprocfs_obd_rd_max_pages_per_rpc(char *page, char **start, off_t off,
 }
 EXPORT_SYMBOL(lprocfs_obd_rd_max_pages_per_rpc);
 
 }
 EXPORT_SYMBOL(lprocfs_obd_rd_max_pages_per_rpc);
 
+#ifdef HAVE_SERVER_SUPPORT
 int lprocfs_target_rd_instance(char *page, char **start, off_t off,
                                int count, int *eof, void *data)
 {
 int lprocfs_target_rd_instance(char *page, char **start, off_t off,
                                int count, int *eof, void *data)
 {
@@ -2591,4 +2592,5 @@ int lprocfs_target_rd_instance(char *page, char **start, off_t off,
         return snprintf(page, count, "%u\n", obd->u.obt.obt_instance);
 }
 EXPORT_SYMBOL(lprocfs_target_rd_instance);
         return snprintf(page, count, "%u\n", obd->u.obt.obt_instance);
 }
 EXPORT_SYMBOL(lprocfs_target_rd_instance);
+#endif
 #endif /* LPROCFS*/
 #endif /* LPROCFS*/
index 8248027..9092837 100644 (file)
@@ -47,7 +47,6 @@
 
 #include <obd.h>
 #include <lvfs.h>
 
 #include <obd.h>
 #include <lvfs.h>
-#include <lustre_fsfilt.h>
 #include <obd_class.h>
 #include <lustre/lustre_user.h>
 #include <linux/version.h>
 #include <obd_class.h>
 #include <lustre/lustre_user.h>
 #include <linux/version.h>
index a602bfa..f3c5368 100644 (file)
@@ -48,7 +48,6 @@
 
 #include <obd.h>
 #include <lvfs.h>
 
 #include <obd.h>
 #include <lvfs.h>
-#include <lustre_fsfilt.h>
 #include <obd_class.h>
 #include <lustre/lustre_user.h>
 #include <linux/version.h>
 #include <obd_class.h>
 #include <lustre/lustre_user.h>
 #include <linux/version.h>
index b68833f..92f22da 100644 (file)
@@ -48,7 +48,6 @@
 
 #include <lustre_ver.h>
 #include <libcfs/libcfs.h>
 
 #include <lustre_ver.h>
 #include <libcfs/libcfs.h>
-#include <lustre_fsfilt.h>
 #include <obd_support.h>
 #include <lustre_net.h>
 #include <obd.h>
 #include <obd_support.h>
 #include <lustre_net.h>
 #include <obd.h>
index c12e44b..d8d88d2 100644 (file)
@@ -48,7 +48,6 @@
 
 #include <lustre_ver.h>
 #include <libcfs/libcfs.h>
 
 #include <lustre_ver.h>
 #include <libcfs/libcfs.h>
-#include <lustre_fsfilt.h>
 #include <obd_support.h>
 #include <lustre_net.h>
 #include <obd.h>
 #include <obd_support.h>
 #include <lustre_net.h>
 #include <obd.h>
index b2e2fa1..37706e2 100644 (file)
@@ -49,7 +49,6 @@
 
 #include <lustre_ver.h>
 #include <libcfs/libcfs.h>
 
 #include <lustre_ver.h>
 #include <libcfs/libcfs.h>
-#include <lustre_fsfilt.h>
 #include <obd_support.h>
 #include <lustre_net.h>
 #include <obd.h>
 #include <obd_support.h>
 #include <lustre_net.h>
 #include <obd.h>
index a919833..c80297f 100644 (file)
@@ -49,7 +49,6 @@
 
 #include <lustre_ver.h>
 #include <libcfs/libcfs.h>
 
 #include <lustre_ver.h>
 #include <libcfs/libcfs.h>
-#include <lustre_fsfilt.h>
 #include <obd_support.h>
 #include <lustre_net.h>
 #include <obd.h>
 #include <obd_support.h>
 #include <lustre_net.h>
 #include <obd.h>
index f0d938d..abb99ce 100644 (file)
 #else
 #include <liblustre.h>
 #endif
 #else
 #include <liblustre.h>
 #endif
-
 #include <obd_class.h>
 #include <lustre_log.h>
 #include <obd_class.h>
 #include <lustre_log.h>
-#include <libcfs/list.h>
-#include <lvfs.h>
-#include <lustre_fsfilt.h>
 
 int llog_initiator_connect(struct llog_ctxt *ctxt)
 {
 
 int llog_initiator_connect(struct llog_ctxt *ctxt)
 {
index 727398c..38f3bb2 100644 (file)
@@ -34,8 +34,6 @@
 #include <lprocfs_status.h>
 #include <obd.h>
 #include <linux/seq_file.h>
 #include <lprocfs_status.h>
 #include <obd.h>
 #include <linux/seq_file.h>
-#include <lustre_fsfilt.h>
-
 #include "lquota_internal.h"
 
 #ifdef LPROCFS
 #include "lquota_internal.h"
 
 #ifdef LPROCFS