#endif
#ifndef DCACHE_LUSTRE_INVALID
-#define DCACHE_LUSTRE_INVALID 0x100
+#define DCACHE_LUSTRE_INVALID 0x4000
#endif
#define LL_IT2STR(it) ((it) ? ldlm_it2str((it)->it_op) : "0")
cfs_semaphore_t lli_size_sem; /* protect open and change size */
void *lli_size_sem_owner;
cfs_semaphore_t lli_write_sem;
- cfs_semaphore_t lli_trunc_sem;
+ cfs_rw_semaphore_t lli_trunc_sem;
char *lli_symlink_name;
__u64 lli_maxbytes;
__u64 lli_ioepoch;
/* for writepage() only to communicate to fsync */
int lli_async_rc;
+ int lli_write_rc;
struct posix_acl *lli_posix_acl;
* before child -- it is me should cleanup the dir readahead. */
void *lli_opendir_key;
struct ll_statahead_info *lli_sai;
+ __u64 lli_sa_pos;
struct cl_object *lli_clob;
/* the most recent timestamps obtained from mds */
struct ost_lvb lli_lvb;
+ /**
+ * serialize normal readdir and statahead-readdir
+ */
+ cfs_semaphore_t lli_readdir_sem;
};
/*
};
struct ll_file_dir {
+ __u64 lfd_pos;
+ __u64 lfd_next;
};
extern cfs_mem_cache_t *ll_file_data_slab;
extern struct file_operations ll_dir_operations;
extern struct inode_operations ll_dir_inode_operations;
-struct page *ll_get_dir_page(struct inode *dir, __u64 hash, int exact,
- struct ll_dir_chain *chain);
+struct page *ll_get_dir_page(struct file *filp, struct inode *dir, __u64 hash,
+ int exact, struct ll_dir_chain *chain);
int ll_get_mdt_idx(struct inode *inode);
/* llite/namei.c */
cfs_list_t sai_entries_sent; /* entries sent out */
cfs_list_t sai_entries_received; /* entries returned */
cfs_list_t sai_entries_stated; /* entries stated */
+ pid_t sai_pid; /* pid of statahead itself */
};
int do_statahead_enter(struct inode *dir, struct dentry **dentry, int lookup);