* implement a stat operation over RGWGetObj (returning early)
* use stat to validate rgw_lookup
* use stat to implement rgw_getattr
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
This a cache-line-friendly set of primitives for
a) shareded, intrusive maps based on boost::intrusive
b) an LRU system based on them
The system uses per-lane (shard) locks. Lane count, front cache
size, and lock type are template params.
Initially, use this in preference to an unshareded map or hashtable,
in new RGW code.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
The changes to GET_OBJECT and PUT_OBJECT test options are needed,
since they are (re) writing the same object.
Sadly, READV_AFTER_WRITEV is failing at page offset 7.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* rgw_file.cc needed to include include/assert.h AFTER all rgw
includes, for some reason
* use *_dout syntax as target of bl.hexdump in lbrgw_file_gp.cc
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
The model in the rgw_readv call is the caller owns the struct rgw_uio,
and uses it to pass uio_offset.
The caller returns the rgw_uio filled out, and provides indirectly
rgw_uio->uio_vio (the full private data is at uio->uio_p1 on return,
the caller (p==private) must not touch it. The caller returns
private data in rgw_readv_release() when finished.
Meanwhile rgw_writev is atomic.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Update rgw_write to return bytes written as an OUT argument,
use and verify in PUT test.
A new WRITE_READ_VERIFY test writes 16 checksummed, 64K data pages
to the object when --bulk specified. The returned write value is
checked, but pages not re-read (yet).
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Remove duplicated init step. Just reference the global
Ceph context for the library instance(s).
The immediate effect of this is to bring the (correctly initialized)
global context into all call paths, which (e.g.) fixes debug
log prints within subsystems.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Implement encapsulation of RGWFileHandle in rgw_file_handle,
so return these from rgw_lookup(), add new rgw_fh_rele() to release
internal state.
Currently the rgw_fh_rele just deletes, in future might be extended
with refcnt support.
Implement the first (atomic) stage of i/o using GET and PUT, add a
new librgw_file_gp test driver for this.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
The logic to create a default S3 policy in
RGWCreateBucket_OS_Lib::get_params() was essentially correct, but
failed to store the resulting policy on the current request.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* set uri in rgw_mkdir (duh)
* RGWCreateBucketRequest should override RGWHandler::read_permissions
to return 0
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>