[ClusterLabs] Antw: [EXT] Re: Q: About a false negative of storage_mon

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Wed Aug 3 02:02:10 EDT 2022


>>> Ken Gaillot <kgaillot at redhat.com> schrieb am 02.08.2022 um 16:09 in
Nachricht
<0a2125a43bbfc09d2ca5bad1a693710f00e33731.camel at redhat.com>:
> On Tue, 2022-08-02 at 19:13 +0900, 井上和徳 wrote:
>> Hi,
>> 
>> Since O_DIRECT is not specified in open() [1], it reads the buffer
>> cache and
>> may result in a false negative. I fear that this possibility
>> increases
>> in environments with large buffer cache and running disk-reading
>> applications
>> such as database.
>> 
>> So, I think it's better to specify O_RDONLY|O_DIRECT, but what about
>> it?
>> (in this case, lseek() processing is unnecessary.)
>> 
>> # I am ready to create a patch that works with O_DIRECT. Also, I
>> wouldn't mind
>> # a "change to add a new mode of inspection with O_DIRECT
>> # (add a option to storage_mon) while keeping the current inspection
>> process".
>> 
>> [1] 
>> 
>
https://github.com/ClusterLabs/resource-agents/blob/main/tools/storage_mon.c#

> L47-L90
>> 
>> Best Regards,
>> Kazunori INOUE
> 
> I agree, it makes sense to use O_DIRECT when available. I don't think
> an option is necessary.
> 
> However, O_DIRECT is not available on all OSes, so the configure script
> should detect support. Also, it is not supported by all filesystems, so
> if the open fails, we should retry without O_DIRECT.

I just looked it up: It seems POSIX has O_RSYNC and O_SYNC and O_DSYNC)
instead.
The buffer cache handling may be different though.

Regards,
Ulrich

> -- 
> Ken Gaillot <kgaillot at redhat.com>
> 
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users 
> 
> ClusterLabs home: https://www.clusterlabs.org/ 





More information about the Users mailing list