Whamcloud - gitweb
LU-15216 lmv: improve MDT QOS space balance
[fs/lustre-release.git] / lustre / llite / llite_lib.c
index d5c3c94..3872cd4 100644 (file)
@@ -452,6 +452,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt)
        sb->s_maxbytes = MAX_LFS_FILESIZE;
        sbi->ll_namelen = osfs->os_namelen;
        sbi->ll_mnt.mnt = current->fs->root.mnt;
+       sbi->ll_mnt_ns = current->nsproxy->mnt_ns;
 
        if (test_bit(LL_SBI_USER_XATTR, sbi->ll_flags) &&
            !(data->ocd_connect_flags & OBD_CONNECT_XATTR)) {
@@ -1279,6 +1280,9 @@ int ll_fill_super(struct super_block *sb)
        if (err)
                GOTO(out_free_cfg, err);
 
+       /* disable kernel readahead */
+       sb->s_bdi->ra_pages = 0;
+
        /* Call ll_debugfs_register_super() before lustre_process_log()
         * so that "llite.*.*" params can be processed correctly.
         */
@@ -2691,8 +2695,9 @@ void ll_update_dir_depth(struct inode *dir, struct inode *inode)
                return;
 
        lli = ll_i2info(inode);
-       lli->lli_depth = ll_i2info(dir)->lli_depth + 1;
-       CDEBUG(D_INODE, DFID" depth %hu\n", PFID(&lli->lli_fid), lli->lli_depth);
+       lli->lli_dir_depth = ll_i2info(dir)->lli_dir_depth + 1;
+       CDEBUG(D_INODE, DFID" depth %hu\n",
+              PFID(&lli->lli_fid), lli->lli_dir_depth);
 }
 
 void ll_truncate_inode_pages_final(struct inode *inode)
@@ -3221,7 +3226,9 @@ struct md_op_data *ll_prep_md_op_data(struct md_op_data *op_data,
                if (namelen != 0)
                        return ERR_PTR(-EINVAL);
        } else {
-               if (namelen > ll_i2sbi(i1)->ll_namelen)
+               if ((!IS_ENCRYPTED(i1) ||
+                    (opc != LUSTRE_OPC_LOOKUP && opc != LUSTRE_OPC_CREATE)) &&
+                   namelen > ll_i2sbi(i1)->ll_namelen)
                        return ERR_PTR(-ENAMETOOLONG);
 
                /* "/" is not valid name, but it's allowed */