summaryrefslogtreecommitdiffstats
path: root/src/test/librgw_file_gp.cc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* rgw/file: change function signature to match the one generated by cythonyuval Lifshitz2022-11-101-1/+1
| | | | | | | | without this change, clang16 fails to compile, due to conversion from "bool" to "int". see error: https://paste.sh/QybPVNdh#OtffZeqJKcsqUVMupPYD11Kl Signed-off-by: yuval Lifshitz <ylifshit@redhat.com>
* common: modify 'main()s' to use new argv_to_vec() signatureRonen Friedman2021-08-191-6/+3
| | | | | | | A followup to PR #42820 that modified argv_to_vec() signature (for style and performance). Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
* test: : build without "using namespace std"Kefu Chai2021-08-131-0/+2
| | | | | | | | | | * add "std::" prefix in headers * add "using" declarations in .cc files. so we don't rely on "using namespace std" in one or more included headers. Signed-off-by: Kefu Chai <kchai@redhat.com>
* rgw_file: add librgw unit test argumentsMatt Benjamin2021-01-251-1/+24
| | | | | | | | Also adjust some unit test files to avoid trivial failures. Fixes missing commit after rgw_write(), as well as conditional cleanup. Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* rgw_file: fix librgw_file_gp unit test and driverMatt Benjamin2020-12-161-0/+11
| | | | | | | | | | Fixes missing commit after rgw_write(), as well as conditional cleanup. Reorder tests, and split out librgw_file_gp --delete to avoid an issue w/sysobj cache (temporary). Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* test: do not include unnecessary includesKefu Chai2019-09-021-1/+0
| | | | Signed-off-by: Kefu Chai <kchai@redhat.com>
* rgw_file: introduce fast S3 Unix stats (immutable)Matt Benjamin2019-06-281-2/+3
| | | | | | | | | | | | | | | 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>
* misc: mark constructors as explicitDanny Al-Gaaf2018-05-021-1/+1
| | | | | | | | | | | | | | | Set 218 constructors as explicit to avoid implicit usage. Fix for cppcheck warning: Class has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided. For more information check: https://www.codeproject.com/Articles/28663/Explicit-Constructor-in-C Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* src: Fix typosimransinghal2018-03-251-1/+1
| | | | | | Replace "dont" with "don't". "Dont" is not same as "Do not" or "Don't". Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>
* rgw_file: introduce rgw_mount2 with a bucket name parameterGui Hecheng2017-07-221-2/+2
| | | | | | | | | | | This explicitly allow mount a specified bucket in librgw. Originally, mounting a bucket is implemented like a sub-directory mount in nfs-ganesha FSAL_RGW with lookup_path. With this change, we allow root_fh to points exactly to the root of a mounted fs instance, which is a bucket or "/" rather than always let root_fh points to "/". Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
* rgw_file: introduce rgw_lookup type hintsMatt Benjamin2017-04-131-1/+2
| | | | | | | | | The new type hints optimize object type deduction, when the rgw_lookup is called from an rgw_readdir callback. Fixes: http://tracker.ceph.com/issues/19623 Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* dout: Use dout_contextAdam C. Emerson2016-12-221-0/+1
| | | | | | | As a transition for g_ceph_context removal, make all dout macros depends on a local macro. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* rgw_file: fix/update rgw_open flag argumentsMatt Benjamin2016-08-121-1/+1
| | | | | | | Allow passing POSIX open flags as well as api call flags. Needed for NFS3 support. Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* test/librgw_file_*: use size_t* for rgw_read argSigned-off-by: Eric Lee2016-03-091-1/+1
| | | | | | Fixes 32-bit build. Signed-off-by: Eric Lee <eric.lee@hgst.com>
* librgw: update rgw_* api calls so that all take a flags argMatt Benjamin2016-02-121-11/+13
| | | | Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* librgw: conditionally send '.' and '..' (rgw_readdir)Matt Benjamin2016-02-121-1/+1
| | | | | | | Ganesha traditionally does not expect them, but they may be needed when bypassing the MDCACHE (2.4). Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* Fix copyright statements on new test driver files (Red Hat, Inc.)Matt Benjamin2016-02-121-1/+1
| | | | Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* librgw: fix size computation in RGWStatObjRequestMatt Benjamin2016-02-121-1/+15
| | | | | | | Overrides RGWGetObj::execute(), calls the parent method and then saves obj_size from the manifest. Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* librgw: introduce RGW_LOOKUP_FLAG_CREATEMatt Benjamin2016-02-121-1/+1
| | | | | | | | | | | | | 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>
* librgw_file_gp: check test state before closing null fh handleMatt Benjamin2016-02-121-4/+12
| | | | Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* librgw_file_gp: don't leak a buffer::listMatt Benjamin2016-02-121-2/+1
| | | | Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* librgw: checksum verify writev/readv read-after-writeMatt Benjamin2016-02-121-15/+58
| | | | | | | | | 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>
* librgw: really make hexdump optional, set resid in readv unit testMatt Benjamin2016-02-121-6/+17
| | | | Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* librgw: fix 2 dout problemsMatt Benjamin2016-02-121-2/+8
| | | | | | | | | * 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>
* librgw: try-implement rgw_readv/rgw_writevMatt Benjamin2016-02-121-12/+85
| | | | | | | | | | | | | | 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>
* librgw: improve rgw_write and add WRITE_READ_VERIFYMatt Benjamin2016-02-121-3/+29
| | | | | | | | | | | 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>
* librgw: rework library CephContext* and initMatt Benjamin2016-02-121-1/+1
| | | | | | | | | | | 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>
* librgw: implement RGWGetObjRequestMatt Benjamin2016-02-121-6/+29
| | | | Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* librgw: add --prelist to gp to prime cacheMatt Benjamin2016-02-121-5/+45
| | | | Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* librgw: fix rgw_open param names and invocationMatt Benjamin2016-02-121-6/+12
| | | | Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* librgw: fs->root_fh is a pointer (and assign it)Matt Benjamin2016-02-121-1/+1
| | | | | | | Assign and expose the expanded root_fh indirectly from the mounted root filesystem structure. Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* librgw: add ZPage/ZPageSet abstraction (gp unit tests)Matt Benjamin2016-02-121-0/+75
| | | | Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* librgw: rgw_file_handle refactor, plus get/putMatt Benjamin2016-02-121-0/+158
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>