Whamcloud - gitweb
LU-2675 lustre: remove lustre_lite.h 01/11501/3
authorJohn L. Hammond <john.hammond@intel.com>
Mon, 18 Aug 2014 18:24:00 +0000 (13:24 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 24 Sep 2014 01:18:15 +0000 (01:18 +0000)
Remove the unused struct lustre_rw_params and the unused function
lustre_build_lock_params(). Move several definition only used in
lustre/llite/ to lustre/llite/llite_internal.h. Remove
lustre/include/{,linux/}lustre_lite.h and fixup the missing includes
in other headers that this exposes.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Iac27e0e50407e39122b121d6040244a5fe1b9f15
Reviewed-on: http://review.whamcloud.com/11501
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
36 files changed:
lustre/include/Makefile.am
lustre/include/linux/Makefile.am
lustre/include/linux/lustre_lite.h [deleted file]
lustre/include/lustre_eacl.h
lustre/include/lustre_lite.h [deleted file]
lustre/include/lustre_param.h
lustre/llite/dcache.c
lustre/llite/dir.c
lustre/llite/file.c
lustre/llite/glimpse.c
lustre/llite/lcommon_cl.c
lustre/llite/lcommon_misc.c
lustre/llite/llite_capa.c
lustre/llite/llite_close.c
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/llite_mmap.c
lustre/llite/llite_nfs.c
lustre/llite/llite_rmtacl.c
lustre/llite/lloop.c
lustre/llite/lproc_llite.c
lustre/llite/namei.c
lustre/llite/remote_perm.c
lustre/llite/rw.c
lustre/llite/rw26.c
lustre/llite/statahead.c
lustre/llite/super25.c
lustre/llite/symlink.c
lustre/llite/vvp_dev.c
lustre/llite/vvp_io.c
lustre/llite/vvp_lock.c
lustre/llite/vvp_object.c
lustre/llite/vvp_page.c
lustre/llite/xattr.c
lustre/llite/xattr_cache.c
lustre/lmv/lmv_obd.c

index ba61f17..2eeade5 100644 (file)
@@ -69,7 +69,6 @@ EXTRA_DIST = \
        lustre_lfsck.h \
        lustre_lib.h \
        lustre_linkea.h \
-       lustre_lite.h \
        lustre_lmv.h \
        lustre_log.h \
        lustre_mdc.h \
index ea51f78..c9f6462 100644 (file)
@@ -44,5 +44,5 @@ endif
 
 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 \
+       obd.h lvfs.h lustre_log.h lustre_compat25.h lustre_quota.h \
        lustre_user.h lustre_patchless_compat.h
diff --git a/lustre/include/linux/lustre_lite.h b/lustre/include/linux/lustre_lite.h
deleted file mode 100644 (file)
index ad254b7..0000000
+++ /dev/null
@@ -1,94 +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_LL_H
-#define _LINUX_LL_H
-
-#ifndef _LL_H
-#error Do not #include this file directly. #include <lustre_lite.h> instead
-#endif
-
-#include <linux/version.h>
-#include <asm/statfs.h>
-#include <linux/fs.h>
-#include <linux/dcache.h>
-#include <linux/proc_fs.h>
-#include <obd_class.h>
-#include <lustre_net.h>
-#include <lustre_ha.h>
-#include <linux/rbtree.h>
-#include <linux/lustre_compat25.h>
-#include <linux/pagemap.h>
-
-/* lprocfs.c */
-enum {
-         LPROC_LL_DIRTY_HITS = 0,
-         LPROC_LL_DIRTY_MISSES,
-         LPROC_LL_READ_BYTES,
-         LPROC_LL_WRITE_BYTES,
-         LPROC_LL_BRW_READ,
-         LPROC_LL_BRW_WRITE,
-         LPROC_LL_OSC_READ,
-         LPROC_LL_OSC_WRITE,
-         LPROC_LL_IOCTL,
-         LPROC_LL_OPEN,
-         LPROC_LL_RELEASE,
-         LPROC_LL_MAP,
-         LPROC_LL_LLSEEK,
-         LPROC_LL_FSYNC,
-         LPROC_LL_READDIR,
-         LPROC_LL_SETATTR,
-         LPROC_LL_TRUNC,
-         LPROC_LL_FLOCK,
-         LPROC_LL_GETATTR,
-         LPROC_LL_CREATE,
-         LPROC_LL_LINK,
-         LPROC_LL_UNLINK,
-         LPROC_LL_SYMLINK,
-         LPROC_LL_MKDIR,
-         LPROC_LL_RMDIR,
-         LPROC_LL_MKNOD,
-         LPROC_LL_RENAME,
-         LPROC_LL_STAFS,
-         LPROC_LL_ALLOC_INODE,
-         LPROC_LL_SETXATTR,
-         LPROC_LL_GETXATTR,
-        LPROC_LL_GETXATTR_HITS,
-         LPROC_LL_LISTXATTR,
-         LPROC_LL_REMOVEXATTR,
-         LPROC_LL_INODE_PERM,
-         LPROC_LL_FILE_OPCODES
-};
-
-#endif
index 28d0c59..c8dbdb9 100644 (file)
@@ -49,8 +49,8 @@
  */
 
 #ifdef CONFIG_FS_POSIX_ACL
-
-#include <linux/posix_acl_xattr.h>
+# include <linux/fs.h>
+# include <linux/posix_acl_xattr.h>
 
 typedef struct {
         __u16                   e_tag;
diff --git a/lustre/include/lustre_lite.h b/lustre/include/lustre_lite.h
deleted file mode 100644 (file)
index f6c0d30..0000000
+++ /dev/null
@@ -1,131 +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, 2012, Intel Corporation.
- */
-/*
- * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
- */
-
-#ifndef _LL_H
-#define _LL_H
-
-/** \defgroup lite lite
- *
- * @{
- */
-
-#include <linux/lustre_lite.h>
-
-#include <obd_class.h>
-#include <lustre_net.h>
-#include <lustre_ha.h>
-
-/* 4UL * 1024 * 1024 */
-#define LL_MAX_BLKSIZE_BITS     (22)
-#define LL_MAX_BLKSIZE          (1UL<<LL_MAX_BLKSIZE_BITS)
-
-#include <lustre/lustre_user.h>
-
-
-struct lustre_rw_params {
-        int                lrp_lock_mode;
-        ldlm_policy_data_t lrp_policy;
-        obd_flag           lrp_brw_flags;
-        int                lrp_ast_flags;
-};
-
-/*
- * XXX nikita: this function lives in the header because it is used by both
- * llite kernel module and liblustre library, and there is no (?) better place
- * to put it in.
- */
-static inline void lustre_build_lock_params(int cmd, unsigned long open_flags,
-                                            __u64 connect_flags,
-                                            loff_t pos, ssize_t len,
-                                            struct lustre_rw_params *params)
-{
-        params->lrp_lock_mode = (cmd == OBD_BRW_READ) ? LCK_PR : LCK_PW;
-        params->lrp_brw_flags = 0;
-
-        params->lrp_policy.l_extent.start = pos;
-        params->lrp_policy.l_extent.end = pos + len - 1;
-        /*
-         * for now O_APPEND always takes local locks.
-         */
-        if (cmd == OBD_BRW_WRITE && (open_flags & O_APPEND)) {
-                params->lrp_policy.l_extent.start = 0;
-                params->lrp_policy.l_extent.end   = OBD_OBJECT_EOF;
-        } else {
-                /*
-                 * nothing special for the kernel. In the future llite may use
-                 * OST-side locks for small writes into highly contended
-                 * files.
-                 */
-        }
-        params->lrp_ast_flags = (open_flags & O_NONBLOCK) ?
-                LDLM_FL_BLOCK_NOWAIT : 0;
-}
-
-/*
- * This is embedded into liblustre and llite super-blocks to keep track of
- * connect flags (capabilities) supported by all imports given mount is
- * connected to.
- */
-struct lustre_client_ocd {
-        /*
-         * This is conjunction of connect_flags across all imports (LOVs) this
-         * mount is connected to. This field is updated by cl_ocd_update()
-         * under ->lco_lock.
-         */
-        __u64              lco_flags;
-       struct mutex       lco_lock;
-        struct obd_export *lco_md_exp;
-        struct obd_export *lco_dt_exp;
-};
-
-/*
- * Chain of hash overflow pages.
- */
-struct ll_dir_chain {
-        /* XXX something. Later */
-};
-
-static inline void ll_dir_chain_init(struct ll_dir_chain *chain)
-{
-}
-
-static inline void ll_dir_chain_fini(struct ll_dir_chain *chain)
-{
-}
-
-/** @} lite */
-
-#endif
index 7df6194..78894cf 100644 (file)
@@ -43,6 +43,9 @@
 #ifndef _LUSTRE_PARAM_H
 #define _LUSTRE_PARAM_H
 
+#include <libcfs/libcfs.h>
+#include <lnet/types.h>
+
 /** \defgroup param param
  *
  * @{
index c8b9099..71fc91e 100644 (file)
@@ -42,7 +42,6 @@
 #define DEBUG_SUBSYSTEM S_LLITE
 
 #include <obd_support.h>
-#include <lustre_lite.h>
 #include <lustre/lustre_idl.h>
 #include <lustre_dlm.h>
 
index 3fa1059..c42ef84 100644 (file)
@@ -53,7 +53,6 @@
 #include <obd_class.h>
 #include <lustre_ioctl.h>
 #include <lustre_lib.h>
-#include <lustre_lite.h>
 #include <lustre_dlm.h>
 #include <lustre_fid.h>
 #include "llite_internal.h"
index 562ffd7..75b1391 100644 (file)
@@ -42,7 +42,6 @@
 
 #define DEBUG_SUBSYSTEM S_LLITE
 #include <lustre_dlm.h>
-#include <lustre_lite.h>
 #include <linux/pagemap.h>
 #include <linux/file.h>
 #include <linux/sched.h>
index 0aa2469..30d2304 100644 (file)
@@ -46,7 +46,6 @@
 #include <obd.h>
 
 #include <lustre_dlm.h>
-#include <lustre_lite.h>
 #include <lustre_mdc.h>
 #include <linux/pagemap.h>
 #include <linux/file.h>
index 149d83d..510ab9d 100644 (file)
@@ -53,7 +53,6 @@
 #include <obd.h>
 #include <obd_support.h>
 #include <lustre_fid.h>
-#include <lustre_lite.h>
 #include <lustre_dlm.h>
 #include <lustre_ver.h>
 #include <lustre_mdc.h>
index 39df79a..fa76dd0 100644 (file)
@@ -43,7 +43,7 @@
 #include <cl_object.h>
 #include <lclient.h>
 
-#include <lustre_lite.h>
+#include "llite_internal.h"
 
 
 /* Initialize the default and maximum LOV EA and cookie sizes.  This allows
index 7d6e8d9..9f73929 100644 (file)
@@ -46,7 +46,6 @@
 #include <linux/file.h>
 #include <linux/kmod.h>
 
-#include <lustre_lite.h>
 #include "llite_internal.h"
 
 /* for obd_capa.c_list, client capa might stay in three places:
index ec01572..70384bd 100644 (file)
@@ -42,7 +42,6 @@
 
 #define DEBUG_SUBSYSTEM S_LLITE
 
-#include <lustre_lite.h>
 #include "llite_internal.h"
 
 /** records that a write is in flight */
index 33c7a5c..3835a8b 100644 (file)
@@ -69,6 +69,9 @@
 #define LL_DIR_END_OFF          0x7fffffffffffffffULL
 #define LL_DIR_END_OFF_32BIT    0x7fffffffUL
 
+/* 4UL * 1024 * 1024 */
+#define LL_MAX_BLKSIZE_BITS 22
+
 #define LL_IT2STR(it) ((it) ? ldlm_it2str((it)->it_op) : "0")
 #define LUSTRE_FPRIVATE(file) ((file)->private_data)
 
@@ -491,6 +494,20 @@ struct eacl_table {
        struct list_head        et_entries[EE_HASHES];
 };
 
+
+/* This is embedded into llite super-blocks to keep track of connect
+ * flags (capabilities) supported by all imports given mount is
+ * connected to. */
+struct lustre_client_ocd {
+       /* This is conjunction of connect_flags across all imports
+        * (LOVs) this mount is connected to. This field is updated by
+        * cl_ocd_update() under ->lco_lock. */
+       __u64                    lco_flags;
+       struct mutex             lco_lock;
+       struct obd_export       *lco_md_exp;
+       struct obd_export       *lco_dt_exp;
+};
+
 struct ll_sb_info {
        struct list_head                  ll_list;
        /* this protects pglist and ra_info.  It isn't safe to
@@ -725,8 +742,57 @@ static inline void lprocfs_unregister_mountpoint(struct ll_sb_info *sbi) {}
 static void ll_stats_ops_tally(struct ll_sb_info *sbi, int op, int count) {}
 #endif
 
+enum {
+       LPROC_LL_DIRTY_HITS,
+       LPROC_LL_DIRTY_MISSES,
+       LPROC_LL_READ_BYTES,
+       LPROC_LL_WRITE_BYTES,
+       LPROC_LL_BRW_READ,
+       LPROC_LL_BRW_WRITE,
+       LPROC_LL_OSC_READ,
+       LPROC_LL_OSC_WRITE,
+       LPROC_LL_IOCTL,
+       LPROC_LL_OPEN,
+       LPROC_LL_RELEASE,
+       LPROC_LL_MAP,
+       LPROC_LL_LLSEEK,
+       LPROC_LL_FSYNC,
+       LPROC_LL_READDIR,
+       LPROC_LL_SETATTR,
+       LPROC_LL_TRUNC,
+       LPROC_LL_FLOCK,
+       LPROC_LL_GETATTR,
+       LPROC_LL_CREATE,
+       LPROC_LL_LINK,
+       LPROC_LL_UNLINK,
+       LPROC_LL_SYMLINK,
+       LPROC_LL_MKDIR,
+       LPROC_LL_RMDIR,
+       LPROC_LL_MKNOD,
+       LPROC_LL_RENAME,
+       LPROC_LL_STAFS,
+       LPROC_LL_ALLOC_INODE,
+       LPROC_LL_SETXATTR,
+       LPROC_LL_GETXATTR,
+       LPROC_LL_GETXATTR_HITS,
+       LPROC_LL_LISTXATTR,
+       LPROC_LL_REMOVEXATTR,
+       LPROC_LL_INODE_PERM,
+       LPROC_LL_FILE_OPCODES
+};
 
 /* llite/dir.c */
+struct ll_dir_chain {
+};
+
+static inline void ll_dir_chain_init(struct ll_dir_chain *chain)
+{
+}
+
+static inline void ll_dir_chain_fini(struct ll_dir_chain *chain)
+{
+}
+
 extern const struct file_operations ll_dir_operations;
 extern const struct inode_operations ll_dir_inode_operations;
 #ifdef HAVE_DIR_CONTEXT
index 3bc3781..7c9ffcc 100644 (file)
@@ -47,7 +47,6 @@
 #include <linux/mm.h>
 
 #include <lustre_ioctl.h>
-#include <lustre_lite.h>
 #include <lustre_ha.h>
 #include <lustre_dlm.h>
 #include <lprocfs_status.h>
index 817a33a..364a4a1 100644 (file)
@@ -51,7 +51,6 @@
 
 #define DEBUG_SUBSYSTEM S_LLITE
 
-#include <lustre_lite.h>
 #include "llite_internal.h"
 #include <linux/lustre_compat25.h>
 
index 8b1f2a6..f9a22cc 100644 (file)
@@ -42,7 +42,6 @@
  */
 
 #define DEBUG_SUBSYSTEM S_LLITE
-#include <lustre_lite.h>
 #include "llite_internal.h"
 #include <linux/exportfs.h>
 
index 4f22a20..24279c1 100644 (file)
@@ -44,7 +44,6 @@
 
 #ifdef CONFIG_FS_POSIX_ACL
 
-#include <lustre_lite.h>
 #include <lustre_eacl.h>
 #include "llite_internal.h"
 
index b8d7ca5..310c9b7 100644 (file)
 #include <asm/uaccess.h>
 
 #include <lustre_lib.h>
-#include <lustre_lite.h>
 #include "llite_internal.h"
 
 #define LLOOP_MAX_SEGMENTS        LNET_MAX_IOV
index 112e8f9..7594b97 100644 (file)
@@ -36,7 +36,6 @@
 #define DEBUG_SUBSYSTEM S_LLITE
 
 #include <linux/version.h>
-#include <lustre_lite.h>
 #include <lustre_param.h>
 #include <lprocfs_status.h>
 #include <obd_support.h>
index 2254efa..029be89 100644 (file)
@@ -46,7 +46,6 @@
 
 #include <obd_support.h>
 #include <lustre_fid.h>
-#include <lustre_lite.h>
 #include <lustre_dlm.h>
 #include <lustre_ver.h>
 #include "llite_internal.h"
index 0738182..05eb97d 100644 (file)
@@ -47,7 +47,6 @@
 #include <linux/types.h>
 #include <linux/version.h>
 
-#include <lustre_lite.h>
 #include <lustre_ha.h>
 #include <lustre_dlm.h>
 #include <lprocfs_status.h>
index 4b8c539..3897b2d 100644 (file)
@@ -57,7 +57,6 @@
 
 #define DEBUG_SUBSYSTEM S_LLITE
 
-#include <lustre_lite.h>
 #include <obd_cksum.h>
 #include "llite_internal.h"
 #include <linux/lustre_compat25.h>
index b9c8293..046c099 100644 (file)
@@ -62,7 +62,6 @@
 
 #define DEBUG_SUBSYSTEM S_LLITE
 
-#include <lustre_lite.h>
 #include "llite_internal.h"
 #include <linux/lustre_compat25.h>
 
index ead6f4c..f781f7c 100644 (file)
@@ -43,7 +43,6 @@
 #define DEBUG_SUBSYSTEM S_LLITE
 
 #include <obd_support.h>
-#include <lustre_lite.h>
 #include <lustre_dlm.h>
 #include "llite_internal.h"
 
index f63472b..08e9d0e 100644 (file)
@@ -39,7 +39,6 @@
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/version.h>
-#include <lustre_lite.h>
 #include <lustre_ha.h>
 #include <lustre_dlm.h>
 #include <linux/init.h>
index e394efa..f457959 100644 (file)
@@ -40,7 +40,6 @@
 #include <linux/version.h>
 #define DEBUG_SUBSYSTEM S_LLITE
 
-#include <lustre_lite.h>
 #include "llite_internal.h"
 
 static int ll_readlink_internal(struct inode *inode,
index ac004c0..eaaac30 100644 (file)
@@ -43,7 +43,6 @@
 
 
 #include <obd.h>
-#include <lustre_lite.h>
 #include "llite_internal.h"
 #include "vvp_internal.h"
 
index 728f802..b7fb4e5 100644 (file)
@@ -43,8 +43,6 @@
 
 
 #include <obd.h>
-#include <lustre_lite.h>
-
 #include "vvp_internal.h"
 
 static struct vvp_io *cl2vvp_io(const struct lu_env *env,
index f50adff..d198c50 100644 (file)
@@ -40,8 +40,6 @@
 
 
 #include <obd.h>
-#include <lustre_lite.h>
-
 #include "vvp_internal.h"
 
 /*****************************************************************************
index c9c4366..53c5f12 100644 (file)
@@ -44,8 +44,6 @@
 #include <libcfs/libcfs.h>
 
 #include <obd.h>
-#include <lustre_lite.h>
-
 #include "vvp_internal.h"
 
 /*****************************************************************************
index 158b7fe..cf32538 100644 (file)
@@ -43,8 +43,6 @@
 
 
 #include <obd.h>
-#include <lustre_lite.h>
-
 #include "vvp_internal.h"
 
 /*****************************************************************************
index 37d439f..f0d48f4 100644 (file)
@@ -42,7 +42,6 @@
 #define DEBUG_SUBSYSTEM S_LLITE
 
 #include <obd_support.h>
-#include <lustre_lite.h>
 #include <lustre_dlm.h>
 #include <lustre_ver.h>
 #include <lustre_eacl.h>
index d23808a..763bc77 100644 (file)
@@ -34,7 +34,6 @@
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <obd_support.h>
-#include <lustre_lite.h>
 #include <lustre_dlm.h>
 #include <lustre_ver.h>
 #include "llite_internal.h"
index cd0e4f9..7532e97 100644 (file)
@@ -54,7 +54,6 @@
 #include <lprocfs_status.h>
 #include <cl_object.h>
 #include <lclient.h>
-#include <lustre_lite.h>
 #include <lustre_fid.h>
 #include <lustre_ioctl.h>
 #include "lmv_internal.h"