mirror of
https://github.com/ceph/ceph
synced 2024-12-17 00:46:05 +00:00
mds: pass proper mask to CInode::get_caps_issued
There is a total of 22 cap bits and file lock uses 8 cap bits. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com> Reviewed-by: Greg Farnum <greg@inktank.com>
This commit is contained in:
parent
246b8118a8
commit
efe7399749
@ -736,9 +736,9 @@ public:
|
||||
|
||||
// caps issued, wanted
|
||||
int get_caps_issued(int *ploner = 0, int *pother = 0, int *pxlocker = 0,
|
||||
int shift = 0, int mask = 0xffff);
|
||||
int shift = 0, int mask = -1);
|
||||
bool is_any_caps_wanted();
|
||||
int get_caps_wanted(int *ploner = 0, int *pother = 0, int shift = 0, int mask = 0xffff);
|
||||
int get_caps_wanted(int *ploner = 0, int *pother = 0, int shift = 0, int mask = -1);
|
||||
bool issued_caps_need_gather(SimpleLock *lock);
|
||||
void replicate_relax_locks();
|
||||
|
||||
|
@ -608,7 +608,8 @@ void Locker::eval_gather(SimpleLock *lock, bool first, bool *pneed_issue, list<C
|
||||
|
||||
int loner_issued = 0, other_issued = 0, xlocker_issued = 0;
|
||||
if (caps && in->is_head()) {
|
||||
in->get_caps_issued(&loner_issued, &other_issued, &xlocker_issued, lock->get_cap_shift(), 3);
|
||||
in->get_caps_issued(&loner_issued, &other_issued, &xlocker_issued,
|
||||
lock->get_cap_shift(), lock->get_cap_mask());
|
||||
dout(10) << " next state is " << lock->get_state_name(next)
|
||||
<< " issued/allows loner " << gcap_string(loner_issued)
|
||||
<< "/" << gcap_string(lock->gcaps_allowed(CAP_LONER, next))
|
||||
|
Loading…
Reference in New Issue
Block a user