Re: [PATCH 2/3] ceph: define argument structure for handle_cap_grant

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Yan, Zheng" <ukernel@xxxxxxxxx> writes:

> On Thu, May 3, 2018 at 10:31 PM, Luis Henriques <lhenriques@xxxxxxxx> wrote:
>> "Yan, Zheng" <ukernel@xxxxxxxxx> writes:
>>
>>> On Thu, May 3, 2018 at 6:18 PM, Luis Henriques <lhenriques@xxxxxxxx> wrote:
>>>> "Yan, Zheng" <zyan@xxxxxxxxxx> writes:
>>>>
>>>> <snip>
>>>>
>>>>> +struct cap_extra_info {
>>>>> +     struct ceph_string *pool_ns;
>>>>> +     u64 inline_version;
>>>>> +     void *inline_data;
>>>>> +     u32 inline_len;
>>>>> +     // currently issued
>>>>
>>>> nit picking: I would rather have C-style comments.
>>>>
>>>>> +     int issued;
>>>>> +};
>>>>> +
>>>>>  /*
>>>>>   * Handle a cap GRANT message from the MDS.  (Note that a GRANT may
>>>>>   * actually be a revocation if it specifies a smaller cap set.)
>>>>>   *
>>>>>   * caller holds s_mutex and i_ceph_lock, we drop both.
>>>>>   */
>>>>> -static void handle_cap_grant(struct ceph_mds_client *mdsc,
>>>>> -                          struct inode *inode, struct ceph_mds_caps *grant,
>>>>> -                          struct ceph_string **pns, u64 inline_version,
>>>>> -                          void *inline_data, u32 inline_len,
>>>>> -                          struct ceph_buffer *xattr_buf,
>>>>> +static void handle_cap_grant(struct inode *inode,
>>>>>                            struct ceph_mds_session *session,
>>>>> -                          struct ceph_cap *cap, int issued)
>>>>> +                          struct ceph_cap *cap,
>>>>> +                          struct ceph_mds_caps *grant,
>>>>> +                          struct ceph_buffer *xattr_buf,
>>>>> +                          struct cap_extra_info *extra_info)
>>>>>       __releases(ci->i_ceph_lock)
>>>>> -     __releases(mdsc->snap_rwsem)
>>>>> +     __releases(sesson->s_mdsc->snap_rwsem)
>>>>                    ^^^^^^
>>>> There's a typo here - it should be 'session'.
>>>>
>>>
>>> thanks. I updated testing branch, please take a look
>>
>> Thank you, it looks good to me.
>>
>> However, I have a question regarding a different commit in that branch:
>>
>>   7ec55c7a52c6 "ceph: update i_files/i_subdirs only when Fs cap is issued"
>>
>> This commit has been changed from the original patch posted here, and it
>> now includes some (unrelated) changes which I don't really understand:
>>
>> -       issued = __ceph_caps_issued(ci, &implemented);
>> -       issued |= implemented | __ceph_caps_dirty(ci);
>> -       new_issued = ~issued & le32_to_cpu(info->cap.caps);
>> +       __ceph_caps_issued(ci, &issued);
>> +       issued |= __ceph_caps_dirty(ci);
>> +       new_issued = ~issued & info_caps;
>>
>> Why isn't 'issued' not being ORed with the implemented caps anymore?
>> Was that a bug in the previous code?
>>
>
> implemented bits should always includes issued bits.

Ah, right.  I should have looked closer in the code :-)
Thanks for clarifying.

Cheers,
-- 
Luis
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux