-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2012, Whamcloud, Inc.
+ * Copyright (c) 2012, 2013, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
/* This should not be "optimized" use ~0ULL because page->index is a long and
* 32-bit systems are therefore limited to 16TB in a mapping */
-#define PAGE_CACHE_MAXBYTES ((__u64)(~0UL) << CFS_PAGE_SHIFT)
+#define MAX_LFS_FILESIZE ((__u64)(~0UL) << PAGE_CACHE_SHIFT)
struct ll_file_data {
struct obd_client_handle fd_mds_och;
__u32 fd_flags;
struct llu_sb_info *lli_sbi;
struct lu_fid lli_fid;
- struct lov_stripe_md *lli_smd;
char *lli_symlink_name;
- cfs_semaphore_t lli_open_sem;
__u64 lli_maxbytes;
unsigned long lli_flags;
__u64 lli_ioepoch;
* was opened several times without close, we track an
* open_count here */
struct ll_file_data *lli_file_data;
+ /* checking lli_has_smd is reliable only inside an IO
+ * i.e, lov stripe has been held. */
+ bool lli_has_smd;
int lli_open_flags;
int lli_open_count;
typedef int (*intent_finish_cb)(struct ptlrpc_request *,
struct inode *parent, struct pnode *pnode,
struct lookup_intent *, int offset, obd_id ino);
-int llu_intent_lock(struct inode *parent, struct pnode *pnode,
- struct lookup_intent *, int flags, intent_finish_cb);
static inline __u64 ll_file_maxbytes(struct inode *inode)
{
struct intent *intnt,
const char *path);
void unhook_stale_inode(struct pnode *pno);
+struct inode *llu_inode_from_resource_lock(struct ldlm_lock *lock);
struct inode *llu_inode_from_lock(struct ldlm_lock *lock);
int llu_md_blocking_ast(struct ldlm_lock *lock,
struct ldlm_lock_desc *desc,
return (struct ext2_dirent*)((char*) p + le16_to_cpu(p->rec_len));
}
-int llu_merge_lvb(struct inode *inode);
+int llu_merge_lvb(const struct lu_env *env, struct inode *inode);
static inline void inode_init_lvb(struct inode *inode, struct ost_lvb *lvb)
{
#define LLU_IO_GROUP_SIZE(x) \
(sizeof(struct llu_io_group) + \
(sizeof(struct ll_async_page) + \
- sizeof(cfs_page_t) + \
+ sizeof(struct page) + \
llap_cookie_size) * (x))
struct llu_io_session {
return llu_i2info(inode)->lli_file_data;
}
-static inline void cl_isize_lock(struct inode *inode, int lsmlock)
+static inline void cl_isize_lock(struct inode *inode)
{
}
-static inline void cl_isize_unlock(struct inode *inode, int lsmlock)
+static inline void cl_isize_unlock(struct inode *inode)
{
}
-static inline int cl_merge_lvb(struct inode *inode)
+static inline int cl_merge_lvb(const struct lu_env *env, struct inode *inode)
{
- return llu_merge_lvb(inode);
+ return llu_merge_lvb(env, inode);
}
#define cl_inode_atime(inode) (llu_i2stat(inode)->st_atime)