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

rgw_file: permit dirent offset computation #16275

Merged
merged 1 commit into from Jul 19, 2017

Conversation

Projects
None yet
3 participants
@mattbenjamin
Contributor

mattbenjamin commented Jul 11, 2017

The new dirent chunking feature in nfs-ganesha 2.5 includes an
optimization inspired by RGW NFS, and avoids invalidating modified
dirs when the underlying FSAL can project the offset of a
name in it's parent directory, independent of other entries (e.g.,
if offset is a stable hash).

Signed-off-by: Matt Benjamin mbenjamin@redhat.com

rgw_file: permit dirent offset computation
The new dirent chunking feature in nfs-ganesha 2.5 includes an
optimization inspired by RGW NFS, and avoids invalidating modified
dirs when the underlying FSAL can project the offset of a
name in it's parent directory, independent of other entries (e.g.,
if offset is a stable hash).

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
if (unlikely(! is_dir())) {
return -EINVAL;
}
*offset = XXH64(name.c_str(), name.length(), fh_key::seed);

This comment has been minimized.

@cbodley

cbodley Jul 17, 2017

Contributor

nit: since this doesn't depend on a null-terminated string, consider taking the string as a string_view to avoid constructing a std::string

@yuriw yuriw merged commit 35bc5f4 into ceph:master Jul 19, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment