diff options
author | Matt Benjamin <mbenjamin@redhat.com> | 2019-06-19 20:43:38 +0200 |
---|---|---|
committer | Matt Benjamin <mbenjamin@redhat.com> | 2019-06-28 22:29:56 +0200 |
commit | 6bf2786d28bad9c5269d07e00142b57b287089f0 (patch) | |
tree | 95e31258201f53c71f90abbae865458cf03652d7 /src/test/librgw_file_gp.cc | |
parent | Merge pull request #28102 from albIN7/liv2 (diff) | |
download | ceph-6bf2786d28bad9c5269d07e00142b57b287089f0.tar.xz ceph-6bf2786d28bad9c5269d07e00142b57b287089f0.zip |
rgw_file: introduce fast S3 Unix stats (immutable)
For objects originating in S3/Swift, it is frequently acceptable
to synthesize c/mtime and size stats from meta attributes in the RGW
bucket index entry.
Synthetic stat behavior is not compatible with mutation of file
ownership and permissions via SETATTR. In future, current xattr-based,
mutable, Unix stats may be moved to the bucket index. For now, use
synthetic stats only when a new option rgw_nfs_s3_fast_attrs is present.
Fixes: http://tracker.ceph.com/issues/40456
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Diffstat (limited to 'src/test/librgw_file_gp.cc')
-rw-r--r-- | src/test/librgw_file_gp.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/librgw_file_gp.cc b/src/test/librgw_file_gp.cc index 80a165418a4..1ad41cfd30f 100644 --- a/src/test/librgw_file_gp.cc +++ b/src/test/librgw_file_gp.cc @@ -187,12 +187,13 @@ TEST(LibRGW, MOUNT) { TEST(LibRGW, LOOKUP_BUCKET) { int ret = rgw_lookup(fs, fs->root_fh, bucket_name.c_str(), &bucket_fh, - RGW_LOOKUP_FLAG_NONE); + nullptr, 0, RGW_LOOKUP_FLAG_NONE); ASSERT_EQ(ret, 0); } extern "C" { static bool r2_cb(const char* name, void *arg, uint64_t offset, + struct stat *st, uint32_t st_mask, uint32_t flags) { // don't need arg--it would point to fids fids.push_back(fid_type(name, offset, nullptr)); @@ -222,7 +223,7 @@ TEST(LibRGW, LIST_OBJECTS) { TEST(LibRGW, LOOKUP_OBJECT) { if (do_get || do_stat || do_put || do_bulk || do_readv || do_writev) { int ret = rgw_lookup(fs, bucket_fh, object_name.c_str(), &object_fh, - RGW_LOOKUP_FLAG_CREATE); + nullptr, 0, RGW_LOOKUP_FLAG_CREATE); ASSERT_EQ(ret, 0); } } |