>>> Klaus Wenninger <kwenn...@redhat.com> schrieb am 03.08.2022 um 15:51 in Nachricht <calrdao074vd77biwe9np6j7k2v9dkng1yfapjruhmm0-6l8...@mail.gmail.com>: > On Tue, Aug 2, 2022 at 4:10 PM Ken Gaillot <kgail...@redhat.com> wrote: >> >> 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. > > Might as well be interesting to adjust block-size/alignment to the > device. > Another consideration could be to on top directly access the block-layer > using aio. Again AIO is POSIX; it depends on the implementation what it really does. > Both is being done in sbd (storage-based-death) and yes it as well > adds Linux specific stuff that might have to be conditional for other OSs. > > Klaus > >> >> 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. >> -- >> Ken Gaillot <kgail...@redhat.com> >> >> _______________________________________________ >> Manage your subscription: >> https://lists.clusterlabs.org/mailman/listinfo/users >> >> ClusterLabs home: https://www.clusterlabs.org/ > > _______________________________________________ > Manage your subscription: > https://lists.clusterlabs.org/mailman/listinfo/users > > ClusterLabs home: https://www.clusterlabs.org/ _______________________________________________ Manage your subscription: https://lists.clusterlabs.org/mailman/listinfo/users ClusterLabs home: https://www.clusterlabs.org/