Remove liblustre includes from llite/. Always assume a kernel build.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I8ed001998869d0ee0b875b80cda9c35c7ad226b5
Reviewed-on: http://review.whamcloud.com/10172
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
#include <obd_support.h>
#include <obd.h>
#include <obd_support.h>
#include <obd.h>
-#ifdef __KERNEL__
-# include <lustre_dlm.h>
-# include <lustre_lite.h>
-# include <lustre_mdc.h>
-# include <linux/pagemap.h>
-# include <linux/file.h>
-#else
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/queue.h>
-#include <fcntl.h>
-#include <liblustre.h>
-#endif
+#include <lustre_dlm.h>
+#include <lustre_lite.h>
+#include <lustre_mdc.h>
+#include <linux/pagemap.h>
+#include <linux/file.h>
#include "cl_object.h"
#include "lclient.h"
#include "cl_object.h"
#include "lclient.h"
-#ifdef __KERNEL__
-# include "../llite/llite_internal.h"
-#else
-# include "../liblustre/llite_lib.h"
-#endif
+#include "llite_internal.h"
static const struct cl_lock_descr whole_file = {
.cld_start = 0,
static const struct cl_lock_descr whole_file = {
.cld_start = 0,
blkcnt_t dirty_cnt(struct inode *inode)
{
blkcnt_t cnt = 0;
blkcnt_t dirty_cnt(struct inode *inode)
{
blkcnt_t cnt = 0;
struct ccc_object *vob = cl_inode2ccc(inode);
void *results[1];
struct ccc_object *vob = cl_inode2ccc(inode);
void *results[1];
if (cnt == 0 && atomic_read(&vob->cob_mmap_cnt) > 0)
cnt = 1;
if (cnt == 0 && atomic_read(&vob->cob_mmap_cnt) > 0)
cnt = 1;
return (cnt > 0) ? 1 : 0;
}
return (cnt > 0) ? 1 : 0;
}
#define DEBUG_SUBSYSTEM S_LLITE
#define DEBUG_SUBSYSTEM S_LLITE
-#ifdef __KERNEL__
-# include <libcfs/libcfs.h>
-# include <linux/fs.h>
-# include <linux/sched.h>
-# include <linux/mm.h>
-# include <linux/quotaops.h>
-# include <linux/highmem.h>
-# include <linux/pagemap.h>
-# include <linux/rbtree.h>
-#else /* __KERNEL__ */
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/queue.h>
-#include <fcntl.h>
-# include <liblustre.h>
-#endif
+#include <libcfs/libcfs.h>
+#include <linux/fs.h>
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <linux/quotaops.h>
+#include <linux/highmem.h>
+#include <linux/pagemap.h>
+#include <linux/rbtree.h>
#include <obd.h>
#include <obd_support.h>
#include <obd.h>
#include <obd_support.h>
-#ifdef __KERNEL__
-#include "../llite/llite_internal.h"
-#else
-#include "../liblustre/llite_lib.h"
-#endif
+#include "llite_internal.h"
static const struct cl_req_operations ccc_req_ops;
static const struct cl_req_operations ccc_req_ops;
obdo_set_parent_fid(oa, &cl_i2info(inode)->lli_fid);
if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_INVALID_PFID))
oa->o_parent_oid++;
obdo_set_parent_fid(oa, &cl_i2info(inode)->lli_fid);
if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_INVALID_PFID))
oa->o_parent_oid++;
memcpy(attr->cra_jobid, cl_i2info(inode)->lli_jobid,
JOBSTATS_JOBID_SIZE);
memcpy(attr->cra_jobid, cl_i2info(inode)->lli_jobid,
JOBSTATS_JOBID_SIZE);
}
static const struct cl_req_operations ccc_req_ops = {
}
static const struct cl_req_operations ccc_req_ops = {
* there is no clob in cache with the given fid, so it is
* unnecessary to perform lookup-alloc-lookup-insert, just
* alloc and insert directly. */
* there is no clob in cache with the given fid, so it is
* unnecessary to perform lookup-alloc-lookup-insert, just
* alloc and insert directly. */
LASSERT(inode->i_state & I_NEW);
LASSERT(inode->i_state & I_NEW);
conf.coc_lu.loc_flags = LOC_F_NEW;
clob = cl_object_find(env, lu2cl_dev(site->ls_top_dev),
fid, &conf);
conf.coc_lu.loc_flags = LOC_F_NEW;
clob = cl_object_find(env, lu2cl_dev(site->ls_top_dev),
fid, &conf);
}
/* llite ioctl register support rountine */
}
/* llite ioctl register support rountine */
enum llioc_iter {
LLIOC_CONT = 0,
LLIOC_STOP
enum llioc_iter {
LLIOC_CONT = 0,
LLIOC_STOP
void *ll_iocontrol_register(llioc_callback_t cb, int count, unsigned int *cmd);
void ll_iocontrol_unregister(void *magic);
void *ll_iocontrol_register(llioc_callback_t cb, int count, unsigned int *cmd);
void ll_iocontrol_unregister(void *magic);
/* lclient compat stuff */
#define cl_inode_info ll_inode_info
/* lclient compat stuff */
#define cl_inode_info ll_inode_info
#define DEBUG_SUBSYSTEM S_LLITE
#define DEBUG_SUBSYSTEM S_LLITE
-#ifndef __KERNEL__
-# error This file is kernel only.
-#endif
#include <obd.h>
#include <lustre_lite.h>
#include <obd.h>
#include <lustre_lite.h>
#ifndef VVP_INTERNAL_H
#define VVP_INTERNAL_H
#ifndef VVP_INTERNAL_H
#define VVP_INTERNAL_H
-#ifndef __KERNEL__
-# error This file is kernel only.
-#endif
#include <cl_object.h>
#include "llite_internal.h"
#include <cl_object.h>
#include "llite_internal.h"
#define DEBUG_SUBSYSTEM S_LLITE
#define DEBUG_SUBSYSTEM S_LLITE
-#ifndef __KERNEL__
-# error This file is kernel only.
-#endif
#include <obd.h>
#include <lustre_lite.h>
#include <obd.h>
#include <lustre_lite.h>
#define DEBUG_SUBSYSTEM S_LLITE
#define DEBUG_SUBSYSTEM S_LLITE
-#ifndef __KERNEL__
-# error This file is kernel only.
-#endif
#include <obd.h>
#include <lustre_lite.h>
#include <obd.h>
#include <lustre_lite.h>
#define DEBUG_SUBSYSTEM S_LLITE
#define DEBUG_SUBSYSTEM S_LLITE
-#ifndef __KERNEL__
-# error This file is kernel only.
-#endif
#include <libcfs/libcfs.h>
#include <libcfs/libcfs.h>
#define DEBUG_SUBSYSTEM S_LLITE
#define DEBUG_SUBSYSTEM S_LLITE
-#ifndef __KERNEL__
-# error This file is kernel only.
-#endif
#include <obd.h>
#include <lustre_lite.h>
#include <obd.h>
#include <lustre_lite.h>