Whamcloud - gitweb
LU-2675 lustre: remove linux/lustre_lib.h 00/11500/2
authorJohn L. Hammond <john.hammond@intel.com>
Mon, 18 Aug 2014 17:58:29 +0000 (12:58 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 15 Sep 2014 18:19:49 +0000 (18:19 +0000)
Remove lustre/include/linux/lustre_lib.h. Remove some unused
declarations from lustre/include/lustre_lib.h and move some others to
more natural headers.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I30b032e5e766cc052dbf6af34eb2e5d3f1af589e
Reviewed-on: http://review.whamcloud.com/11500
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/linux/Makefile.am
lustre/include/linux/lustre_lib.h [deleted file]
lustre/include/lustre_lib.h
lustre/include/obd.h
lustre/include/obd_class.h
lustre/llite/file.c
lustre/lod/lod_internal.h

index d3ff9a0..ea51f78 100644 (file)
@@ -42,7 +42,7 @@ if UTILS
 linux_HEADERS = lustre_user.h
 endif
 
-EXTRA_DIST = lustre_lib.h \
+EXTRA_DIST = \
        lustre_net.h obd_class.h obd_support.h \
        obd.h lvfs.h lustre_log.h lustre_compat25.h lustre_lite.h lustre_quota.h \
        lustre_user.h lustre_patchless_compat.h
diff --git a/lustre/include/linux/lustre_lib.h b/lustre/include/linux/lustre_lib.h
deleted file mode 100644 (file)
index f5680fe..0000000
+++ /dev/null
@@ -1,80 +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, 2012, 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 <linux/lustre_compat25.h>
-
-#ifndef LP_POISON
-#if BITS_PER_LONG > 32
-# define LI_POISON ((int)0x5a5a5a5a5a5a5a5a)
-# define LL_POISON ((long)0x5a5a5a5a5a5a5a5a)
-# define LP_POISON ((void *)(long)0x5a5a5a5a5a5a5a5a)
-#else
-# define LI_POISON ((int)0x5a5a5a5a)
-# define LL_POISON ((long)0x5a5a5a5a)
-# define LP_POISON ((void *)(long)0x5a5a5a5a)
-#endif
-#endif
-
-#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 */
index e1a4c2a..e37b2f7 100644 (file)
  * @{
  */
 
+#include <linux/signal.h>
 #include <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;
 struct ptlrpc_request;
 struct obd_export;
 struct lu_target;
@@ -85,42 +84,8 @@ int do_set_info_async(struct obd_import *imp,
                       obd_count vallen, void *val,
                       struct ptlrpc_request_set *set);
 
-#define OBD_RECOVERY_MAX_TIME (obd_timeout * 18) /* b13079 */
-
 void target_send_reply(struct ptlrpc_request *req, int rc, int fail_id);
 
-/* client.c */
-
-int client_sanobd_setup(struct obd_device *obddev, struct lustre_cfg* lcfg);
-struct client_obd *client_conn2cli(struct lustre_handle *conn);
-
-struct md_open_data;
-struct obd_client_handle {
-       struct lustre_handle     och_fh;
-       struct lu_fid            och_fid;
-       struct md_open_data     *och_mod;
-       struct lustre_handle     och_lease_handle; /* open lock for lease */
-       __u32                    och_magic;
-       int                      och_flags;
-};
-#define OBD_CLIENT_HANDLE_MAGIC 0xd15ea5ed
-
-/* statfs_pack.c */
-void statfs_pack(struct obd_statfs *osfs, struct kstatfs *sfs);
-void statfs_unpack(struct kstatfs *sfs, struct obd_statfs *osfs);
-
-/* Until such time as we get_info the per-stripe maximum from the OST,
- * we define this to be 2T - 4k, which is the ext3 maxbytes. */
-#define LUSTRE_STRIPE_MAXBYTES 0x1fffffff000ULL
-
-/* Special values for remove LOV EA from disk */
-#define LOVEA_DELETE_VALUES(size, count, offset) (size == 0 && count == 0 && \
-                                                 offset == (typeof(offset))(-1))
-
-#define LMVEA_DELETE_VALUES(count, offset) ((count) == 0 && \
-                                           (offset) == (typeof(offset))(-1))
-/* #define POISON_BULK 0 */
-
 /*
  * l_wait_event is a flexible sleeping function, permitting simple caller
  * configuration of interrupt and timeout sensitivity along with actions to
@@ -242,6 +207,9 @@ 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
index 2a2bb37..94ba798 100644 (file)
@@ -50,6 +50,7 @@
 #include <lustre_export.h>
 #include <lustre_fid.h>
 #include <lustre_fld.h>
+#include <lustre_handles.h>
 #include <lustre_intent.h>
 #include <lustre_capa.h>
 #include <lvfs.h>
@@ -83,6 +84,10 @@ static inline void loi_init(struct lov_oinfo *loi)
 {
 }
 
+/* Until such time as we get_info the per-stripe maximum from the OST,
+ * we define this to be 2T - 4k, which is the ext3 maxbytes. */
+#define LUSTRE_STRIPE_MAXBYTES 0x1fffffff000ULL
+
 struct lov_stripe_md {
        atomic_t        lsm_refc;
        spinlock_t      lsm_lock;
@@ -1018,6 +1023,17 @@ struct md_open_data {
        bool                             mod_is_create;
 };
 
+struct obd_client_handle {
+       struct lustre_handle     och_fh;
+       struct lu_fid            och_fid;
+       struct md_open_data     *och_mod;
+       struct lustre_handle     och_lease_handle; /* open lock for lease */
+       __u32                    och_magic;
+       int                      och_flags;
+};
+
+#define OBD_CLIENT_HANDLE_MAGIC 0xd15ea5ed
+
 struct lookup_intent;
 struct cl_attr;
 
index 844f405..71269f6 100644 (file)
@@ -1920,6 +1920,11 @@ void class_exit_uuidlist(void);
 /* prng.c */
 #define ll_generate_random_uuid(uuid_out) cfs_get_random_bytes(uuid_out, sizeof(class_uuid_t))
 
+/* statfs_pack.c */
+struct kstatfs;
+void statfs_pack(struct obd_statfs *osfs, struct kstatfs *sfs);
+void statfs_unpack(struct kstatfs *sfs, struct obd_statfs *osfs);
+
 /* root squash info */
 struct rw_semaphore;
 struct root_squash_info {
index 19948f7..7c00ed5 100644 (file)
@@ -1036,7 +1036,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);
index 0aa33c4..b1f828c 100644 (file)
 #define LOV_USES_ASSIGNED_STRIPE        0
 #define LOV_USES_DEFAULT_STRIPE         1
 
+/* Special values to remove LOV EA from disk */
+#define LOVEA_DELETE_VALUES(size, count, offset)                       \
+       ((size) == 0 && (count) == 0 && (offset) == (typeof(offset))(-1))
+
+#define LMVEA_DELETE_VALUES(count, offset)                             \
+       ((count) == 0 && (offset) == (typeof(offset))(-1))
+
 struct lod_qos_rr {
        __u32                    lqr_start_idx; /* start index of new inode */
        __u32                    lqr_offset_idx; /* aliasing for start_idx */