Whamcloud - gitweb
LU-15216 lmv: improve MDT QOS space balance
[fs/lustre-release.git] / lustre / llite / llite_internal.h
index 0d914b4..d066f98 100644 (file)
@@ -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);
 }
 
@@ -674,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,
@@ -701,15 +704,15 @@ struct ll_sb_info {
        struct cl_device         *ll_cl;
 
        /* Statistics */
-       struct ll_rw_extents_info ll_rw_extents_info;
+       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;
-       struct ll_rw_process_info ll_rw_process_info[LL_PROCESS_HIST_MAX];
-       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;
+       enum stats_track_type     ll_stats_track_type;
        int                       ll_rw_stats_on;
 
        /* metadata stat-ahead */
@@ -982,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,
@@ -1122,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);
@@ -1187,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);
@@ -1715,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