Closed inouekazu closed 2 years ago
Can one of the admins verify this patch?
test this please
I agree with Ken (in the above thread) that there should be a fallback if O_DIRECT fails. There are filesystems and options even on Linux that don't always support O_DIRECT and they shouldn't be ecxluded or errored
#if defined(__linux__) || defined(__FreeBSD__)
.Also, I don't understand why the error checking for the ioctl is done on the sec_size value rather than the ioctl return. If that's fine then a comment saying why would be helpful. Maybe we need both?
Some kind of shortcut for 'ioctl has to succeed and not return bogus'. But some comment would of course make sense. Basically I guess the code should be safe though I don't know if there are actually cases where ioctl would succeed without returning a proper block-size. Same code-pattern btw. has been in sbd since ever.
retest this please
retest this please
Thanks.
Use of O_DIRECT in open() eliminates the possibility of false negatives resulting from buffer cache reads.
please refer to https://lists.clusterlabs.org/pipermail/users/2022-August/030459.html for background.