From: John L. Hammond Date: Mon, 18 Aug 2014 18:24:00 +0000 (-0500) Subject: LU-2675 lustre: remove lustre_lite.h X-Git-Tag: 2.6.53~27 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=b768cc547750a97897b607a5c1a52ba0a780d817;p=fs%2Flustre-release.git LU-2675 lustre: remove lustre_lite.h 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 Change-Id: Iac27e0e50407e39122b121d6040244a5fe1b9f15 Reviewed-on: http://review.whamcloud.com/11501 Reviewed-by: Bob Glossman Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- diff --git a/lustre/include/Makefile.am b/lustre/include/Makefile.am index ba61f17..2eeade5 100644 --- a/lustre/include/Makefile.am +++ b/lustre/include/Makefile.am @@ -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 \ diff --git a/lustre/include/linux/Makefile.am b/lustre/include/linux/Makefile.am index ea51f78..c9f6462 100644 --- a/lustre/include/linux/Makefile.am +++ b/lustre/include/linux/Makefile.am @@ -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 index ad254b7..0000000 --- a/lustre/include/linux/lustre_lite.h +++ /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 instead -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* 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 diff --git a/lustre/include/lustre_eacl.h b/lustre/include/lustre_eacl.h index 28d0c59..c8dbdb9 100644 --- a/lustre/include/lustre_eacl.h +++ b/lustre/include/lustre_eacl.h @@ -49,8 +49,8 @@ */ #ifdef CONFIG_FS_POSIX_ACL - -#include +# include +# include typedef struct { __u16 e_tag; diff --git a/lustre/include/lustre_lite.h b/lustre/include/lustre_lite.h deleted file mode 100644 index f6c0d30..0000000 --- a/lustre/include/lustre_lite.h +++ /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 - -#include -#include -#include - -/* 4UL * 1024 * 1024 */ -#define LL_MAX_BLKSIZE_BITS (22) -#define LL_MAX_BLKSIZE (1UL< - - -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 diff --git a/lustre/include/lustre_param.h b/lustre/include/lustre_param.h index 7df6194..78894cf 100644 --- a/lustre/include/lustre_param.h +++ b/lustre/include/lustre_param.h @@ -43,6 +43,9 @@ #ifndef _LUSTRE_PARAM_H #define _LUSTRE_PARAM_H +#include +#include + /** \defgroup param param * * @{ diff --git a/lustre/llite/dcache.c b/lustre/llite/dcache.c index c8b9099..71fc91e 100644 --- a/lustre/llite/dcache.c +++ b/lustre/llite/dcache.c @@ -42,7 +42,6 @@ #define DEBUG_SUBSYSTEM S_LLITE #include -#include #include #include diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c index 3fa1059..c42ef84 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -53,7 +53,6 @@ #include #include #include -#include #include #include #include "llite_internal.h" diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 562ffd7..75b1391 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -42,7 +42,6 @@ #define DEBUG_SUBSYSTEM S_LLITE #include -#include #include #include #include diff --git a/lustre/llite/glimpse.c b/lustre/llite/glimpse.c index 0aa2469..30d2304 100644 --- a/lustre/llite/glimpse.c +++ b/lustre/llite/glimpse.c @@ -46,7 +46,6 @@ #include #include -#include #include #include #include diff --git a/lustre/llite/lcommon_cl.c b/lustre/llite/lcommon_cl.c index 149d83d2..510ab9d 100644 --- a/lustre/llite/lcommon_cl.c +++ b/lustre/llite/lcommon_cl.c @@ -53,7 +53,6 @@ #include #include #include -#include #include #include #include diff --git a/lustre/llite/lcommon_misc.c b/lustre/llite/lcommon_misc.c index 39df79a..fa76dd0 100644 --- a/lustre/llite/lcommon_misc.c +++ b/lustre/llite/lcommon_misc.c @@ -43,7 +43,7 @@ #include #include -#include +#include "llite_internal.h" /* Initialize the default and maximum LOV EA and cookie sizes. This allows diff --git a/lustre/llite/llite_capa.c b/lustre/llite/llite_capa.c index 7d6e8d9..9f73929 100644 --- a/lustre/llite/llite_capa.c +++ b/lustre/llite/llite_capa.c @@ -46,7 +46,6 @@ #include #include -#include #include "llite_internal.h" /* for obd_capa.c_list, client capa might stay in three places: diff --git a/lustre/llite/llite_close.c b/lustre/llite/llite_close.c index ec01572..70384bd 100644 --- a/lustre/llite/llite_close.c +++ b/lustre/llite/llite_close.c @@ -42,7 +42,6 @@ #define DEBUG_SUBSYSTEM S_LLITE -#include #include "llite_internal.h" /** records that a write is in flight */ diff --git a/lustre/llite/llite_internal.h b/lustre/llite/llite_internal.h index 33c7a5c..3835a8b 100644 --- a/lustre/llite/llite_internal.h +++ b/lustre/llite/llite_internal.h @@ -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 diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 3bc3781..7c9ffcc 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -47,7 +47,6 @@ #include #include -#include #include #include #include diff --git a/lustre/llite/llite_mmap.c b/lustre/llite/llite_mmap.c index 817a33a..364a4a1 100644 --- a/lustre/llite/llite_mmap.c +++ b/lustre/llite/llite_mmap.c @@ -51,7 +51,6 @@ #define DEBUG_SUBSYSTEM S_LLITE -#include #include "llite_internal.h" #include diff --git a/lustre/llite/llite_nfs.c b/lustre/llite/llite_nfs.c index 8b1f2a6..f9a22cc 100644 --- a/lustre/llite/llite_nfs.c +++ b/lustre/llite/llite_nfs.c @@ -42,7 +42,6 @@ */ #define DEBUG_SUBSYSTEM S_LLITE -#include #include "llite_internal.h" #include diff --git a/lustre/llite/llite_rmtacl.c b/lustre/llite/llite_rmtacl.c index 4f22a20..24279c1 100644 --- a/lustre/llite/llite_rmtacl.c +++ b/lustre/llite/llite_rmtacl.c @@ -44,7 +44,6 @@ #ifdef CONFIG_FS_POSIX_ACL -#include #include #include "llite_internal.h" diff --git a/lustre/llite/lloop.c b/lustre/llite/lloop.c index b8d7ca5..310c9b7 100644 --- a/lustre/llite/lloop.c +++ b/lustre/llite/lloop.c @@ -105,7 +105,6 @@ #include #include -#include #include "llite_internal.h" #define LLOOP_MAX_SEGMENTS LNET_MAX_IOV diff --git a/lustre/llite/lproc_llite.c b/lustre/llite/lproc_llite.c index 112e8f9..7594b97 100644 --- a/lustre/llite/lproc_llite.c +++ b/lustre/llite/lproc_llite.c @@ -36,7 +36,6 @@ #define DEBUG_SUBSYSTEM S_LLITE #include -#include #include #include #include diff --git a/lustre/llite/namei.c b/lustre/llite/namei.c index 2254efa..029be89 100644 --- a/lustre/llite/namei.c +++ b/lustre/llite/namei.c @@ -46,7 +46,6 @@ #include #include -#include #include #include #include "llite_internal.h" diff --git a/lustre/llite/remote_perm.c b/lustre/llite/remote_perm.c index 0738182..05eb97d 100644 --- a/lustre/llite/remote_perm.c +++ b/lustre/llite/remote_perm.c @@ -47,7 +47,6 @@ #include #include -#include #include #include #include diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index 4b8c539..3897b2d 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -57,7 +57,6 @@ #define DEBUG_SUBSYSTEM S_LLITE -#include #include #include "llite_internal.h" #include diff --git a/lustre/llite/rw26.c b/lustre/llite/rw26.c index b9c8293..046c099 100644 --- a/lustre/llite/rw26.c +++ b/lustre/llite/rw26.c @@ -62,7 +62,6 @@ #define DEBUG_SUBSYSTEM S_LLITE -#include #include "llite_internal.h" #include diff --git a/lustre/llite/statahead.c b/lustre/llite/statahead.c index ead6f4c..f781f7c 100644 --- a/lustre/llite/statahead.c +++ b/lustre/llite/statahead.c @@ -43,7 +43,6 @@ #define DEBUG_SUBSYSTEM S_LLITE #include -#include #include #include "llite_internal.h" diff --git a/lustre/llite/super25.c b/lustre/llite/super25.c index f63472b..08e9d0e 100644 --- a/lustre/llite/super25.c +++ b/lustre/llite/super25.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/lustre/llite/symlink.c b/lustre/llite/symlink.c index e394efa..f457959 100644 --- a/lustre/llite/symlink.c +++ b/lustre/llite/symlink.c @@ -40,7 +40,6 @@ #include #define DEBUG_SUBSYSTEM S_LLITE -#include #include "llite_internal.h" static int ll_readlink_internal(struct inode *inode, diff --git a/lustre/llite/vvp_dev.c b/lustre/llite/vvp_dev.c index ac004c0..eaaac30 100644 --- a/lustre/llite/vvp_dev.c +++ b/lustre/llite/vvp_dev.c @@ -43,7 +43,6 @@ #include -#include #include "llite_internal.h" #include "vvp_internal.h" diff --git a/lustre/llite/vvp_io.c b/lustre/llite/vvp_io.c index 728f802..b7fb4e5 100644 --- a/lustre/llite/vvp_io.c +++ b/lustre/llite/vvp_io.c @@ -43,8 +43,6 @@ #include -#include - #include "vvp_internal.h" static struct vvp_io *cl2vvp_io(const struct lu_env *env, diff --git a/lustre/llite/vvp_lock.c b/lustre/llite/vvp_lock.c index f50adff..d198c50 100644 --- a/lustre/llite/vvp_lock.c +++ b/lustre/llite/vvp_lock.c @@ -40,8 +40,6 @@ #include -#include - #include "vvp_internal.h" /***************************************************************************** diff --git a/lustre/llite/vvp_object.c b/lustre/llite/vvp_object.c index c9c4366..53c5f12 100644 --- a/lustre/llite/vvp_object.c +++ b/lustre/llite/vvp_object.c @@ -44,8 +44,6 @@ #include #include -#include - #include "vvp_internal.h" /***************************************************************************** diff --git a/lustre/llite/vvp_page.c b/lustre/llite/vvp_page.c index 158b7fe..cf32538 100644 --- a/lustre/llite/vvp_page.c +++ b/lustre/llite/vvp_page.c @@ -43,8 +43,6 @@ #include -#include - #include "vvp_internal.h" /***************************************************************************** diff --git a/lustre/llite/xattr.c b/lustre/llite/xattr.c index 37d439f..f0d48f4 100644 --- a/lustre/llite/xattr.c +++ b/lustre/llite/xattr.c @@ -42,7 +42,6 @@ #define DEBUG_SUBSYSTEM S_LLITE #include -#include #include #include #include diff --git a/lustre/llite/xattr_cache.c b/lustre/llite/xattr_cache.c index d23808a..763bc77 100644 --- a/lustre/llite/xattr_cache.c +++ b/lustre/llite/xattr_cache.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include "llite_internal.h" diff --git a/lustre/lmv/lmv_obd.c b/lustre/lmv/lmv_obd.c index cd0e4f9..7532e97 100644 --- a/lustre/lmv/lmv_obd.c +++ b/lustre/lmv/lmv_obd.c @@ -54,7 +54,6 @@ #include #include #include -#include #include #include #include "lmv_internal.h"