The commit adding Seastar sstring.h replaced a part of the interface
which used an internal string-view type, with an equivalent using
basic_string_ref from Boost. I relied on a default template argument
not present in older versions.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
There is more cleanup potential here, but it is intrusive, as the
validators for bucket and object names have been factored through
the handler inheritance hierarchy.
This change just deletes the S3 validate_bucket_name for now, as
that method was large. The corresponding object name validator was
not defined in RGWHandler_REST_S3, so I've left it as is, for now.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
The declaration being skipped was meant as a placeholder for future
optimization work, moved to a comment.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Adds the RGW-NFS library to the radosgw build, with unit tests.
Adds -fPIC to compile flags to satisfy the linker, but should have
been evident to automake/libtool.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
The current behavior of put_data_and_throttle leads to data
curruption, because the supplied buffer is apparently still being
written when the call returns--regardless of the value of
need_to_wait.
For now, do a buffer::copy of the supplied buffer, rather than the
original buffer::static, since that will at least be released
when no longer needed.
Probably this improves apparent rgw_write performance, but is not
what was originally intended.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
In hindsight, it seems clear how to consume the available bytes and
account for the bytes written into the caller's buffer.
Verified by unit test on data from S3, with a 6M file read in 1M
chunks, the preferred max read in modern Linux kernel NFS.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Move internal unlink logic into new RGWLibFS::unlink method, fix
logic for files and directories.
Use RGWFileHandle::mtx and RGWFileHandle::FLAG_DELETED to ensure
atomicity of handle creates and deletes.
Remove handles for unlinked objects from cache.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
In the rgw_create regular file case, the timestamp and size update
logic (though present) was being bypassed because the "FLAG_CREATE"
indicator which formerly propagated up from RGWLibFS::lookup_fh
was lost in the LRU change, which refactored the code for creating
new RGWFileHandle objects.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Save a pointer to CephContext in RGWProcess for use by logger--
using the existing pointer in ThreadPool would be an intrusive
change.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
The lack of stat here induced a serious memory corruption, due to
the organization of Ganesha file attributes (and their reliance on
the FSAL to initialize the memory).
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>