aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/llite
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--drivers/staging/lustre/lustre/llite/Makefile3
-rw-r--r--drivers/staging/lustre/lustre/llite/dcache.c16
-rw-r--r--drivers/staging/lustre/lustre/llite/dir.c62
-rw-r--r--drivers/staging/lustre/lustre/llite/file.c24
-rw-r--r--drivers/staging/lustre/lustre/llite/llite_capa.c24
-rw-r--r--drivers/staging/lustre/lustre/llite/llite_close.c4
-rw-r--r--drivers/staging/lustre/lustre/llite/llite_internal.h26
-rw-r--r--drivers/staging/lustre/lustre/llite/llite_lib.c52
-rw-r--r--drivers/staging/lustre/lustre/llite/llite_mmap.c6
-rw-r--r--drivers/staging/lustre/lustre/llite/llite_nfs.c2
-rw-r--r--drivers/staging/lustre/lustre/llite/llite_rmtacl.c4
-rw-r--r--drivers/staging/lustre/lustre/llite/lloop.c4
-rw-r--r--drivers/staging/lustre/lustre/llite/lproc_llite.c79
-rw-r--r--drivers/staging/lustre/lustre/llite/namei.c14
-rw-r--r--drivers/staging/lustre/lustre/llite/remote_perm.c14
-rw-r--r--drivers/staging/lustre/lustre/llite/rw.c15
-rw-r--r--drivers/staging/lustre/lustre/llite/rw26.c4
-rw-r--r--drivers/staging/lustre/lustre/llite/statahead.c30
-rw-r--r--drivers/staging/lustre/lustre/llite/super25.c8
-rw-r--r--drivers/staging/lustre/lustre/llite/symlink.c2
-rw-r--r--drivers/staging/lustre/lustre/llite/vvp_dev.c4
-rw-r--r--drivers/staging/lustre/lustre/llite/vvp_internal.h2
-rw-r--r--drivers/staging/lustre/lustre/llite/vvp_io.c10
-rw-r--r--drivers/staging/lustre/lustre/llite/vvp_lock.c4
-rw-r--r--drivers/staging/lustre/lustre/llite/vvp_object.c6
-rw-r--r--drivers/staging/lustre/lustre/llite/vvp_page.c4
-rw-r--r--drivers/staging/lustre/lustre/llite/xattr.c11
-rw-r--r--drivers/staging/lustre/lustre/llite/xattr_cache.c8
28 files changed, 218 insertions, 224 deletions
diff --git a/drivers/staging/lustre/lustre/llite/Makefile b/drivers/staging/lustre/lustre/llite/Makefile
index c76f3cfedab0..7d70115d5bc7 100644
--- a/drivers/staging/lustre/lustre/llite/Makefile
+++ b/drivers/staging/lustre/lustre/llite/Makefile
@@ -9,6 +9,3 @@ lustre-y := dcache.o dir.o file.o llite_close.o llite_lib.o llite_nfs.o \
lustre-$(CONFIG_PROC_FS) += lproc_llite.o
llite_lloop-y := lloop.o
-
-
-ccflags-y := -I$(src)/../include
diff --git a/drivers/staging/lustre/lustre/llite/dcache.c b/drivers/staging/lustre/lustre/llite/dcache.c
index 7d520d8f4a69..49ae207ad425 100644
--- a/drivers/staging/lustre/lustre/llite/dcache.c
+++ b/drivers/staging/lustre/lustre/llite/dcache.c
@@ -40,10 +40,10 @@
#define DEBUG_SUBSYSTEM S_LLITE
-#include <obd_support.h>
-#include <lustre_lite.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_dlm.h>
+#include "../include/obd_support.h"
+#include "../include/lustre_lite.h"
+#include "../include/lustre/lustre_idl.h"
+#include "../include/lustre_dlm.h"
#include "llite_internal.h"
@@ -213,8 +213,8 @@ void ll_intent_drop_lock(struct lookup_intent *it)
handle.cookie = it->d.lustre.it_lock_handle;
- CDEBUG(D_DLMTRACE, "releasing lock with cookie "LPX64
- " from it %p\n", handle.cookie, it);
+ CDEBUG(D_DLMTRACE, "releasing lock with cookie %#llx from it %p\n",
+ handle.cookie, it);
ldlm_lock_decref(&handle, it->d.lustre.it_lock_mode);
/* bug 494: intent_release may be called multiple times, from
@@ -223,8 +223,8 @@ void ll_intent_drop_lock(struct lookup_intent *it)
if (it->d.lustre.it_remote_lock_mode != 0) {
handle.cookie = it->d.lustre.it_remote_lock_handle;
- CDEBUG(D_DLMTRACE, "releasing remote lock with cookie"
- LPX64" from it %p\n", handle.cookie, it);
+ CDEBUG(D_DLMTRACE, "releasing remote lock with cookie%#llx from it %p\n",
+ handle.cookie, it);
ldlm_lock_decref(&handle,
it->d.lustre.it_remote_lock_mode);
it->d.lustre.it_remote_lock_mode = 0;
diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c
index ae6f61aa4da6..efa2faf080d7 100644
--- a/drivers/staging/lustre/lustre/llite/dir.c
+++ b/drivers/staging/lustre/lustre/llite/dir.c
@@ -48,13 +48,13 @@
#define DEBUG_SUBSYSTEM S_LLITE
-#include <obd_support.h>
-#include <obd_class.h>
-#include <lustre_lib.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_lite.h>
-#include <lustre_dlm.h>
-#include <lustre_fid.h>
+#include "../include/obd_support.h"
+#include "../include/obd_class.h"
+#include "../include/lustre_lib.h"
+#include "../include/lustre/lustre_idl.h"
+#include "../include/lustre_lite.h"
+#include "../include/lustre_dlm.h"
+#include "../include/lustre_fid.h"
#include "llite_internal.h"
/*
@@ -158,7 +158,7 @@ static int ll_dir_filler(void *_hash, struct page *page0)
int i;
int rc;
- CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p) hash "LPU64"\n",
+ CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p) hash %llu\n",
inode->i_ino, inode->i_generation, inode, hash);
LASSERT(max_pages > 0 && max_pages <= MD_MAX_BRW_PAGES);
@@ -302,9 +302,9 @@ static struct page *ll_dir_page_locate(struct inode *dir, __u64 *hash,
*start = le64_to_cpu(dp->ldp_hash_start);
*end = le64_to_cpu(dp->ldp_hash_end);
}
- LASSERTF(*start <= *hash, "start = "LPX64",end = "
- LPX64",hash = "LPX64"\n", *start, *end, *hash);
- CDEBUG(D_VFSTRACE, "page %lu [%llu %llu], hash "LPU64"\n",
+ LASSERTF(*start <= *hash, "start = %#llx,end = %#llx,hash = %#llx\n",
+ *start, *end, *hash);
+ CDEBUG(D_VFSTRACE, "page %lu [%llu %llu], hash %llu\n",
offset, *start, *end, *hash);
if (*hash > *end) {
ll_release_page(page, 0);
@@ -376,7 +376,7 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash,
if (request)
ptlrpc_req_finished(request);
if (rc < 0) {
- CERROR("lock enqueue: "DFID" at "LPU64": rc %d\n",
+ CERROR("lock enqueue: "DFID" at %llu: rc %d\n",
PFID(ll_inode2fid(dir)), hash, rc);
return ERR_PTR(rc);
}
@@ -396,7 +396,7 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash,
mutex_lock(&lli->lli_readdir_mutex);
page = ll_dir_page_locate(dir, &lhash, &start, &end);
if (IS_ERR(page)) {
- CERROR("dir page locate: "DFID" at "LPU64": rc %ld\n",
+ CERROR("dir page locate: "DFID" at %llu: rc %ld\n",
PFID(ll_inode2fid(dir)), lhash, PTR_ERR(page));
GOTO(out_unlock, page);
} else if (page != NULL) {
@@ -420,7 +420,7 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash,
page = read_cache_page(mapping, hash_x_index(hash, hash64),
ll_dir_filler, &lhash);
if (IS_ERR(page)) {
- CERROR("read cache page: "DFID" at "LPU64": rc %ld\n",
+ CERROR("read cache page: "DFID" at %llu: rc %ld\n",
PFID(ll_inode2fid(dir)), hash, PTR_ERR(page));
GOTO(out_unlock, page);
}
@@ -428,14 +428,14 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash,
wait_on_page_locked(page);
(void)kmap(page);
if (!PageUptodate(page)) {
- CERROR("page not updated: "DFID" at "LPU64": rc %d\n",
+ CERROR("page not updated: "DFID" at %llu: rc %d\n",
PFID(ll_inode2fid(dir)), hash, -5);
goto fail;
}
if (!PageChecked(page))
ll_check_page(dir, page);
if (PageError(page)) {
- CERROR("page error: "DFID" at "LPU64": rc %d\n",
+ CERROR("page error: "DFID" at %llu: rc %d\n",
PFID(ll_inode2fid(dir)), hash, -5);
goto fail;
}
@@ -452,10 +452,9 @@ hash_collision:
}
if (end == start) {
LASSERT(start == lhash);
- CWARN("Page-wide hash collision: "LPU64"\n", end);
+ CWARN("Page-wide hash collision: %llu\n", end);
if (BITS_PER_LONG == 32 && hash64)
- CWARN("Real page-wide hash collision at ["LPU64" "LPU64
- "] with hash "LPU64"\n",
+ CWARN("Real page-wide hash collision at [%llu %llu] with hash %llu\n",
le64_to_cpu(dp->ldp_hash_start),
le64_to_cpu(dp->ldp_hash_end), hash);
/*
@@ -926,8 +925,7 @@ static int ll_ioc_copy_start(struct super_block *sb, struct hsm_copy *copy)
iput(inode);
if (rc != 0) {
CDEBUG(D_HSM, "Could not read file data version of "
- DFID" (rc = %d). Archive request ("
- LPX64") could not be done.\n",
+ DFID" (rc = %d). Archive request (%#llx) could not be done.\n",
PFID(&copy->hc_hai.hai_fid), rc,
copy->hc_hai.hai_cookie);
hpk.hpk_flags |= HP_FLAG_RETRY;
@@ -1023,7 +1021,7 @@ static int ll_ioc_copy_end(struct super_block *sb, struct hsm_copy *copy)
(copy->hc_data_version != data_version)) {
CDEBUG(D_HSM, "File data version mismatched. "
"File content was changed during archiving. "
- DFID", start:"LPX64" current:"LPX64"\n",
+ DFID", start:%#llx current:%#llx\n",
PFID(&copy->hc_hai.hai_fid),
copy->hc_data_version, data_version);
/* File was changed, send error to cdt. Do not ask for
@@ -1266,7 +1264,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
if (mdtidx < 0)
return mdtidx;
- if (put_user((int)mdtidx, (int*)arg))
+ if (put_user((int)mdtidx, (int *)arg))
return -EFAULT;
return 0;
@@ -1501,7 +1499,7 @@ out_rmdir:
GOTO(out_req, rc = -EFAULT);
rc = -EOVERFLOW;
}
- skip_lmm:
+skip_lmm:
if (cmd == IOC_MDC_GETFILEINFO || cmd == LL_IOC_MDC_GETINFO) {
struct lov_user_mds_data *lmdp;
lstat_t st = { 0 };
@@ -1525,7 +1523,7 @@ out_rmdir:
GOTO(out_req, rc = -EFAULT);
}
- out_req:
+out_req:
ptlrpc_req_finished(request);
if (filename)
ll_putname(filename);
@@ -1589,9 +1587,9 @@ out_rmdir:
if (copy_to_user(&lumd->lmd_st, &st, sizeof(st)))
GOTO(free_lsm, rc = -EFAULT);
- free_lsm:
+free_lsm:
obd_free_memmd(sbi->ll_dt_exp, &lsm);
- free_lmm:
+free_lmm:
OBD_FREE_LARGE(lmm, lmmsize);
return rc;
}
@@ -1653,7 +1651,7 @@ out_rmdir:
CDEBUG(D_QUOTA, "copy_to_user failed\n");
GOTO(out_poll, rc);
}
- out_poll:
+out_poll:
OBD_FREE_PTR(check);
return rc;
}
@@ -1702,9 +1700,9 @@ out_rmdir:
rc = -EFAULT;
}
- out_quotactl_20:
+out_quotactl_20:
OBD_FREE_PTR(qctl_20);
- out_quotactl_18:
+out_quotactl_18:
OBD_FREE_PTR(qctl_18);
return rc;
}
@@ -1726,7 +1724,7 @@ out_rmdir:
if (rc == 0 && copy_to_user((void *)arg,qctl,sizeof(*qctl)))
rc = -EFAULT;
- out_quotactl:
+out_quotactl:
OBD_FREE_PTR(qctl);
return rc;
}
@@ -1778,7 +1776,7 @@ out_rmdir:
return -EFAULT;
return 0;
case LL_IOC_GET_CONNECT_FLAGS: {
- return obd_iocontrol(cmd, sbi->ll_md_exp, 0, NULL, (void*)arg);
+ return obd_iocontrol(cmd, sbi->ll_md_exp, 0, NULL, (void *)arg);
}
case OBD_IOC_CHANGELOG_SEND:
case OBD_IOC_CHANGELOG_CLEAR:
diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
index 716e1ee0104f..fd1b75a3a569 100644
--- a/drivers/staging/lustre/lustre/llite/file.c
+++ b/drivers/staging/lustre/lustre/llite/file.c
@@ -41,14 +41,14 @@
*/
#define DEBUG_SUBSYSTEM S_LLITE
-#include <lustre_dlm.h>
-#include <lustre_lite.h>
+#include "../include/lustre_dlm.h"
+#include "../include/lustre_lite.h"
#include <linux/pagemap.h>
#include <linux/file.h>
#include "llite_internal.h"
-#include <lustre/ll_fiemap.h>
+#include "../include/lustre/ll_fiemap.h"
-#include "cl_object.h"
+#include "../include/cl_object.h"
static int
ll_put_grouplock(struct inode *inode, struct file *file, unsigned long arg);
@@ -140,7 +140,7 @@ static int ll_close_inode_openhandle(struct obd_export *md_exp,
* XXX: in case of LMV, is this correct to access
* ->exp_handle?
*/
- CERROR("Invalid MDC connection handle "LPX64"\n",
+ CERROR("Invalid MDC connection handle %#llx\n",
ll_i2mdexp(inode)->exp_handle.h_cookie);
GOTO(out, rc = 0);
}
@@ -290,7 +290,7 @@ static int ll_md_close(struct obd_export *md_exp, struct inode *inode,
we can skip talking to MDS */
if (file->f_dentry->d_inode) { /* Can this ever be false? */
int lockmode;
- int flags = LDLM_FL_BLOCK_GRANTED | LDLM_FL_TEST_LOCK;
+ __u64 flags = LDLM_FL_BLOCK_GRANTED | LDLM_FL_TEST_LOCK;
struct lustre_handle lockh;
struct inode *inode = file->f_dentry->d_inode;
ldlm_policy_data_t policy = {.l_inodebits={MDS_INODELOCK_OPEN}};
@@ -471,7 +471,7 @@ void ll_ioepoch_open(struct ll_inode_info *lli, __u64 ioepoch)
{
if (ioepoch && lli->lli_ioepoch != ioepoch) {
lli->lli_ioepoch = ioepoch;
- CDEBUG(D_INODE, "Epoch "LPU64" opened on "DFID"\n",
+ CDEBUG(D_INODE, "Epoch %llu opened on "DFID"\n",
ioepoch, PFID(&lli->lli_fid));
}
}
@@ -1008,7 +1008,7 @@ int ll_merge_lvb(const struct lu_env *env, struct inode *inode)
if (lvb.lvb_mtime < attr->cat_mtime)
lvb.lvb_mtime = attr->cat_mtime;
- CDEBUG(D_VFSTRACE, DFID" updating i_size "LPU64"\n",
+ CDEBUG(D_VFSTRACE, DFID" updating i_size %llu\n",
PFID(&lli->lli_fid), attr->cat_size);
cl_isize_write_nolock(inode, attr->cat_size);
@@ -2623,7 +2623,7 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)
struct md_op_data *op_data;
struct lustre_handle lockh = {0};
ldlm_policy_data_t flock = {{0}};
- int flags = 0;
+ __u64 flags = 0;
int rc;
int rc2 = 0;
@@ -2708,9 +2708,9 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)
if (IS_ERR(op_data))
return PTR_ERR(op_data);
- CDEBUG(D_DLMTRACE, "inode=%lu, pid=%u, flags=%#x, mode=%u, "
- "start="LPU64", end="LPU64"\n", inode->i_ino, flock.l_flock.pid,
- flags, einfo.ei_mode, flock.l_flock.start, flock.l_flock.end);
+ CDEBUG(D_DLMTRACE, "inode=%lu, pid=%u, flags=%#llx, mode=%u, start=%llu, end=%llu\n",
+ inode->i_ino, flock.l_flock.pid, flags, einfo.ei_mode,
+ flock.l_flock.start, flock.l_flock.end);
rc = md_enqueue(sbi->ll_md_exp, &einfo, NULL,
op_data, &lockh, &flock, 0, NULL /* req */, flags);
diff --git a/drivers/staging/lustre/lustre/llite/llite_capa.c b/drivers/staging/lustre/lustre/llite/llite_capa.c
index d06d0b1ab08a..023c40518c6d 100644
--- a/drivers/staging/lustre/lustre/llite/llite_capa.c
+++ b/drivers/staging/lustre/lustre/llite/llite_capa.c
@@ -41,11 +41,11 @@
#define DEBUG_SUBSYSTEM S_LLITE
#include <linux/fs.h>
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
#include <linux/file.h>
#include <linux/kmod.h>
-#include <lustre_lite.h>
+#include "../include/lustre_lite.h"
#include "llite_internal.h"
/* for obd_capa.c_list, client capa might stay in three places:
@@ -63,16 +63,16 @@ static struct list_head *ll_capa_list = &capa_list[CAPA_SITE_CLIENT];
struct timer_list ll_capa_timer;
/* for debug: indicate whether capa on llite is enabled or not */
static atomic_t ll_capa_debug = ATOMIC_INIT(0);
-static unsigned long long ll_capa_renewed = 0;
-static unsigned long long ll_capa_renewal_noent = 0;
-static unsigned long long ll_capa_renewal_failed = 0;
-static unsigned long long ll_capa_renewal_retries = 0;
+static unsigned long long ll_capa_renewed;
+static unsigned long long ll_capa_renewal_noent;
+static unsigned long long ll_capa_renewal_failed;
+static unsigned long long ll_capa_renewal_retries;
static int ll_update_capa(struct obd_capa *ocapa, struct lustre_capa *capa);
-static inline void update_capa_timer(struct obd_capa *ocapa, cfs_time_t expiry)
+static inline void update_capa_timer(struct obd_capa *ocapa, unsigned long expiry)
{
- if (cfs_time_before(expiry, ll_capa_timer.expires) ||
+ if (time_before(expiry, ll_capa_timer.expires) ||
!timer_pending(&ll_capa_timer)) {
mod_timer(&ll_capa_timer, expiry);
DEBUG_CAPA(D_SEC, &ocapa->c_capa,
@@ -80,7 +80,7 @@ static inline void update_capa_timer(struct obd_capa *ocapa, cfs_time_t expiry)
}
}
-static inline cfs_time_t capa_renewal_time(struct obd_capa *ocapa)
+static inline unsigned long capa_renewal_time(struct obd_capa *ocapa)
{
return cfs_time_sub(ocapa->c_expiry,
cfs_time_seconds(ocapa->c_capa.lc_timeout) / 2);
@@ -88,7 +88,7 @@ static inline cfs_time_t capa_renewal_time(struct obd_capa *ocapa)
static inline int capa_is_to_expire(struct obd_capa *ocapa)
{
- return cfs_time_beforeq(capa_renewal_time(ocapa), cfs_time_current());
+ return time_before_eq(capa_renewal_time(ocapa), cfs_time_current());
}
static inline int have_expired_capa(void)
@@ -359,7 +359,7 @@ struct obd_capa *ll_osscapa_get(struct inode *inode, __u64 opc)
ocapa = NULL;
if (atomic_read(&ll_capa_debug)) {
- CERROR("no capability for "DFID" opc "LPX64"\n",
+ CERROR("no capability for "DFID" opc %#llx\n",
PFID(&lli->lli_fid), opc);
atomic_set(&ll_capa_debug, 0);
}
@@ -511,7 +511,7 @@ struct obd_capa *ll_add_capa(struct inode *inode, struct obd_capa *ocapa)
return ocapa;
}
-static inline void delay_capa_renew(struct obd_capa *oc, cfs_time_t delay)
+static inline void delay_capa_renew(struct obd_capa *oc, unsigned long delay)
{
/* NB: set a fake expiry for this capa to prevent it renew too soon */
oc->c_expiry = cfs_time_add(oc->c_expiry, cfs_time_seconds(delay));
diff --git a/drivers/staging/lustre/lustre/llite/llite_close.c b/drivers/staging/lustre/lustre/llite/llite_close.c
index 38c2d0e947db..6a3a7a303043 100644
--- a/drivers/staging/lustre/lustre/llite/llite_close.c
+++ b/drivers/staging/lustre/lustre/llite/llite_close.c
@@ -42,7 +42,7 @@
#define DEBUG_SUBSYSTEM S_LLITE
-#include <lustre_lite.h>
+#include "../include/lustre_lite.h"
#include "llite_internal.h"
/** records that a write is in flight */
@@ -170,7 +170,7 @@ void ll_ioepoch_close(struct inode *inode, struct md_op_data *op_data,
GOTO(out, 0);
}
}
- CDEBUG(D_INODE, "Epoch "LPU64" closed on "DFID"\n",
+ CDEBUG(D_INODE, "Epoch %llu closed on "DFID"\n",
ll_i2info(inode)->lli_ioepoch, PFID(&lli->lli_fid));
op_data->op_flags |= MF_EPOCH_CLOSE;
diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h
index 140ee947ba49..634ffa645e06 100644
--- a/drivers/staging/lustre/lustre/llite/llite_internal.h
+++ b/drivers/staging/lustre/lustre/llite/llite_internal.h
@@ -36,16 +36,16 @@
#ifndef LLITE_INTERNAL_H
#define LLITE_INTERNAL_H
-#include <lustre_debug.h>
-#include <lustre_ver.h>
-#include <lustre_disk.h> /* for s2sbi */
-#include <lustre_eacl.h>
+#include "../include/lustre_debug.h"
+#include "../include/lustre_ver.h"
+#include "../include/lustre_disk.h" /* for s2sbi */
+#include "../include/lustre_eacl.h"
/* for struct cl_lock_descr and struct cl_io */
-#include <cl_object.h>
-#include <lclient.h>
-#include <lustre_mdc.h>
-#include <linux/lustre_intent.h>
+#include "../include/cl_object.h"
+#include "../include/lclient.h"
+#include "../include/lustre_mdc.h"
+#include "../include/linux/lustre_intent.h"
#include <linux/compat.h>
#include <linux/posix_acl_xattr.h>
@@ -145,7 +145,7 @@ struct ll_inode_info {
* capability needs renewal */
atomic_t lli_open_count;
struct obd_capa *lli_mds_capa;
- cfs_time_t lli_rmtperm_time;
+ unsigned long lli_rmtperm_time;
/* handle is to be sent to MDS later on done_writing and setattr.
* Open handle data are needed for the recovery to reconstruct
@@ -213,7 +213,7 @@ struct ll_inode_info {
struct mutex f_write_mutex;
struct rw_semaphore f_glimpse_sem;
- cfs_time_t f_glimpse_time;
+ unsigned long f_glimpse_time;
struct list_head f_agl_list;
__u64 f_agl_index;
@@ -670,7 +670,7 @@ void ll_ra_read_ex(struct file *f, struct ll_ra_read *rar);
struct ll_ra_read *ll_ra_read_get(struct file *f);
/* llite/lproc_llite.c */
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
int lprocfs_register_mountpoint(struct proc_dir_entry *parent,
struct super_block *sb, char *osc, char *mdc);
void lprocfs_unregister_mountpoint(struct ll_sb_info *sbi);
@@ -1432,7 +1432,7 @@ static inline void ll_set_lock_data(struct obd_export *exp, struct inode *inode,
if (it->d.lustre.it_remote_lock_mode) {
handle.cookie = it->d.lustre.it_remote_lock_handle;
CDEBUG(D_DLMTRACE, "setting l_data to inode %p"
- "(%lu/%u) for remote lock "LPX64"\n", inode,
+ "(%lu/%u) for remote lock %#llx\n", inode,
inode->i_ino, inode->i_generation,
handle.cookie);
md_set_lock_data(exp, &handle.cookie, inode, NULL);
@@ -1441,7 +1441,7 @@ static inline void ll_set_lock_data(struct obd_export *exp, struct inode *inode,
handle.cookie = it->d.lustre.it_lock_handle;
CDEBUG(D_DLMTRACE, "setting l_data to inode %p (%lu/%u)"
- " for lock "LPX64"\n", inode, inode->i_ino,
+ " for lock %#llx\n", inode, inode->i_ino,
inode->i_generation, handle.cookie);
md_set_lock_data(exp, &handle.cookie, inode,
diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c
index deca27ea33fe..0367f5a2cfe4 100644
--- a/drivers/staging/lustre/lustre/llite/llite_lib.c
+++ b/drivers/staging/lustre/lustre/llite/llite_lib.c
@@ -44,15 +44,15 @@
#include <linux/types.h>
#include <linux/mm.h>
-#include <lustre_lite.h>
-#include <lustre_ha.h>
-#include <lustre_dlm.h>
-#include <lprocfs_status.h>
-#include <lustre_disk.h>
-#include <lustre_param.h>
-#include <lustre_log.h>
-#include <cl_object.h>
-#include <obd_cksum.h>
+#include "../include/lustre_lite.h"
+#include "../include/lustre_ha.h"
+#include "../include/lustre_dlm.h"
+#include "../include/lprocfs_status.h"
+#include "../include/lustre_disk.h"
+#include "../include/lustre_param.h"
+#include "../include/lustre_log.h"
+#include "../include/cl_object.h"
+#include "../include/obd_cksum.h"
#include "llite_internal.h"
struct kmem_cache *ll_file_data_slab;
@@ -152,7 +152,7 @@ static void ll_free_sbi(struct super_block *sb)
static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
struct vfsmount *mnt)
{
- struct inode *root = 0;
+ struct inode *root = NULL;
struct ll_sb_info *sbi = ll_s2sbi(sb);
struct obd_device *obd;
struct obd_capa *oc = NULL;
@@ -426,7 +426,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
if (sbi->ll_flags & LL_SBI_RMT_CLIENT)
data->ocd_connect_flags |= OBD_CONNECT_RMT_CLIENT_FORCE;
- CDEBUG(D_RPCTRACE, "ocd_connect_flags: "LPX64" ocd_version: %d "
+ CDEBUG(D_RPCTRACE, "ocd_connect_flags: %#llx ocd_version: %d "
"ocd_grant: %d\n", data->ocd_connect_flags,
data->ocd_version, data->ocd_grant);
@@ -1296,7 +1296,7 @@ static int ll_setattr_done_writing(struct inode *inode,
if (!S_ISREG(inode->i_mode))
return 0;
- CDEBUG(D_INODE, "Epoch "LPU64" closed on "DFID" for truncate\n",
+ CDEBUG(D_INODE, "Epoch %llu closed on "DFID" for truncate\n",
op_data->op_ioepoch, PFID(&lli->lli_fid));
op_data->op_flags = MF_EPOCH_CLOSE;
@@ -1377,7 +1377,7 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)
* OST maximum object size and number of stripes. This
* needs another check in addition to the VFS check above. */
if (attr->ia_size > ll_file_maxbytes(inode)) {
- CDEBUG(D_INODE,"file "DFID" too large %llu > "LPU64"\n",
+ CDEBUG(D_INODE,"file "DFID" too large %llu > %llu\n",
PFID(&lli->lli_fid), attr->ia_size,
ll_file_maxbytes(inode));
return -EFBIG;
@@ -1412,7 +1412,7 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)
if (attr->ia_valid & (ATTR_MTIME | ATTR_CTIME))
CDEBUG(D_INODE, "setting mtime %lu, ctime %lu, now = %lu\n",
LTIME_S(attr->ia_mtime), LTIME_S(attr->ia_ctime),
- cfs_time_current_sec());
+ get_seconds());
/* If we are changing file size, file content is modified, flag it. */
if (attr->ia_valid & ATTR_SIZE) {
@@ -1537,12 +1537,14 @@ int ll_setattr(struct dentry *de, struct iattr *attr)
!(attr->ia_mode & S_ISGID))))
attr->ia_valid |= ATTR_FORCE;
- if ((mode & S_ISUID) &&
+ if ((attr->ia_valid & ATTR_MODE) &&
+ (mode & S_ISUID) &&
!(attr->ia_mode & S_ISUID) &&
!(attr->ia_valid & ATTR_KILL_SUID))
attr->ia_valid |= ATTR_KILL_SUID;
- if (((mode & (S_ISGID|S_IXGRP)) == (S_ISGID|S_IXGRP)) &&
+ if ((attr->ia_valid & ATTR_MODE) &&
+ ((mode & (S_ISGID|S_IXGRP)) == (S_ISGID|S_IXGRP)) &&
!(attr->ia_mode & S_ISGID) &&
!(attr->ia_valid & ATTR_KILL_SGID))
attr->ia_valid |= ATTR_KILL_SGID;
@@ -1565,7 +1567,7 @@ int ll_statfs_internal(struct super_block *sb, struct obd_statfs *osfs,
osfs->os_type = sb->s_magic;
- CDEBUG(D_SUPER, "MDC blocks "LPU64"/"LPU64" objects "LPU64"/"LPU64"\n",
+ CDEBUG(D_SUPER, "MDC blocks %llu/%llu objects %llu/%llu\n",
osfs->os_bavail, osfs->os_blocks, osfs->os_ffree,osfs->os_files);
if (sbi->ll_flags & LL_SBI_LAZYSTATFS)
@@ -1577,7 +1579,7 @@ int ll_statfs_internal(struct super_block *sb, struct obd_statfs *osfs,
return rc;
}
- CDEBUG(D_SUPER, "OSC blocks "LPU64"/"LPU64" objects "LPU64"/"LPU64"\n",
+ CDEBUG(D_SUPER, "OSC blocks %llu/%llu objects %llu/%llu\n",
obd_osfs.os_bavail, obd_osfs.os_blocks, obd_osfs.os_ffree,
obd_osfs.os_files);
@@ -1604,7 +1606,7 @@ int ll_statfs(struct dentry *de, struct kstatfs *sfs)
struct obd_statfs osfs;
int rc;
- CDEBUG(D_VFSTRACE, "VFS Op: at "LPU64" jiffies\n", get_jiffies_64());
+ CDEBUG(D_VFSTRACE, "VFS Op: at %llu jiffies\n", get_jiffies_64());
ll_stats_ops_tally(ll_s2sbi(sb), LPROC_LL_STAFS, 1);
/* Some amount of caching on the client is allowed */
@@ -1697,9 +1699,9 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md)
}
if (body->valid & OBD_MD_FLMTIME) {
if (body->mtime > LTIME_S(inode->i_mtime)) {
- CDEBUG(D_INODE, "setting ino %lu mtime from %lu "
- "to "LPU64"\n", inode->i_ino,
- LTIME_S(inode->i_mtime), body->mtime);
+ CDEBUG(D_INODE, "setting ino %lu mtime from %lu to %llu\n",
+ inode->i_ino, LTIME_S(inode->i_mtime),
+ body->mtime);
LTIME_S(inode->i_mtime) = body->mtime;
}
lli->lli_lvb.lvb_mtime = body->mtime;
@@ -1997,7 +1999,7 @@ void ll_umount_begin(struct super_block *sb)
obd = class_exp2obd(sbi->ll_md_exp);
if (obd == NULL) {
- CERROR("Invalid MDC connection handle "LPX64"\n",
+ CERROR("Invalid MDC connection handle %#llx\n",
sbi->ll_md_exp->exp_handle.h_cookie);
return;
}
@@ -2005,7 +2007,7 @@ void ll_umount_begin(struct super_block *sb)
obd = class_exp2obd(sbi->ll_dt_exp);
if (obd == NULL) {
- CERROR("Invalid LOV connection handle "LPX64"\n",
+ CERROR("Invalid LOV connection handle %#llx\n",
sbi->ll_dt_exp->exp_handle.h_cookie);
return;
}
@@ -2245,7 +2247,7 @@ struct md_op_data * ll_prep_md_op_data(struct md_op_data *op_data,
op_data->op_name = name;
op_data->op_namelen = namelen;
op_data->op_mode = mode;
- op_data->op_mod_time = cfs_time_current_sec();
+ op_data->op_mod_time = get_seconds();
op_data->op_fsuid = from_kuid(&init_user_ns, current_fsuid());
op_data->op_fsgid = from_kgid(&init_user_ns, current_fsgid());
op_data->op_cap = cfs_curproc_cap_pack();
diff --git a/drivers/staging/lustre/lustre/llite/llite_mmap.c b/drivers/staging/lustre/lustre/llite/llite_mmap.c
index 426c73961665..7dae610f5c86 100644
--- a/drivers/staging/lustre/lustre/llite/llite_mmap.c
+++ b/drivers/staging/lustre/lustre/llite/llite_mmap.c
@@ -47,9 +47,9 @@
#define DEBUG_SUBSYSTEM S_LLITE
-#include <lustre_lite.h>
+#include "../include/lustre_lite.h"
#include "llite_internal.h"
-#include <linux/lustre_compat25.h>
+#include "../include/linux/lustre_compat25.h"
static const struct vm_operations_struct ll_file_vm_ops;
@@ -449,7 +449,7 @@ int ll_teardown_mmaps(struct address_space *mapping, __u64 first, __u64 last)
{
int rc = -ENOENT;
- LASSERTF(last > first, "last "LPU64" first "LPU64"\n", last, first);
+ LASSERTF(last > first, "last %llu first %llu\n", last, first);
if (mapping_mapped(mapping)) {
rc = 0;
unmap_mapping_range(mapping, first + PAGE_CACHE_SIZE - 1,
diff --git a/drivers/staging/lustre/lustre/llite/llite_nfs.c b/drivers/staging/lustre/lustre/llite/llite_nfs.c
index a614b913ddc2..8fdd6e093d1a 100644
--- a/drivers/staging/lustre/lustre/llite/llite_nfs.c
+++ b/drivers/staging/lustre/lustre/llite/llite_nfs.c
@@ -42,7 +42,7 @@
*/
#define DEBUG_SUBSYSTEM S_LLITE
-#include <lustre_lite.h>
+#include "../include/lustre_lite.h"
#include "llite_internal.h"
#include <linux/exportfs.h>
diff --git a/drivers/staging/lustre/lustre/llite/llite_rmtacl.c b/drivers/staging/lustre/lustre/llite/llite_rmtacl.c
index 4c610369cb9b..be0c3eff108c 100644
--- a/drivers/staging/lustre/lustre/llite/llite_rmtacl.c
+++ b/drivers/staging/lustre/lustre/llite/llite_rmtacl.c
@@ -44,8 +44,8 @@
#ifdef CONFIG_FS_POSIX_ACL
-#include <lustre_lite.h>
-#include <lustre_eacl.h>
+#include "../include/lustre_lite.h"
+#include "../include/lustre_eacl.h"
#include "llite_internal.h"
static inline __u32 rce_hashfunc(uid_t id)
diff --git a/drivers/staging/lustre/lustre/llite/lloop.c b/drivers/staging/lustre/lustre/llite/lloop.c
index 0ff8c3362a8d..808663898b73 100644
--- a/drivers/staging/lustre/lustre/llite/lloop.c
+++ b/drivers/staging/lustre/lustre/llite/lloop.c
@@ -103,8 +103,8 @@
#include <asm/uaccess.h>
-#include <lustre_lib.h>
-#include <lustre_lite.h>
+#include "../include/lustre_lib.h"
+#include "../include/lustre_lite.h"
#include "llite_internal.h"
#define LLOOP_MAX_SEGMENTS LNET_MAX_IOV
diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c
index 77ee9e58cf87..77f68b507fea 100644
--- a/drivers/staging/lustre/lustre/llite/lproc_llite.c
+++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c
@@ -35,10 +35,10 @@
*/
#define DEBUG_SUBSYSTEM S_LLITE
-#include <lustre_lite.h>
-#include <lprocfs_status.h>
+#include "../include/lustre_lite.h"
+#include "../include/lprocfs_status.h"
#include <linux/seq_file.h>
-#include <obd_support.h>
+#include "../include/obd_support.h"
#include "llite_internal.h"
#include "vvp_internal.h"
@@ -82,7 +82,7 @@ static int ll_kbytestotal_seq_show(struct seq_file *m, void *v)
while (blk_size >>= 1)
result <<= 1;
- rc = seq_printf(m, LPU64"\n", result);
+ rc = seq_printf(m, "%llu\n", result);
}
return rc;
}
@@ -105,7 +105,7 @@ static int ll_kbytesfree_seq_show(struct seq_file *m, void *v)
while (blk_size >>= 1)
result <<= 1;
- rc = seq_printf(m, LPU64"\n", result);
+ rc = seq_printf(m, "%llu\n", result);
}
return rc;
}
@@ -128,7 +128,7 @@ static int ll_kbytesavail_seq_show(struct seq_file *m, void *v)
while (blk_size >>= 1)
result <<= 1;
- rc = seq_printf(m, LPU64"\n", result);
+ rc = seq_printf(m, "%llu\n", result);
}
return rc;
}
@@ -145,7 +145,7 @@ static int ll_filestotal_seq_show(struct seq_file *m, void *v)
cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS),
OBD_STATFS_NODELAY);
if (!rc)
- rc = seq_printf(m, LPU64"\n", osfs.os_files);
+ rc = seq_printf(m, "%llu\n", osfs.os_files);
return rc;
}
LPROC_SEQ_FOPS_RO(ll_filestotal);
@@ -161,7 +161,7 @@ static int ll_filesfree_seq_show(struct seq_file *m, void *v)
cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS),
OBD_STATFS_NODELAY);
if (!rc)
- rc = seq_printf(m, LPU64"\n", osfs.os_ffree);
+ rc = seq_printf(m, "%llu\n", osfs.os_ffree);
return rc;
}
LPROC_SEQ_FOPS_RO(ll_filesfree);
@@ -811,38 +811,39 @@ static ssize_t ll_xattr_cache_seq_write(struct file *file, const char *buffer,
LPROC_SEQ_FOPS(ll_xattr_cache);
static struct lprocfs_vars lprocfs_llite_obd_vars[] = {
- { "uuid", &ll_sb_uuid_fops, 0, 0 },
+ { "uuid", &ll_sb_uuid_fops, NULL, 0 },
//{ "mntpt_path", ll_rd_path, 0, 0 },
- { "fstype", &ll_fstype_fops, 0, 0 },
- { "site", &ll_site_stats_fops, 0, 0 },
- { "blocksize", &ll_blksize_fops, 0, 0 },
- { "kbytestotal", &ll_kbytestotal_fops, 0, 0 },
- { "kbytesfree", &ll_kbytesfree_fops, 0, 0 },
- { "kbytesavail", &ll_kbytesavail_fops, 0, 0 },
- { "filestotal", &ll_filestotal_fops, 0, 0 },
- { "filesfree", &ll_filesfree_fops, 0, 0 },
- { "client_type", &ll_client_type_fops, 0, 0 },
+ { "fstype", &ll_fstype_fops, NULL, 0 },
+ { "site", &ll_site_stats_fops, NULL, 0 },
+ { "blocksize", &ll_blksize_fops, NULL, 0 },
+ { "kbytestotal", &ll_kbytestotal_fops, NULL, 0 },
+ { "kbytesfree", &ll_kbytesfree_fops, NULL, 0 },
+ { "kbytesavail", &ll_kbytesavail_fops, NULL, 0 },
+ { "filestotal", &ll_filestotal_fops, NULL, 0 },
+ { "filesfree", &ll_filesfree_fops, NULL, 0 },
+ { "client_type", &ll_client_type_fops, NULL, 0 },
//{ "filegroups", lprocfs_rd_filegroups, 0, 0 },
- { "max_read_ahead_mb", &ll_max_readahead_mb_fops, 0 },
- { "max_read_ahead_per_file_mb", &ll_max_readahead_per_file_mb_fops, 0 },
- { "max_read_ahead_whole_mb", &ll_max_read_ahead_whole_mb_fops, 0 },
- { "max_cached_mb", &ll_max_cached_mb_fops, 0 },
- { "checksum_pages", &ll_checksum_fops, 0 },
- { "max_rw_chunk", &ll_max_rw_chunk_fops, 0 },
- { "stats_track_pid", &ll_track_pid_fops, 0 },
- { "stats_track_ppid", &ll_track_ppid_fops, 0 },
- { "stats_track_gid", &ll_track_gid_fops, 0 },
- { "statahead_max", &ll_statahead_max_fops, 0 },
- { "statahead_agl", &ll_statahead_agl_fops, 0 },
- { "statahead_stats", &ll_statahead_stats_fops, 0, 0 },
- { "lazystatfs", &ll_lazystatfs_fops, 0 },
- { "max_easize", &ll_max_easize_fops, 0, 0 },
- { "default_easize", &ll_defult_easize_fops, 0, 0 },
- { "max_cookiesize", &ll_max_cookiesize_fops, 0, 0 },
- { "default_cookiesize", &ll_defult_cookiesize_fops, 0, 0 },
- { "sbi_flags", &ll_sbi_flags_fops, 0, 0 },
- { "xattr_cache", &ll_xattr_cache_fops, 0, 0 },
- { 0 }
+ { "max_read_ahead_mb", &ll_max_readahead_mb_fops, NULL },
+ { "max_read_ahead_per_file_mb", &ll_max_readahead_per_file_mb_fops,
+ NULL },
+ { "max_read_ahead_whole_mb", &ll_max_read_ahead_whole_mb_fops, NULL },
+ { "max_cached_mb", &ll_max_cached_mb_fops, NULL },
+ { "checksum_pages", &ll_checksum_fops, NULL },
+ { "max_rw_chunk", &ll_max_rw_chunk_fops, NULL },
+ { "stats_track_pid", &ll_track_pid_fops, NULL },
+ { "stats_track_ppid", &ll_track_ppid_fops, NULL },
+ { "stats_track_gid", &ll_track_gid_fops, NULL },
+ { "statahead_max", &ll_statahead_max_fops, NULL },
+ { "statahead_agl", &ll_statahead_agl_fops, NULL },
+ { "statahead_stats", &ll_statahead_stats_fops, NULL, 0 },
+ { "lazystatfs", &ll_lazystatfs_fops, NULL },
+ { "max_easize", &ll_max_easize_fops, NULL, 0 },
+ { "default_easize", &ll_defult_easize_fops, NULL, 0 },
+ { "max_cookiesize", &ll_max_cookiesize_fops, NULL, 0 },
+ { "default_cookiesize", &ll_defult_cookiesize_fops, NULL, 0 },
+ { "sbi_flags", &ll_sbi_flags_fops, NULL, 0 },
+ { "xattr_cache", &ll_xattr_cache_fops, NULL, 0 },
+ { NULL }
};
#define MAX_STRING_SIZE 128
@@ -909,7 +910,7 @@ void ll_stats_ops_tally(struct ll_sb_info *sbi, int op, int count)
sbi->ll_stats_track_id == current->pid)
lprocfs_counter_add(sbi->ll_stats, op, count);
else if (sbi->ll_stats_track_type == STATS_TRACK_PPID &&
- sbi->ll_stats_track_id == current->parent->pid)
+ sbi->ll_stats_track_id == current->real_parent->pid)
lprocfs_counter_add(sbi->ll_stats, op, count);
else if (sbi->ll_stats_track_type == STATS_TRACK_GID &&
sbi->ll_stats_track_id ==
diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c
index dfa1e745dfd6..0dc7173bbd41 100644
--- a/drivers/staging/lustre/lustre/llite/namei.c
+++ b/drivers/staging/lustre/lustre/llite/namei.c
@@ -44,11 +44,11 @@
#define DEBUG_SUBSYSTEM S_LLITE
-#include <obd_support.h>
-#include <lustre_fid.h>
-#include <lustre_lite.h>
-#include <lustre_dlm.h>
-#include <lustre_ver.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 "llite_internal.h"
static int ll_create_it(struct inode *, struct dentry *,
@@ -105,7 +105,7 @@ static int ll_set_inode(struct inode *inode, void *opaque)
lli->lli_fid = body->fid1;
if (unlikely(!(body->valid & OBD_MD_FLTYPE))) {
CERROR("Can not initialize inode "DFID" without object type: "
- "valid = "LPX64"\n", PFID(&lli->lli_fid), body->valid);
+ "valid = %#llx\n", PFID(&lli->lli_fid), body->valid);
return -EINVAL;
}
@@ -758,7 +758,7 @@ static void ll_update_times(struct ptlrpc_request *request,
LASSERT(body);
if (body->valid & OBD_MD_FLMTIME &&
body->mtime > LTIME_S(inode->i_mtime)) {
- CDEBUG(D_INODE, "setting ino %lu mtime from %lu to "LPU64"\n",
+ CDEBUG(D_INODE, "setting ino %lu mtime from %lu to %llu\n",
inode->i_ino, LTIME_S(inode->i_mtime), body->mtime);
LTIME_S(inode->i_mtime) = body->mtime;
}
diff --git a/drivers/staging/lustre/lustre/llite/remote_perm.c b/drivers/staging/lustre/lustre/llite/remote_perm.c
index a8b1117b8f60..f61fefc9baf0 100644
--- a/drivers/staging/lustre/lustre/llite/remote_perm.c
+++ b/drivers/staging/lustre/lustre/llite/remote_perm.c
@@ -46,12 +46,12 @@
#include <linux/module.h>
#include <linux/types.h>
-#include <lustre_lite.h>
-#include <lustre_ha.h>
-#include <lustre_dlm.h>
-#include <lprocfs_status.h>
-#include <lustre_disk.h>
-#include <lustre_param.h>
+#include "../include/lustre_lite.h"
+#include "../include/lustre_ha.h"
+#include "../include/lustre_dlm.h"
+#include "../include/lprocfs_status.h"
+#include "../include/lustre_disk.h"
+#include "../include/lustre_param.h"
#include "llite_internal.h"
struct kmem_cache *ll_remote_perm_cachep = NULL;
@@ -249,7 +249,7 @@ int lustre_check_remote_perm(struct inode *inode, int mask)
struct ptlrpc_request *req = NULL;
struct mdt_remote_perm *perm;
struct obd_capa *oc;
- cfs_time_t save;
+ unsigned long save;
int i = 0, rc;
do {
diff --git a/drivers/staging/lustre/lustre/llite/rw.c b/drivers/staging/lustre/lustre/llite/rw.c
index 56162103cc79..ecd7a229cf9b 100644
--- a/drivers/staging/lustre/lustre/llite/rw.c
+++ b/drivers/staging/lustre/lustre/llite/rw.c
@@ -54,10 +54,10 @@
#define DEBUG_SUBSYSTEM S_LLITE
-#include <lustre_lite.h>
-#include <obd_cksum.h>
+#include "../include/lustre_lite.h"
+#include "../include/obd_cksum.h"
#include "llite_internal.h"
-#include <linux/lustre_compat25.h>
+#include "../include/linux/lustre_compat25.h"
/**
* Finalizes cl-data before exiting typical address_space operation. Dual to
@@ -496,14 +496,9 @@ static int ll_read_ahead_page(const struct lu_env *env, struct cl_io *io,
struct cl_object *clob = ll_i2info(mapping->host)->lli_clob;
struct cl_page *page;
enum ra_stat which = _NR_RA_STAT; /* keep gcc happy */
- unsigned int gfp_mask;
int rc = 0;
const char *msg = NULL;
- gfp_mask = GFP_HIGHUSER & ~__GFP_WAIT;
-#ifdef __GFP_NOWARN
- gfp_mask |= __GFP_NOWARN;
-#endif
vmpage = grab_cache_page_nowait(mapping, index);
if (vmpage != NULL) {
/* Check if vmpage was truncated or reclaimed */
@@ -601,7 +596,7 @@ stride_pg_count(pgoff_t st_off, unsigned long st_len, unsigned long st_pgs,
if (end_left > st_pgs)
end_left = st_pgs;
- CDEBUG(D_READA, "start "LPU64", end "LPU64" start_left %lu end_left %lu \n",
+ CDEBUG(D_READA, "start %llu, end %llu start_left %lu end_left %lu \n",
start, end, start_left, end_left);
if (start == end)
@@ -1013,7 +1008,7 @@ void ras_update(struct ll_sb_info *sbi, struct inode *inode,
kms_pages = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >>
PAGE_CACHE_SHIFT;
- CDEBUG(D_READA, "kmsp "LPU64" mwp %lu mp %lu\n", kms_pages,
+ CDEBUG(D_READA, "kmsp %llu mwp %lu mp %lu\n", kms_pages,
ra->ra_max_read_ahead_whole_pages, ra->ra_max_pages_per_file);
if (kms_pages &&
diff --git a/drivers/staging/lustre/lustre/llite/rw26.c b/drivers/staging/lustre/lustre/llite/rw26.c
index af84c1aaa5f8..3f157e76a15c 100644
--- a/drivers/staging/lustre/lustre/llite/rw26.c
+++ b/drivers/staging/lustre/lustre/llite/rw26.c
@@ -55,9 +55,9 @@
#define DEBUG_SUBSYSTEM S_LLITE
-#include <lustre_lite.h>
+#include "../include/lustre_lite.h"
#include "llite_internal.h"
-#include <linux/lustre_compat25.h>
+#include "../include/linux/lustre_compat25.h"
/**
* Implements Linux VM address_space::invalidatepage() method. This method is
diff --git a/drivers/staging/lustre/lustre/llite/statahead.c b/drivers/staging/lustre/lustre/llite/statahead.c
index 1b47774d7447..c39cf8d47d6e 100644
--- a/drivers/staging/lustre/lustre/llite/statahead.c
+++ b/drivers/staging/lustre/lustre/llite/statahead.c
@@ -42,9 +42,9 @@
#define DEBUG_SUBSYSTEM S_LLITE
-#include <obd_support.h>
-#include <lustre_lite.h>
-#include <lustre_dlm.h>
+#include "../include/obd_support.h"
+#include "../include/lustre_lite.h"
+#include "../include/lustre_dlm.h"
#include "llite_internal.h"
#define SA_OMITTED_ENTRY_MAX 8ULL
@@ -206,7 +206,7 @@ ll_sa_entry_alloc(struct ll_statahead_info *sai, __u64 index,
if (unlikely(entry == NULL))
return ERR_PTR(-ENOMEM);
- CDEBUG(D_READA, "alloc sa entry %.*s(%p) index "LPU64"\n",
+ CDEBUG(D_READA, "alloc sa entry %.*s(%p) index %llu\n",
len, name, entry, index);
entry->se_index = index;
@@ -325,7 +325,7 @@ static void ll_sa_entry_put(struct ll_statahead_info *sai,
struct ll_sa_entry *entry)
{
if (atomic_dec_and_test(&entry->se_refcount)) {
- CDEBUG(D_READA, "free sa entry %.*s(%p) index "LPU64"\n",
+ CDEBUG(D_READA, "free sa entry %.*s(%p) index %llu\n",
entry->se_qstr.len, entry->se_qstr.name, entry,
entry->se_index);
@@ -528,8 +528,8 @@ static void ll_sai_put(struct ll_statahead_info *sai)
spin_unlock(&lli->lli_sa_lock);
if (sai->sai_sent > sai->sai_replied)
- CDEBUG(D_READA,"statahead for dir "DFID" does not "
- "finish: [sent:"LPU64"] [replied:"LPU64"]\n",
+ CDEBUG(D_READA,"statahead for dir "DFID
+ " does not finish: [sent:%llu] [replied:%llu]\n",
PFID(&lli->lli_fid),
sai->sai_sent, sai->sai_replied);
@@ -587,7 +587,7 @@ static void ll_agl_trigger(struct inode *inode, struct ll_statahead_info *sai)
* affect the performance.
*/
if (lli->lli_glimpse_time != 0 &&
- cfs_time_before(cfs_time_shift(-1), lli->lli_glimpse_time)) {
+ time_before(cfs_time_shift(-1), lli->lli_glimpse_time)) {
up_write(&lli->lli_glimpse_sem);
lli->lli_agl_index = 0;
iput(inode);
@@ -595,7 +595,7 @@ static void ll_agl_trigger(struct inode *inode, struct ll_statahead_info *sai)
}
CDEBUG(D_READA, "Handling (init) async glimpse: inode = "
- DFID", idx = "LPU64"\n", PFID(&lli->lli_fid), index);
+ DFID", idx = %llu\n", PFID(&lli->lli_fid), index);
cl_agl(inode);
lli->lli_agl_index = 0;
@@ -603,7 +603,7 @@ static void ll_agl_trigger(struct inode *inode, struct ll_statahead_info *sai)
up_write(&lli->lli_glimpse_sem);
CDEBUG(D_READA, "Handled (init) async glimpse: inode= "
- DFID", idx = "LPU64", rc = %d\n",
+ DFID", idx = %llu, rc = %d\n",
PFID(&lli->lli_fid), index, rc);
iput(inode);
@@ -1081,8 +1081,7 @@ static int ll_statahead_thread(void *arg)
if (IS_ERR(page)) {
rc = PTR_ERR(page);
- CDEBUG(D_READA, "error reading dir "DFID" at "LPU64
- "/"LPU64": [rc %d] [parent %u]\n",
+ CDEBUG(D_READA, "error reading dir "DFID" at %llu/%llu: [rc %d] [parent %u]\n",
PFID(ll_inode2fid(dir)), pos, sai->sai_index,
rc, plli->lli_opendir_pid);
GOTO(out, rc);
@@ -1362,8 +1361,7 @@ static int is_first_dirent(struct inode *dir, struct dentry *dentry)
struct ll_inode_info *lli = ll_i2info(dir);
rc = PTR_ERR(page);
- CERROR("error reading dir "DFID" at "LPU64": "
- "[rc %d] [parent %u]\n",
+ CERROR("error reading dir "DFID" at %llu: [rc %d] [parent %u]\n",
PFID(ll_inode2fid(dir)), pos,
rc, lli->lli_opendir_pid);
break;
@@ -1479,8 +1477,8 @@ ll_sai_unplug(struct ll_statahead_info *sai, struct ll_sa_entry *entry)
if (sa_low_hit(sai) && thread_is_running(thread)) {
atomic_inc(&sbi->ll_sa_wrong);
CDEBUG(D_READA, "Statahead for dir "DFID" hit "
- "ratio too low: hit/miss "LPU64"/"LPU64
- ", sent/replied "LPU64"/"LPU64", stopping "
+ "ratio too low: hit/miss %llu/%llu"
+ ", sent/replied %llu/%llu, stopping "
"statahead thread\n",
PFID(&lli->lli_fid), sai->sai_hit,
sai->sai_miss, sai->sai_sent,
diff --git a/drivers/staging/lustre/lustre/llite/super25.c b/drivers/staging/lustre/lustre/llite/super25.c
index 951fdb1265b9..078c0e95f4cf 100644
--- a/drivers/staging/lustre/lustre/llite/super25.c
+++ b/drivers/staging/lustre/lustre/llite/super25.c
@@ -38,12 +38,12 @@
#include <linux/module.h>
#include <linux/types.h>
-#include <lustre_lite.h>
-#include <lustre_ha.h>
-#include <lustre_dlm.h>
+#include "../include/lustre_lite.h"
+#include "../include/lustre_ha.h"
+#include "../include/lustre_dlm.h"
#include <linux/init.h>
#include <linux/fs.h>
-#include <lprocfs_status.h>
+#include "../include/lprocfs_status.h"
#include "llite_internal.h"
static struct kmem_cache *ll_inode_cachep;
diff --git a/drivers/staging/lustre/lustre/llite/symlink.c b/drivers/staging/lustre/lustre/llite/symlink.c
index 129d3023dcea..20e678b31c7b 100644
--- a/drivers/staging/lustre/lustre/llite/symlink.c
+++ b/drivers/staging/lustre/lustre/llite/symlink.c
@@ -39,7 +39,7 @@
#include <linux/stat.h>
#define DEBUG_SUBSYSTEM S_LLITE
-#include <lustre_lite.h>
+#include "../include/lustre_lite.h"
#include "llite_internal.h"
static int ll_readlink_internal(struct inode *inode,
diff --git a/drivers/staging/lustre/lustre/llite/vvp_dev.c b/drivers/staging/lustre/lustre/llite/vvp_dev.c
index 0f68c16abe30..0f2e79d6b7f8 100644
--- a/drivers/staging/lustre/lustre/llite/vvp_dev.c
+++ b/drivers/staging/lustre/lustre/llite/vvp_dev.c
@@ -41,8 +41,8 @@
#define DEBUG_SUBSYSTEM S_LLITE
-#include <obd.h>
-#include <lustre_lite.h>
+#include "../include/obd.h"
+#include "../include/lustre_lite.h"
#include "llite_internal.h"
#include "vvp_internal.h"
diff --git a/drivers/staging/lustre/lustre/llite/vvp_internal.h b/drivers/staging/lustre/lustre/llite/vvp_internal.h
index 3c9a03d99559..2162bf6c08a7 100644
--- a/drivers/staging/lustre/lustre/llite/vvp_internal.h
+++ b/drivers/staging/lustre/lustre/llite/vvp_internal.h
@@ -40,7 +40,7 @@
#define VVP_INTERNAL_H
-#include <cl_object.h>
+#include "../include/cl_object.h"
#include "llite_internal.h"
int vvp_io_init (const struct lu_env *env,
diff --git a/drivers/staging/lustre/lustre/llite/vvp_io.c b/drivers/staging/lustre/lustre/llite/vvp_io.c
index 0e0b404cb5e6..a4117d6a3866 100644
--- a/drivers/staging/lustre/lustre/llite/vvp_io.c
+++ b/drivers/staging/lustre/lustre/llite/vvp_io.c
@@ -42,8 +42,8 @@
#define DEBUG_SUBSYSTEM S_LLITE
-#include <obd.h>
-#include <lustre_lite.h>
+#include "../include/obd.h"
+#include "../include/lustre_lite.h"
#include "vvp_internal.h"
@@ -269,8 +269,10 @@ static int vvp_mmap_locks(const struct lu_env *env,
descr->cld_mode, descr->cld_start,
descr->cld_end);
- if (result < 0)
+ if (result < 0) {
+ up_read(&mm->mmap_sem);
return result;
+ }
if (vma->vm_end - addr >= count)
break;
@@ -622,7 +624,7 @@ static int vvp_io_kernel_fault(struct vvp_fault_io *cfio)
page_private(vmf->page), vmf->virtual_address);
if (unlikely(!(cfio->fault.ft_flags & VM_FAULT_LOCKED))) {
lock_page(vmf->page);
- cfio->fault.ft_flags &= VM_FAULT_LOCKED;
+ cfio->fault.ft_flags |= VM_FAULT_LOCKED;
}
cfio->ft_vmpage = vmf->page;
diff --git a/drivers/staging/lustre/lustre/llite/vvp_lock.c b/drivers/staging/lustre/lustre/llite/vvp_lock.c
index e16b31e4ff72..372633e164b9 100644
--- a/drivers/staging/lustre/lustre/llite/vvp_lock.c
+++ b/drivers/staging/lustre/lustre/llite/vvp_lock.c
@@ -39,8 +39,8 @@
#define DEBUG_SUBSYSTEM S_LLITE
-#include <obd.h>
-#include <lustre_lite.h>
+#include "../include/obd.h"
+#include "../include/lustre_lite.h"
#include "vvp_internal.h"
diff --git a/drivers/staging/lustre/lustre/llite/vvp_object.c b/drivers/staging/lustre/lustre/llite/vvp_object.c
index 65b6db1b71b4..b6f6d4cb6e41 100644
--- a/drivers/staging/lustre/lustre/llite/vvp_object.c
+++ b/drivers/staging/lustre/lustre/llite/vvp_object.c
@@ -41,10 +41,10 @@
#define DEBUG_SUBSYSTEM S_LLITE
-#include <linux/libcfs/libcfs.h>
+#include "../../include/linux/libcfs/libcfs.h"
-#include <obd.h>
-#include <lustre_lite.h>
+#include "../include/obd.h"
+#include "../include/lustre_lite.h"
#include "vvp_internal.h"
diff --git a/drivers/staging/lustre/lustre/llite/vvp_page.c b/drivers/staging/lustre/lustre/llite/vvp_page.c
index 1c02c128e0ee..4626346f6ee1 100644
--- a/drivers/staging/lustre/lustre/llite/vvp_page.c
+++ b/drivers/staging/lustre/lustre/llite/vvp_page.c
@@ -42,8 +42,8 @@
#define DEBUG_SUBSYSTEM S_LLITE
-#include <obd.h>
-#include <lustre_lite.h>
+#include "../include/obd.h"
+#include "../include/lustre_lite.h"
#include "vvp_internal.h"
diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c
index c6c27bbb43b4..665ca572027f 100644
--- a/drivers/staging/lustre/lustre/llite/xattr.c
+++ b/drivers/staging/lustre/lustre/llite/xattr.c
@@ -41,11 +41,11 @@
#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>
+#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"
#include "llite_internal.h"
@@ -246,6 +246,7 @@ int ll_setxattr(struct dentry *dentry, const char *name,
int lum_size = (lump->lmm_magic == LOV_USER_MAGIC_V1) ?
sizeof(*lump) : sizeof(struct lov_user_md_v3);
+ memset(&f, 0, sizeof(f)); /* f.f_flags is used below */
f.f_dentry = dentry;
rc = ll_lov_setstripe_ea_info(inode, &f, flags, lump,
lum_size);
diff --git a/drivers/staging/lustre/lustre/llite/xattr_cache.c b/drivers/staging/lustre/lustre/llite/xattr_cache.c
index 4dd83fc03687..edec945d2eb3 100644
--- a/drivers/staging/lustre/lustre/llite/xattr_cache.c
+++ b/drivers/staging/lustre/lustre/llite/xattr_cache.c
@@ -10,10 +10,10 @@
#include <linux/fs.h>
#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 "../include/obd_support.h"
+#include "../include/lustre_lite.h"
+#include "../include/lustre_dlm.h"
+#include "../include/lustre_ver.h"
#include "llite_internal.h"
/* If we ever have hundreds of extended attributes, we might want to consider