Skip to content

Commit 08786c7

Browse files
Merge pull request #9288 from jackyalbo/jacky_5.20_nc_fixes
[5.20 backport] NC | backported fixes
2 parents 5fad34c + e6aaafe commit 08786c7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/sdk/namespace_fs.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,10 @@ class NamespaceFS {
808808
dbg.log0('NamespaceFS: no keys for non existing dir', dir_path);
809809
return;
810810
}
811+
if (err.code === 'EINVAL' && config.NSFS_LIST_IGNORE_ENTRY_ON_EINVAL) {
812+
dbg.log0('NamespaceFS: can\'t stat directory (probably internal gpfs directory)', dir_path);
813+
return;
814+
}
811815
throw err;
812816
}
813817

src/util/entropy_utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async function generate_entropy(loop_cond) {
2828

2929
// most likely we will read from the disk for no reason at all as the caller
3030
// already finished initializing its randomness
31-
if (loop_cond()) break;
31+
if (!loop_cond()) break;
3232

3333
const ENTROPY_AVAIL_PATH = '/proc/sys/kernel/random/entropy_avail';
3434
const entropy_avail = parseInt(await fs.promises.readFile(ENTROPY_AVAIL_PATH, 'utf8'), 10);
@@ -98,7 +98,7 @@ function pick_a_disk(available_disks) {
9898
// (0 index highest priority, n-1 index lowest priority)
9999
// note: we decided on the order according to previous implantation we had in the past
100100
// as it added in patches we might want to reconsider it
101-
const disk_order_by_priority = ['/dev/sd', '/dev/vd', '/dev/xvd', 'dev/dasd', '/dev/nvme'];
101+
const disk_order_by_priority = ['/dev/sd', '/dev/vd', '/dev/xvd', '/dev/dasd', '/dev/nvme'];
102102
const priority_disk_array = [];
103103
for (const disk of available_disks) {
104104
if (disk.size > config.ENTROPY_DISK_SIZE_THRESHOLD) {

0 commit comments

Comments
 (0)