Skip to content

Commit f8ce045

Browse files
committed
NC | Ignore EINVAL in stat for list
Signed-off-by: jackyalbo <jacky.albo@gmail.com> (cherry picked from commit 68db715)
1 parent a386ed0 commit f8ce045

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,6 +1000,8 @@ config.NFSF_UPLOAD_STREAM_MEM_THRESHOLD = 8 * 1024 * 1024;
10001000

10011001
// we want to change our handling related to EACCESS error
10021002
config.NSFS_LIST_IGNORE_ENTRY_ON_EACCES = true;
1003+
// we will for now handle the same way also EINVAL error - for gpfs stat issues on list (.snapshots)
1004+
config.NSFS_LIST_IGNORE_ENTRY_ON_EINVAL = true;
10031005

10041006
////////////////////////////
10051007
// NSFS NON CONTAINERIZED //

src/util/native_fs_utils.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,8 @@ async function stat_if_exists(fs_context, entry_path, use_lstat, should_ignore_e
318318
// we might want to expand the error list due to permission/structure
319319
// change (for example: ELOOP, ENAMETOOLONG) or other reason (EPERM) - need to be decided
320320
if ((err.code === 'EACCES' && should_ignore_eacces) ||
321+
// A fix for GPFS stat issues on list (.snapshots) - ignore EINVAL as well
322+
(err.code === 'EINVAL' && config.NSFS_LIST_IGNORE_ENTRY_ON_EINVAL) ||
321323
err.code === 'ENOENT' || err.code === 'ENOTDIR') {
322324
dbg.log0('stat_if_exists: Could not access file entry_path',
323325
entry_path, 'error code', err.code, ', skipping...');

0 commit comments

Comments
 (0)