Commit f9acb591 authored by John L. Hammond's avatar John L. Hammond Committed by Greg Kroah-Hartman

staging: lustre: remove lustre_lite.h

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: default avatarJohn L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
Reviewed-on: http://review.whamcloud.com/11501Reviewed-by: default avatarBob Glossman <bob.glossman@intel.com>
Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 346dc1c8
/*
* 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.gnu.org/licenses/gpl-2.0.html
*
* 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/statfs.h>
#include <linux/fs.h>
#include <linux/dcache.h>
#include "../obd_class.h"
#include "../lustre_net.h"
#include "../lustre_ha.h"
#include <linux/rbtree.h>
#include "../../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
......@@ -46,6 +46,7 @@
#ifdef CONFIG_FS_POSIX_ACL
#include <linux/fs.h>
#include <linux/posix_acl_xattr.h>
typedef struct {
......
/*
* 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.gnu.org/licenses/gpl-2.0.html
*
* 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)
/*
* 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;
};
/*
* 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
......@@ -39,6 +39,9 @@
#ifndef _LUSTRE_PARAM_H
#define _LUSTRE_PARAM_H
#include "../../include/linux/libcfs/libcfs.h"
#include "../../include/linux/lnet/types.h"
/** \defgroup param param
*
* @{
......
......@@ -37,7 +37,6 @@
#define DEBUG_SUBSYSTEM S_LLITE
#include "../include/obd_support.h"
#include "../include/lustre_lite.h"
#include "../include/lustre/lustre_idl.h"
#include "../include/lustre_dlm.h"
......
......@@ -48,7 +48,6 @@
#include "../include/obd_class.h"
#include "../include/lustre/lustre_ioctl.h"
#include "../include/lustre_lib.h"
#include "../include/lustre_lite.h"
#include "../include/lustre_dlm.h"
#include "../include/lustre_fid.h"
#include "../include/lustre_kernelcomm.h"
......@@ -135,7 +134,7 @@
*
*/
struct page *ll_get_dir_page(struct inode *dir, struct md_op_data *op_data,
__u64 offset, struct ll_dir_chain *chain)
__u64 offset)
{
struct md_callback cb_op;
struct page *page;
......@@ -202,13 +201,10 @@ int ll_dir_read(struct inode *inode, __u64 *ppos, struct md_op_data *op_data,
int is_api32 = ll_need_32bit_api(sbi);
int is_hash64 = sbi->ll_flags & LL_SBI_64BIT_HASH;
struct page *page;
struct ll_dir_chain chain;
bool done = false;
int rc = 0;
ll_dir_chain_init(&chain);
page = ll_get_dir_page(inode, op_data, pos, &chain);
page = ll_get_dir_page(inode, op_data, pos);
while (rc == 0 && !done) {
struct lu_dirpage *dp;
......@@ -286,13 +282,11 @@ int ll_dir_read(struct inode *inode, __u64 *ppos, struct md_op_data *op_data,
le32_to_cpu(dp->ldp_flags) &
LDF_COLLIDE);
next = pos;
page = ll_get_dir_page(inode, op_data, pos,
&chain);
page = ll_get_dir_page(inode, op_data, pos);
}
}
ctx->pos = pos;
ll_dir_chain_fini(&chain);
return rc;
}
......
......@@ -38,7 +38,6 @@
#define DEBUG_SUBSYSTEM S_LLITE
#include "../include/lustre_dlm.h"
#include "../include/lustre_lite.h"
#include <linux/pagemap.h>
#include <linux/file.h>
#include <linux/sched.h>
......
......@@ -42,7 +42,6 @@
#include "../include/obd.h"
#include "../include/lustre_dlm.h"
#include "../include/lustre_lite.h"
#include "../include/lustre_mdc.h"
#include <linux/pagemap.h>
#include <linux/file.h>
......
......@@ -49,7 +49,6 @@
#include "../include/obd.h"
#include "../include/obd_support.h"
#include "../include/lustre_fid.h"
#include "../include/lustre_lite.h"
#include "../include/lustre_dlm.h"
#include "../include/lustre_ver.h"
#include "../include/lustre_mdc.h"
......
......@@ -38,7 +38,6 @@
#include "../include/obd.h"
#include "../include/cl_object.h"
#include "../include/lustre_lite.h"
#include "llite_internal.h"
/* Initialize the default and maximum LOV EA and cookie sizes. This allows
......
......@@ -38,7 +38,6 @@
#define DEBUG_SUBSYSTEM S_LLITE
#include "../include/lustre_lite.h"
#include "llite_internal.h"
/** records that a write is in flight */
......
......@@ -60,6 +60,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)
......@@ -445,6 +448,23 @@ enum stats_track_type {
"norootsquash", \
}
/*
* 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 {
/* this protects pglist and ra_info. It isn't safe to
* grab from interrupt contexts
......@@ -669,6 +689,45 @@ void ll_rw_stats_tally(struct ll_sb_info *sbi, pid_t pid,
struct ll_file_data *file, loff_t pos,
size_t count, int rw);
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 */
extern const struct file_operations ll_dir_operations;
extern const struct inode_operations ll_dir_inode_operations;
......@@ -677,7 +736,7 @@ int ll_dir_read(struct inode *inode, __u64 *ppos, struct md_op_data *op_data,
int ll_get_mdt_idx(struct inode *inode);
int ll_get_mdt_idx_by_fid(struct ll_sb_info *sbi, const struct lu_fid *fid);
struct page *ll_get_dir_page(struct inode *dir, struct md_op_data *op_data,
__u64 offset, struct ll_dir_chain *chain);
__u64 offset);
void ll_release_page(struct inode *inode, struct page *page, bool remove);
/* llite/namei.c */
......
......@@ -42,7 +42,6 @@
#include <linux/mm.h>
#include "../include/lustre/lustre_ioctl.h"
#include "../include/lustre_lite.h"
#include "../include/lustre_ha.h"
#include "../include/lustre_dlm.h"
#include "../include/lprocfs_status.h"
......
......@@ -43,7 +43,6 @@
#define DEBUG_SUBSYSTEM S_LLITE
#include "../include/lustre_lite.h"
#include "llite_internal.h"
#include "../include/linux/lustre_compat25.h"
......
......@@ -38,7 +38,6 @@
*/
#define DEBUG_SUBSYSTEM S_LLITE
#include "../include/lustre_lite.h"
#include "llite_internal.h"
#include <linux/exportfs.h>
......
......@@ -31,7 +31,6 @@
*/
#define DEBUG_SUBSYSTEM S_LLITE
#include "../include/lustre_lite.h"
#include "../include/lprocfs_status.h"
#include <linux/seq_file.h>
#include "../include/obd_support.h"
......
......@@ -42,7 +42,6 @@
#include "../include/obd_support.h"
#include "../include/lustre_fid.h"
#include "../include/lustre_lite.h"
#include "../include/lustre_dlm.h"
#include "../include/lustre_ver.h"
#include "llite_internal.h"
......
......@@ -50,7 +50,6 @@
#define DEBUG_SUBSYSTEM S_LLITE
#include "../include/lustre_lite.h"
#include "../include/obd_cksum.h"
#include "llite_internal.h"
#include "../include/linux/lustre_compat25.h"
......
......@@ -51,7 +51,6 @@
#define DEBUG_SUBSYSTEM S_LLITE
#include "../include/lustre_lite.h"
#include "llite_internal.h"
#include "../include/linux/lustre_compat25.h"
......
......@@ -39,7 +39,6 @@
#define DEBUG_SUBSYSTEM S_LLITE
#include "../include/obd_support.h"
#include "../include/lustre_lite.h"
#include "../include/lustre_dlm.h"
#include "llite_internal.h"
......@@ -1019,7 +1018,6 @@ static int ll_statahead_thread(void *arg)
int first = 0;
int rc = 0;
struct md_op_data *op_data;
struct ll_dir_chain chain;
struct l_wait_info lwi = { 0 };
sai = ll_sai_get(dir);
......@@ -1052,13 +1050,12 @@ static int ll_statahead_thread(void *arg)
spin_unlock(&lli->lli_sa_lock);
wake_up(&thread->t_ctl_waitq);
ll_dir_chain_init(&chain);
while (pos != MDS_DIR_END_OFF && thread_is_running(thread)) {
struct lu_dirpage *dp;
struct lu_dirent *ent;
sai->sai_in_readpage = 1;
page = ll_get_dir_page(dir, op_data, pos, &chain);
page = ll_get_dir_page(dir, op_data, pos);
sai->sai_in_readpage = 0;
if (IS_ERR(page)) {
rc = PTR_ERR(page);
......@@ -1146,7 +1143,6 @@ static int ll_statahead_thread(void *arg)
break;
}
}
ll_dir_chain_fini(&chain);
ll_finish_md_op_data(op_data);
if (rc < 0) {
......@@ -1280,7 +1276,6 @@ enum {
static int is_first_dirent(struct inode *dir, struct dentry *dentry)
{
struct ll_dir_chain chain;
const struct qstr *target = &dentry->d_name;
struct md_op_data *op_data;
struct page *page;
......@@ -1297,8 +1292,7 @@ static int is_first_dirent(struct inode *dir, struct dentry *dentry)
*/
op_data->op_max_pages = ll_i2sbi(dir)->ll_md_brw_pages;
ll_dir_chain_init(&chain);
page = ll_get_dir_page(dir, op_data, pos, &chain);
page = ll_get_dir_page(dir, op_data, pos);
while (1) {
struct lu_dirpage *dp;
......@@ -1387,11 +1381,10 @@ static int is_first_dirent(struct inode *dir, struct dentry *dentry)
ll_release_page(dir, page,
le32_to_cpu(dp->ldp_flags) &
LDF_COLLIDE);
page = ll_get_dir_page(dir, op_data, pos, &chain);
page = ll_get_dir_page(dir, op_data, pos);
}
}
out:
ll_dir_chain_fini(&chain);
ll_finish_md_op_data(op_data);
return rc;
}
......
......@@ -34,7 +34,6 @@
#include <linux/module.h>
#include <linux/types.h>
#include "../include/lustre_lite.h"
#include "../include/lustre_ha.h"
#include "../include/lustre_dlm.h"
#include <linux/init.h>
......
......@@ -35,7 +35,6 @@
#include <linux/stat.h>
#define DEBUG_SUBSYSTEM S_LLITE
#include "../include/lustre_lite.h"
#include "llite_internal.h"
static int ll_readlink_internal(struct inode *inode,
......
......@@ -38,7 +38,6 @@
#define DEBUG_SUBSYSTEM S_LLITE
#include "../include/obd.h"
#include "../include/lustre_lite.h"
#include "llite_internal.h"
#include "vvp_internal.h"
......
......@@ -38,7 +38,6 @@
#define DEBUG_SUBSYSTEM S_LLITE
#include "../include/obd.h"
#include "../include/lustre_lite.h"
#include "llite_internal.h"
#include "vvp_internal.h"
......
......@@ -37,7 +37,6 @@
#define DEBUG_SUBSYSTEM S_LLITE
#include "../include/obd_support.h"
#include "../include/lustre_lite.h"
#include "vvp_internal.h"
......
......@@ -39,7 +39,6 @@
#include "../../include/linux/libcfs/libcfs.h"
#include "../include/obd.h"
#include "../include/lustre_lite.h"
#include "llite_internal.h"
#include "vvp_internal.h"
......
......@@ -44,8 +44,6 @@
#include <linux/page-flags.h>
#include <linux/pagemap.h>
#include "../include/lustre_lite.h"
#include "llite_internal.h"
#include "vvp_internal.h"
......
......@@ -32,7 +32,6 @@
#include "../include/cl_object.h"
#include "../include/obd.h"
#include "../include/obd_support.h"
#include "../include/lustre_lite.h"
#include "llite_internal.h"
#include "vvp_internal.h"
......
......@@ -38,7 +38,6 @@
#define DEBUG_SUBSYSTEM S_LLITE
#include "../include/obd_support.h"
#include "../include/lustre_lite.h"
#include "../include/lustre_dlm.h"
#include "../include/lustre_ver.h"
#include "../include/lustre_eacl.h"
......
......@@ -13,7 +13,6 @@
#include <linux/sched.h>
#include <linux/mm.h>
#include "../include/obd_support.h"
#include "../include/lustre_lite.h"
#include "../include/lustre_dlm.h"
#include "../include/lustre_ver.h"
#include "llite_internal.h"
......
......@@ -43,13 +43,11 @@
#include "../include/lustre/lustre_idl.h"
#include "../include/obd_support.h"
#include "../include/lustre_lib.h"
#include "../include/lustre_net.h"
#include "../include/obd_class.h"
#include "../include/lustre_lmv.h"
#include "../include/lprocfs_status.h"
#include "../include/cl_object.h"
#include "../include/lustre_lite.h"
#include "../include/lustre_fid.h"
#include "../include/lustre/lustre_ioctl.h"
#include "../include/lustre_kernelcomm.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment