diff options
author | Matt Benjamin <mbenjamin@redhat.com> | 2017-01-20 00:14:30 +0100 |
---|---|---|
committer | Matt Benjamin <mbenjamin@redhat.com> | 2017-01-24 14:21:33 +0100 |
commit | deb2c1ea985fcb906e47b93fd3d0117794e2d0a1 (patch) | |
tree | c12dec2dd5d97009ef885c8e8fe79861ba984d6b /src/include/rados/rgw_file.h | |
parent | Merge pull request #13042 from dillaman/wip-librbd-compile-warning (diff) | |
download | ceph-deb2c1ea985fcb906e47b93fd3d0117794e2d0a1.tar.xz ceph-deb2c1ea985fcb906e47b93fd3d0117794e2d0a1.zip |
rgw_file: add timed namespace invalidation
With change, librgw/rgw_file consumers can provide an invalidation
callback, which is used by the library to invalidate directories
whose contents should be forgotten.
The existing RGWLib GC mechanism is being used to drive this. New
configuration params have been added. The main configurable is
rgw_nfs_namespace_expire_secs, the expire timeout.
Updated post Yehuda review.
Fixes: http://tracker.ceph.com/issues/18651
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Diffstat (limited to 'src/include/rados/rgw_file.h')
-rw-r--r-- | src/include/rados/rgw_file.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/include/rados/rgw_file.h b/src/include/rados/rgw_file.h index 47a97633b3b..dfa1ede18c9 100644 --- a/src/include/rados/rgw_file.h +++ b/src/include/rados/rgw_file.h @@ -27,7 +27,7 @@ extern "C" { #define LIBRGW_FILE_VER_MAJOR 1 #define LIBRGW_FILE_VER_MINOR 1 -#define LIBRGW_FILE_VER_EXTRA 0 +#define LIBRGW_FILE_VER_EXTRA 1 #define LIBRGW_FILE_VERSION(maj, min, extra) ((maj << 16) + (min << 8) + extra) #define LIBRGW_FILE_VERSION_CODE LIBRGW_FILE_VERSION(LIBRGW_FILE_VER_MAJOR, LIBRGW_FILE_VER_MINOR, LIBRGW_FILE_VER_EXTRA) @@ -120,6 +120,16 @@ int rgw_mount(librgw_t rgw, const char *uid, const char *key, uint32_t flags); /* + register invalidate callbacks +*/ +#define RGW_REG_INVALIDATE_FLAG_NONE 0x0000 + +typedef void (*rgw_fh_callback_t)(void *handle, struct rgw_fh_hk fh_hk); + +int rgw_register_invalidate(struct rgw_fs *rgw_fs, rgw_fh_callback_t cb, + void *arg, uint32_t flags); + +/* detach rgw namespace */ #define RGW_UMOUNT_FLAG_NONE 0x0000 |