Skip to content
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

NSFS | Versioning | GPFS Linkat & Unlinkat fd verification #7177

Merged
merged 1 commit into from
May 10, 2023

Conversation

romayalon
Copy link
Contributor

@romayalon romayalon commented Jan 19, 2023

Signed-off-by: Romy romy2232@gmail.com

Explain the changes

  1. Fs_napi.unlinkfileat() that calls GPFS unlinkfileat.
  2. Fs_napi.getfd() an accessor for fd files.
  3. Fs_napi.linkfileat() - added replace_fd and passed it to linkat() for fd verification.
  4. GPFS.h - Added the new declarations for linkat & unlinkat
  5. namespace_fs - Added safe_move() function that calls safe_move_posix() or safe_move_gpfs() according to the result of _is_gpfs() functions.
  6. Namespace_fs.safe_move_gpfs() -
    7.1. Wraps linkfileat() & unlinkfileat() (if requested) calls with retries
    7.2. open dir and file itself in order to unlink it and pass the needed fd
  7. Namespace_fs.delete_object() -
    8.1. delete version id & latest - called unlinkfileat with retries.
  8. Namespace_fs.delete_multiple_objects() -
    9.1. delete version id & latest - called unlinkfileat with retries.

Issues: Fixed #xxx / Gap #xxx

  1. optimization - delete version id - GPFS link overrides, no need to unlink before promoting, but if there is nothing to promote we should
  2. move_to_dest retries - checkaccess() when called from upload_object() will fail on temp file since it doesn't exist

Testing Instructions:

  • Doc added/updated
  • Tests added

@romayalon romayalon force-pushed the romy-gpfs-linkat-unlinkat branch 2 times, most recently from 5c2a48b to d9c98c0 Compare January 19, 2023 19:56
src/native/fs/fs_napi.cpp Outdated Show resolved Hide resolved
src/native/fs/gpfs.h Outdated Show resolved Hide resolved
src/native/fs/gpfs.h Outdated Show resolved Hide resolved
@romayalon romayalon force-pushed the romy-gpfs-linkat-unlinkat branch 3 times, most recently from 159abc0 to ea61396 Compare May 1, 2023 09:32
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
@romayalon romayalon force-pushed the romy-gpfs-linkat-unlinkat branch 2 times, most recently from b20a7cc to 3a41cd6 Compare May 8, 2023 07:23
@romayalon romayalon force-pushed the romy-gpfs-linkat-unlinkat branch 3 times, most recently from 7fe7952 to a4003f2 Compare May 8, 2023 07:30
@romayalon romayalon force-pushed the romy-gpfs-linkat-unlinkat branch 2 times, most recently from 6649eb6 to e453f96 Compare May 9, 2023 14:32
Signed-off-by: Romy <romy2232@gmail.com>

comments

Signed-off-by: Romy <romy2232@gmail.com>
@romayalon romayalon merged commit bd2b15c into noobaa:master May 10, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants