Skip to content

Commit

Permalink
client: use deep-copy when setting permission during make_request
Browse files Browse the repository at this point in the history
We need MetaRequest's perms.gids keeps longer than syscal if mds reboot.
When mds reboot we need to rebuild MClientRequest with MetaRequest.

Fixes: https://tracker.ceph.com/issues/59514
Signed-off-by: Mer Xuanyi <xuanyi.meng@xtaotech.com>
  • Loading branch information
Mer1997 committed Apr 28, 2023
1 parent d9e6e1d commit b88f50d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/MetaRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ struct MetaRequest {
void set_alternate_name(std::string an) { alternate_name = an; }
void set_string2(const char *s) { path2.set_path(std::string_view(s), 0); }
void set_caller_perms(const UserPerm& _perms) {
perms.shallow_copy(_perms);
perms = _perms;
head.caller_uid = perms.uid();
head.caller_gid = perms.gid();
}
Expand Down

0 comments on commit b88f50d

Please sign in to comment.