rgw_file: user info never synced since librgw init

Fixed: https://tracker.ceph.com/issues/37527

Signed-off-by: Tao Chen <chentao@umcloud.com>
This commit is contained in:
taoCH 2018-12-05 18:20:20 +08:00
parent 948efa96bb
commit e611be8dac
2 changed files with 8 additions and 0 deletions

View File

@ -119,6 +119,7 @@ namespace rgw {
RGWLibFS* fs = iter->first->ref();
uniq.unlock();
fs->gc();
fs->update_user();
fs->rele();
uniq.lock();
if (cur_gen != gen)

View File

@ -1237,6 +1237,13 @@ namespace rgw {
RGWUserInfo* get_user() { return &user; }
void update_user() {
RGWUserInfo _user = user;
int ret = rgw_get_user_info_by_access_key(rgwlib.get_store(), key.id, user);
if (ret != 0)
user = _user;
}
void close();
void gc();
}; /* RGWLibFS */