union {
/* for directory */
struct {
- /* serialize normal readdir and statahead-readdir. */
- struct mutex lli_readdir_mutex;
-
/* metadata statahead */
/* since parent-child threads can share the same @file
* struct, "opendir_key" is the token when dir close for
struct mutex lli_pcc_lock;
enum lu_pcc_state_flags lli_pcc_state;
struct pcc_inode *lli_pcc_inode;
+ struct mutex lli_group_mutex;
+ __u64 lli_group_users;
+ unsigned long lli_group_gid;
};
};
struct lu_fid ll_root_fid; /* root object fid */
int ll_flags;
- unsigned int ll_umounting:1,
- ll_xattr_cache_enabled:1,
+ unsigned int ll_xattr_cache_enabled:1,
ll_xattr_cache_set:1, /* already set to 0/1 */
ll_client_common_fill_super_succeeded:1,
ll_checksum_set:1;
/* st_blksize returned by stat(2), when non-zero */
unsigned int ll_stat_blksize;
+ /* maximum relative age of cached statfs results */
+ unsigned int ll_statfs_max_age;
+
struct kset ll_kset; /* sysfs object */
struct completion ll_kobj_unregister;
void ll_stats_ops_tally(struct ll_sb_info *sbi, int op, int count);
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_IOCTL,
LPROC_LL_OPEN,
LPROC_LL_RELEASE,
LPROC_LL_RMDIR,
LPROC_LL_MKNOD,
LPROC_LL_RENAME,
- LPROC_LL_STAFS,
+ LPROC_LL_STATFS,
LPROC_LL_ALLOC_INODE,
LPROC_LL_SETXATTR,
LPROC_LL_GETXATTR,
extern 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);
-void ll_io_init(struct cl_io *io, struct file *file, enum cl_io_type iot);
#ifdef HAVE_INODEOPS_ENHANCED_GETATTR
int ll_getattr(const struct path *path, struct kstat *stat,
u32 request_mask, unsigned int flags);
struct lmv_user_md *lum, const char *name);
int ll_get_fid_by_name(struct inode *parent, const char *name,
int namelen, struct lu_fid *fid, struct inode **inode);
-#ifdef HAVE_GENERIC_PERMISSION_4ARGS
-int ll_inode_permission(struct inode *inode, int mask, unsigned int flags);
-#else
-# ifndef HAVE_INODE_PERMISION_2ARGS
-int ll_inode_permission(struct inode *inode, int mask, struct nameidata *nd);
-# else
int ll_inode_permission(struct inode *inode, int mask);
-# endif
-#endif
int ll_ioctl_check_project(struct inode *inode, struct fsxattr *fa);
int ll_ioctl_fsgetxattr(struct inode *inode, unsigned int cmd,
unsigned long arg);
};
struct ll_thread_info {
- struct iov_iter lti_iter;
struct vvp_io_args lti_args;
struct ra_io_arg lti_ria;
struct ll_cl_context lti_io_ctx;
return via;
}
+void ll_io_init(struct cl_io *io, struct file *file, enum cl_io_type iot,
+ struct vvp_io_args *args);
+
/* llite/llite_mmap.c */
int ll_teardown_mmaps(struct address_space *mapping, __u64 first, __u64 last);
struct vm_area_struct *our_vma(struct mm_struct *mm, unsigned long addr,
size_t count);
-static inline void ll_invalidate_page(struct page *vmpage)
-{
- struct address_space *mapping = vmpage->mapping;
- loff_t offset = vmpage->index << PAGE_SHIFT;
-
- LASSERT(PageLocked(vmpage));
- if (mapping == NULL)
- return;
-
- /*
- * truncate_complete_page() calls
- * a_ops->invalidatepage()->cl_page_delete()->vvp_page_delete().
- */
- ll_teardown_mmaps(mapping, offset, offset + PAGE_SIZE);
- truncate_complete_page(mapping, vmpage);
-}
-
#define ll_s2sbi(sb) (s2lsi(sb)->lsi_llsbi)
/* don't need an addref as the sb_info should be holding one */
*bits = it->it_lock_bits;
}
-static inline void ll_lock_dcache(struct inode *inode)
-{
-#ifdef HAVE_DCACHE_LOCK
- spin_lock(&dcache_lock);
-#else
- spin_lock(&inode->i_lock);
-#endif
-}
-
-static inline void ll_unlock_dcache(struct inode *inode)
-{
-#ifdef HAVE_DCACHE_LOCK
- spin_unlock(&dcache_lock);
-#else
- spin_unlock(&inode->i_lock);
-#endif
-}
-
static inline int d_lustre_invalid(const struct dentry *dentry)
{
struct ll_dentry_data *lld = ll_d2d(dentry);