Re: [PATCH v2 2/6] libceph: introduce reference counted string

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

 



> On Mar 24, 2016, at 21:55, Ilya Dryomov <idryomov@xxxxxxxxx> wrote:
> 
> On Thu, Mar 24, 2016 at 2:18 PM, Yan, Zheng <zyan@xxxxxxxxxx> wrote:
>> 
>>> On Mar 24, 2016, at 18:26, Ilya Dryomov <idryomov@xxxxxxxxx> wrote:
> 
> [ snip ]
> 
>>> TBH I still can't wrap my head around lockless layout/namespace pointer
>>> updates and how that can ever work reliably…
>> 
>> see Documentation/RCU/rcuref.txt. How RCU is used in my code is similar to the second example.
> 
> It's the higher-level cephfs code and installing new namespaces in the
> middle of whatever else that might be going on that I'm worried about.
> See my other mail, I'd like to hear what exactly is being achieved with
> this approach and have you considered reusing i_ceph_lock (or others,
> of which there are plenty).

Updating namespace pointer is protected by i_ceph_lock, For read access of the namespace, using i_ceph_lock does not provide any extra guarantee. This approach provides lockless access of namespace, it’s convenient for functions that do not know 
i_ceph_lock.

Regards
Yan, Zheng

> Thanks,
> 
>                Ilya

--
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