Whamcloud - gitweb
LU-11304 misc: update all url links to whamcloud
[fs/lustre-release.git] / lustre / llite / llite_lib.c
index 5d06edc..b73aa4d 100644 (file)
@@ -123,6 +123,7 @@ static struct ll_sb_info *ll_init_sbi(void)
         }
 
        /* metadata statahead is enabled by default */
+       sbi->ll_sa_running_max = LL_SA_RUNNING_DEF;
        sbi->ll_sa_max = LL_SA_RPC_DEF;
        atomic_set(&sbi->ll_sa_total, 0);
        atomic_set(&sbi->ll_sa_wrong, 0);
@@ -224,7 +225,10 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
                                  OBD_CONNECT_GRANT_PARAM |
                                  OBD_CONNECT_SHORTIO | OBD_CONNECT_FLAGS2;
 
-       data->ocd_connect_flags2 = OBD_CONNECT2_FLR | OBD_CONNECT2_LOCK_CONVERT;
+       data->ocd_connect_flags2 = OBD_CONNECT2_FLR |
+                                  OBD_CONNECT2_LOCK_CONVERT |
+                                  OBD_CONNECT2_DIR_MIGRATE |
+                                  OBD_CONNECT2_SUM_STATFS;
 
 #ifdef HAVE_LRU_RESIZE_SUPPORT
         if (sbi->ll_flags & LL_SBI_LRU_RESIZE)
@@ -410,7 +414,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
                                  OBD_CONNECT_LAYOUTLOCK |
                                  OBD_CONNECT_PINGLESS | OBD_CONNECT_LFSCK |
                                  OBD_CONNECT_BULK_MBITS | OBD_CONNECT_SHORTIO |
-                                 OBD_CONNECT_FLAGS2;
+                                 OBD_CONNECT_FLAGS2 | OBD_CONNECT_GRANT_SHRINK;
 
 /* The client currently advertises support for OBD_CONNECT_LOCKAHEAD_OLD so it
  * can interoperate with an older version of lockahead which was released prior
@@ -1810,6 +1814,9 @@ int ll_statfs_internal(struct ll_sb_info *sbi, struct obd_statfs *osfs,
        CDEBUG(D_SUPER, "MDC blocks %llu/%llu objects %llu/%llu\n",
                osfs->os_bavail, osfs->os_blocks, osfs->os_ffree,osfs->os_files);
 
+       if (osfs->os_state & OS_STATE_SUM)
+               GOTO(out, rc);
+
         if (sbi->ll_flags & LL_SBI_LAZYSTATFS)
                 flags |= OBD_STATFS_NODELAY;
 
@@ -1838,6 +1845,7 @@ int ll_statfs_internal(struct ll_sb_info *sbi, struct obd_statfs *osfs,
                 osfs->os_ffree = obd_osfs.os_ffree;
         }
 
+out:
         RETURN(rc);
 }
 int ll_statfs(struct dentry *de, struct kstatfs *sfs)
@@ -1851,7 +1859,7 @@ int ll_statfs(struct dentry *de, struct kstatfs *sfs)
         ll_stats_ops_tally(ll_s2sbi(sb), LPROC_LL_STAFS, 1);
 
        /* Some amount of caching on the client is allowed */
-       rc = ll_statfs_internal(ll_s2sbi(sb), &osfs, 0);
+       rc = ll_statfs_internal(ll_s2sbi(sb), &osfs, OBD_STATFS_SUM);
        if (rc)
                return rc;
 
@@ -1897,6 +1905,15 @@ void ll_inode_size_unlock(struct inode *inode)
        mutex_unlock(&lli->lli_size_mutex);
 }
 
+void ll_update_inode_flags(struct inode *inode, int ext_flags)
+{
+       inode->i_flags = ll_ext_to_inode_flags(ext_flags);
+       if (ext_flags & LUSTRE_PROJINHERIT_FL)
+               ll_file_set_flag(ll_i2info(inode), LLIF_PROJECT_INHERIT);
+       else
+               ll_file_clear_flag(ll_i2info(inode), LLIF_PROJECT_INHERIT);
+}
+
 int ll_update_inode(struct inode *inode, struct lustre_md *md)
 {
        struct ll_inode_info *lli = ll_i2info(inode);
@@ -1953,7 +1970,7 @@ int ll_update_inode(struct inode *inode, struct lustre_md *md)
 
        /* Clear i_flags to remove S_NOSEC before permissions are updated */
        if (body->mbo_valid & OBD_MD_FLFLAGS)
-               inode->i_flags = ll_ext_to_inode_flags(body->mbo_flags);
+               ll_update_inode_flags(inode, body->mbo_flags);
        if (body->mbo_valid & OBD_MD_FLMODE)
                inode->i_mode = (inode->i_mode & S_IFMT) |
                                (body->mbo_mode & ~S_IFMT);
@@ -2086,7 +2103,7 @@ void ll_delete_inode(struct inode *inode)
        truncate_inode_pages_final(&inode->i_data);
 
        LASSERTF(inode->i_data.nrpages == 0, "inode="DFID"(%p) nrpages=%lu, "
-                "see https://jira.hpdd.intel.com/browse/LU-118\n",
+                "see https://jira.whamcloud.com/browse/LU-118\n",
                 PFID(ll_inode2fid(inode)), inode, inode->i_data.nrpages);
 
 #ifdef HAVE_SBOPS_EVICT_INODE
@@ -2155,7 +2172,7 @@ int ll_iocontrol(struct inode *inode, struct file *file,
                if (rc)
                        RETURN(rc);
 
-               inode->i_flags = ll_ext_to_inode_flags(flags);
+               ll_update_inode_flags(inode, flags);
 
                obj = ll_i2info(inode)->lli_clob;
                if (obj == NULL)
@@ -2456,32 +2473,6 @@ out_statfs:
        return rc;
 }
 
-int ll_process_config(struct lustre_cfg *lcfg)
-{
-       struct super_block *sb;
-       unsigned long x;
-       int rc = 0;
-       char *ptr;
-
-       /* The instance name contains the sb: lustre-client-aacfe000 */
-       ptr = strrchr(lustre_cfg_string(lcfg, 0), '-');
-       if (!ptr || !*(++ptr))
-               return -EINVAL;
-       if (sscanf(ptr, "%lx", &x) != 1)
-               return -EINVAL;
-       sb = (struct super_block *)x;
-       /* This better be a real Lustre superblock! */
-       LASSERT(s2lsi(sb)->lsi_lmd->lmd_magic == LMD_MAGIC);
-
-       /* Note we have not called client_common_fill_super yet, so
-          proc fns must be able to handle that! */
-       rc = class_process_proc_param(PARAM_LLITE, lprocfs_llite_obd_vars,
-                                     lcfg, sb);
-       if (rc > 0)
-               rc = 0;
-       return rc;
-}
-
 /* this function prepares md_op_data hint for passing it down to MD stack. */
 struct md_op_data *ll_prep_md_op_data(struct md_op_data *op_data,
                                      struct inode *i1, struct inode *i2,