When the 'lustre' module is loaded, it gets a list of
net devices and uses the node ids to add entropy
to the prng. This means that the network interfaces need
to be configured before the module is loaded, which prevents
the module from being compiled into a monolithic kernel.
So move this entropy addition to the moment when
the interface is imported to LNet and the node id is first known.
Linux-commit:
9f0e4c2b823b0cf5744a448d3b23cd618b86db41
Change-Id: I1c9b4f9a5c01de5b14188ccd9330b51eeafd43ac
Signed-off-by: Mr. NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-on: https://review.whamcloud.com/47159
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet_ni_tq_credits(ni) * ni->ni_ncpts);
atomic_set(&ni->ni_healthv, LNET_MAX_HEALTH_VALUE);
+ /* Nodes with small feet have little entropy. The NID for this
+ * node gives the most entropy in the low bits.
+ */
+ add_device_randomness(&ni->ni_nid, sizeof(ni->ni_nid));
+
CDEBUG(D_LNI, "Added LNI %s [%d/%d/%d/%d]\n",
libcfs_nidstr(&ni->ni_nid),
ni->ni_net->net_tunables.lct_peer_tx_credits,
static int __init lustre_init(void)
{
- struct lnet_processid lnet_id;
- int i, rc;
+ int rc;
unsigned long lustre_inode_cache_flags;
BUILD_BUG_ON(sizeof(LUSTRE_VOLATILE_HDR) !=
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);