diff options
author | Matt Benjamin <mbenjamin@redhat.com> | 2015-11-09 00:54:58 +0100 |
---|---|---|
committer | Matt Benjamin <mbenjamin@redhat.com> | 2016-02-12 18:05:50 +0100 |
commit | 857aa1e337df6b7cf5d21e311dce9576e27ea3a9 (patch) | |
tree | 3164e1a29f27f00aa80f2e616357a564e0f7514b /src/test/librgw_file_gp.cc | |
parent | librgw: add getattr unit tests, restructure (diff) | |
download | ceph-857aa1e337df6b7cf5d21e311dce9576e27ea3a9.tar.xz ceph-857aa1e337df6b7cf5d21e311dce9576e27ea3a9.zip |
librgw: introduce RGW_LOOKUP_FLAG_CREATE
The current API relies on rgw_lookup and rgw_lookup_filehandle to
return file handle instances, and like POSIX, needs to deal in some
way with the NFS/POSIX open-for-create concept.
For now, allow rgw_lookup to return the canonical instance for an
object being created, i.e., if the option RGW_LOOKUP_FLAG_CREATE
is passed. (I added an RGW_OPEN_FLAG_CREATE also, but it doesn't
do anything.)
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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/librgw_file_gp.cc b/src/test/librgw_file_gp.cc index adc9629de3b..f35503e2519 100644 --- a/src/test/librgw_file_gp.cc +++ b/src/test/librgw_file_gp.cc @@ -219,7 +219,7 @@ TEST(LibRGW, LIST_OBJECTS) { TEST(LibRGW, LOOKUP_OBJECT) { if (do_get || do_put || do_bulk || do_readv || do_writev) { int ret = rgw_lookup(fs, bucket_fh, object_name.c_str(), &object_fh, - 0 /* flags */); + RGW_LOOKUP_FLAG_CREATE); ASSERT_EQ(ret, 0); } } |