Whamcloud - gitweb
LU-12514 LNet: get entropy from nid when nid set.
[fs/lustre-release.git] / lustre / llite / super25.c
index f75595a..4dc69e3 100644 (file)
@@ -73,8 +73,13 @@ static void ll_destroy_inode(struct inode *inode)
 
 static int ll_drop_inode(struct inode *inode)
 {
-       int drop = generic_drop_inode(inode);
+       struct ll_sb_info *sbi = ll_i2sbi(inode);
+       int drop;
 
+       if (!sbi->ll_inode_cache_enabled)
+               return 1;
+
+       drop = generic_drop_inode(inode);
        if (!drop)
                drop = llcrypt_drop_inode(inode);
 
@@ -157,6 +162,8 @@ static int lustre_fill_super(struct super_block *sb, void *lmd2_data,
        }
 
        CDEBUG(D_MOUNT, "Mounting client %s\n", lmd->lmd_profile);
+       /* filename encryption is disabled by default */
+       lsi->lsi_flags &= ~LSI_FILENAME_ENC;
        rc = lustre_start_mgc(sb);
        if (rc) {
                lustre_common_put_super(sb);
@@ -212,8 +219,7 @@ MODULE_ALIAS_FS("lustre");
 
 static int __init lustre_init(void)
 {
-       struct lnet_process_id lnet_id;
-       int i, rc;
+       int rc;
        unsigned long lustre_inode_cache_flags;
 
        BUILD_BUG_ON(sizeof(LUSTRE_VOLATILE_HDR) !=
@@ -253,15 +259,6 @@ static int __init lustre_init(void)
        if (rc)
                GOTO(out_cache, rc);
 
-       /* Nodes with small feet have little entropy. The NID for this
-        * node gives the most entropy in the low bits. */
-       for (i = 0;; i++) {
-               if (LNetGetId(i, &lnet_id) == -ENOENT)
-                       break;
-
-               add_device_randomness(&lnet_id.nid, sizeof(lnet_id.nid));
-       }
-
        rc = vvp_global_init();
        if (rc != 0)
                GOTO(out_tunables, rc);