lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c310a5e7-e410-dbdb-cada-3eca82a9ceb0@bytedance.com>
Date:   Fri, 14 Apr 2023 23:45:26 +0800
From:   Jia Zhu <zhujia.zj@...edance.com>
To:     David Howells <dhowells@...hat.com>
Cc:     linux-cachefs@...hat.com, linux-erofs@...ts.ozlabs.org,
        linux-kernel@...r.kernel.org, jefflexu@...ux.alibaba.com,
        hsiangkao@...ux.alibaba.com, yinxin.x@...edance.com,
        zhujia.zj@...edance.com
Subject: Re: Re: [PATCH V5 2/5] cachefiles: extract ondemand info field from
 cachefiles_object



在 2023/4/14 21:51, David Howells 写道:
> Jia Zhu <zhujia.zj@...edance.com> wrote:
> 
>>   #define CACHEFILES_OBJECT_STATE_FUNCS(_state, _STATE)	\
>>   static inline bool								\
>>   cachefiles_ondemand_object_is_##_state(const struct cachefiles_object *object) \
>>   {												\
>> -	return object->state == CACHEFILES_ONDEMAND_OBJSTATE_##_STATE; \
>> +	return object->ondemand->state == CACHEFILES_ONDEMAND_OBJSTATE_##_STATE; \
>>   }												\
>>   												\
>>   static inline void								\
>>   cachefiles_ondemand_set_object_##_state(struct cachefiles_object *object) \
>>   {												\
>> -	object->state = CACHEFILES_ONDEMAND_OBJSTATE_##_STATE; \
>> +	object->ondemand->state = CACHEFILES_ONDEMAND_OBJSTATE_##_STATE; \
>>   }
> 
> I wonder if those need barriers - smp_load_acquire() and smp_store_release().
> 
> David

There are three object states: OPEN, CLOSE, REOPENING.

Here is no logic in the code such like: A has to watching and waiting
for B's status change.

And so far I haven't constructed a scenario requires barrier pairs. Thus
I didn't add barriers here.

Jia
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ