X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fllite%2Fllite_internal.h;h=d066f98ff25b0a1484a575acd51cdcc55f479ca1;hb=38c4c538f53fb5f0c7f6db6d4970c491184e81a0;hp=a1fd8938359985a197f714a03c9dae06fe23fe39;hpb=14b37c763c5751faf18d00287c16bdcbe0f8d542;p=fs%2Flustre-release.git diff --git a/lustre/llite/llite_internal.h b/lustre/llite/llite_internal.h index a1fd893..d066f98 100644 --- a/lustre/llite/llite_internal.h +++ b/lustre/llite/llite_internal.h @@ -170,7 +170,7 @@ struct ll_inode_info { * -- I am the owner of dir statahead. */ pid_t lli_opendir_pid; /* directory depth to ROOT */ - unsigned short lli_depth; + unsigned short lli_dir_depth; /* stat will try to access statahead entries or start * statahead if this flag is set, and this flag will be * set upon dir open, and cleared when dir is closed, @@ -351,6 +351,8 @@ static inline void trunc_sem_down_write(struct ll_trunc_sem *sem) static inline void trunc_sem_up_write(struct ll_trunc_sem *sem) { atomic_set(&sem->ll_trunc_readers, 0); + /* match the smp_mb() in wait_var_event()->prepare_to_wait() */ + smp_mb(); wake_up_var(&sem->ll_trunc_readers); } @@ -581,14 +583,15 @@ struct ra_io_arg { #define LL_HIST_START 12 /* buckets start at 2^12 = 4k */ #define LL_PROCESS_HIST_MAX 10 struct per_process_info { - pid_t pid; - struct obd_histogram pp_r_hist; - struct obd_histogram pp_w_hist; + pid_t pid; + struct obd_histogram pp_r_hist; + struct obd_histogram pp_w_hist; }; /* pp_extents[LL_PROCESS_HIST_MAX] will hold the combined process info */ struct ll_rw_extents_info { - struct per_process_info pp_extents[LL_PROCESS_HIST_MAX + 1]; + ktime_t pp_init; + struct per_process_info pp_extents[LL_PROCESS_HIST_MAX + 1]; }; #define LL_OFFSET_HIST_MAX 100 @@ -673,6 +676,7 @@ struct ll_sb_info { struct obd_device *ll_dt_obd; struct dentry *ll_debugfs_entry; struct lu_fid ll_root_fid; /* root object fid */ + struct mnt_namespace *ll_mnt_ns; DECLARE_BITMAP(ll_flags, LL_SBI_NUM_FLAGS); /* enum ll_sbi_flags */ unsigned int ll_xattr_cache_enabled:1, @@ -698,16 +702,18 @@ struct ll_sb_info { struct lu_site *ll_site; struct cl_device *ll_cl; + /* Statistics */ - struct ll_rw_extents_info ll_rw_extents_info; - int ll_extent_process_count; - struct ll_rw_process_info ll_rw_process_info[LL_PROCESS_HIST_MAX]; - unsigned int ll_offset_process_count; - struct ll_rw_process_info ll_rw_offset_info[LL_OFFSET_HIST_MAX]; - unsigned int ll_rw_offset_entry_count; - int ll_stats_track_id; - enum stats_track_type ll_stats_track_type; - int ll_rw_stats_on; + struct ll_rw_extents_info *ll_rw_extents_info; + int ll_extent_process_count; + unsigned int ll_offset_process_count; + struct ll_rw_process_info *ll_rw_process_info; + struct ll_rw_process_info *ll_rw_offset_info; + ktime_t ll_process_stats_init; + unsigned int ll_rw_offset_entry_count; + int ll_stats_track_id; + enum stats_track_type ll_stats_track_type; + int ll_rw_stats_on; /* metadata stat-ahead */ unsigned int ll_sa_running_max;/* max concurrent @@ -979,6 +985,7 @@ void cl_put_grouplock(struct ll_grouplock *lg); int ll_debugfs_register_super(struct super_block *sb, const char *name); void ll_debugfs_unregister_super(struct super_block *sb); void ll_stats_ops_tally(struct ll_sb_info *sbi, int op, long count); +void ll_free_rw_stats_info(struct ll_sb_info *sbi); enum { LPROC_LL_READ_BYTES, @@ -1119,7 +1126,7 @@ static inline int ll_inode_flags_to_xflags(int inode_flags) } int ll_migrate(struct inode *parent, struct file *file, - struct lmv_user_md *lum, const char *name); + struct lmv_user_md *lum, const char *name, __u32 flags); int ll_get_fid_by_name(struct inode *parent, const char *name, int namelen, struct lu_fid *fid, struct inode **inode); int ll_inode_permission(struct inode *inode, int mask); @@ -1184,6 +1191,8 @@ void ll_kill_super(struct super_block *sb); struct inode *ll_inode_from_resource_lock(struct ldlm_lock *lock); void ll_dir_clear_lsm_md(struct inode *inode); void ll_clear_inode(struct inode *inode); +int volatile_ref_file(const char *volatile_name, int volatile_len, + struct file **ref_file); int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, enum op_xvalid xvalid, bool hsm_import); int ll_setattr(struct dentry *de, struct iattr *attr); @@ -1712,6 +1721,7 @@ int ll_fname_disk_to_usr(struct inode *inode, struct llcrypt_str *iname, struct llcrypt_str *oname, struct lu_fid *fid); int ll_revalidate_d_crypto(struct dentry *dentry, unsigned int flags); +int ll_file_open_encrypt(struct inode *inode, struct file *filp); #ifdef HAVE_LUSTRE_CRYPTO extern const struct llcrypt_operations lustre_cryptops; #endif