-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NC | NSFS] add support for DMAPI xattr based GLACIER storage class #8028
base: master
Are you sure you want to change the base?
[NC | NSFS] add support for DMAPI xattr based GLACIER storage class #8028
Conversation
1af7dee
to
c92287a
Compare
c92287a
to
b9278f9
Compare
src/native/fs/fs_napi.cpp
Outdated
const static std::vector<std::string> GPFS_XATTRS{ | ||
GPFS_ENCRYPTION_XATTR_NAME, | ||
GPFS_DMAPI_XATTR_TAPE_INDICATOR, | ||
GPFS_DMAPI_XATTR_TAPE_PREMIG, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this list is going to be used in every stat call... I think we want to optimize it so that it will not include dmapi xattrs when config.NSFS_GLACIER_USE_DMAPI is false.
For this I would add this to namespace_fs in prepare_fs_context to set fs_context.use_dmapi = config.NSFS_GLACIER_USE_DMAPI. This is also needed in manage_nsfs_glacier in force_gpfs_fs_context ().
Then back here in fs_napi you can store it in FSWorker and pass it to get_fd_gpfs_xattr... a long way... but it would save a these two calls when the config is false which I think is worth the coding effort.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, PTAL.
b9278f9
to
b57d9dd
Compare
b57d9dd
to
fb773a6
Compare
9f4a5c9
to
73d6f2e
Compare
73d6f2e
to
ac27bd3
Compare
return; | ||
} | ||
|
||
if (Glacier.is_externally_managed(xattr)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if xattr.storage_class!=GLACIER we don't really want to consider it as externally managed and skip this case.
}; | ||
} | ||
|
||
return { | ||
ongoing: false, | ||
expiry_time: restore_expiry, | ||
state: GlacierBackend.RESTORE_STATUS_RESTORED, | ||
state: Glacier.RESTORE_STATUS_RESTORED, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in this case, the object is not externally managed (meaning xattr.storage_class=GLACIER), but if config.USE_DMAPI is on, we can still look at the dmapi state to verify that indeed the file is premigrated, and print a warning.
src/sdk/namespace_fs.js
Outdated
return false; | ||
} | ||
|
||
throw new Error('cannot restore externally managed object'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we allow restore on externally managed? maybe add an optional config to allow that?
src/sdk/glacier.js
Outdated
config.NSFS_GLACIER_USE_DMAPI && ( | ||
xattr[Glacier.GPFS_DMAPI_XATTR_TAPE_INDICATOR] || | ||
xattr[Glacier.GPFS_DMAPI_XATTR_TAPE_PREMIG] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
externally managed should also check that xattr.storage_class != GLACIER
ac27bd3
to
471da8a
Compare
Signed-off-by: Utkarsh Srivastava <[email protected]>
471da8a
to
1da300d
Compare
Explain the changes
This PR adds support expands the GLACIER storage class by automatically deriving the state of the object if
config.NSFS_GLACIER_USE_DMAPI = true
(not the default).Testing Instructions:
./node_modules/.bin/mocha src/test/unit_tests/test_nsfs_glacier_backend.js