diff options
author | Jeff Layton <jlayton@redhat.com> | 2018-01-26 16:23:58 +0100 |
---|---|---|
committer | Jeff Layton <jlayton@redhat.com> | 2018-01-26 16:23:58 +0100 |
commit | 7a275516a059bb18d62b7aff4b51b81a4df0f4fb (patch) | |
tree | e0f4352eb22889ceff31d8f4eb716616f084ee06 /src/client/Inode.h | |
parent | Merge pull request #19922 from Rubab-Syed/performance_counter_browser (diff) | |
download | ceph-7a275516a059bb18d62b7aff4b51b81a4df0f4fb.tar.xz ceph-7a275516a059bb18d62b7aff4b51b81a4df0f4fb.zip |
client: add cap_dirtier_uid/gid to CapSnap
Set new fields to whatever the inode has at the time that we create the
CapSnap. In the event that it was unset at the time of the creation and
becomes dirty afterward, we set it again at finish.
This ensures that we send a valid uid/gid in the event that it had dirty
caps at any point during that period.
Tracker: http://tracker.ceph.com/issues/22801
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Diffstat (limited to 'src/client/Inode.h')
-rw-r--r-- | src/client/Inode.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/Inode.h b/src/client/Inode.h index cbffaec6531..04d3ff312a6 100644 --- a/src/client/Inode.h +++ b/src/client/Inode.h @@ -93,10 +93,14 @@ struct CapSnap { bool writing, dirty_data; uint64_t flush_tid; + int64_t cap_dirtier_uid; + int64_t cap_dirtier_gid; + explicit CapSnap(Inode *i) : in(i), issued(0), dirty(0), size(0), time_warp_seq(0), change_attr(0), mode(0), uid(0), gid(0), xattr_version(0), inline_version(0), - writing(false), dirty_data(false), flush_tid(0) + writing(false), dirty_data(false), flush_tid(0), cap_dirtier_uid(-1), + cap_dirtier_gid(-1) {} void dump(Formatter *f) const; |