mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
Windows, innodb : reduce noise from os_file_get_block_size()
if volume can't be opened due to permissions, or IOCTL_STORAGE_QUERY_PROPERTY fails with not implemented, do not report it. Those errors happen, there is nothing user can do. This patch amends fix for MDEV-12948.
This commit is contained in:
parent
4ea636d5e7
commit
043a9b4e1b
1 changed files with 5 additions and 12 deletions
|
@ -865,8 +865,10 @@ os_file_get_block_size(
|
|||
0, OPEN_EXISTING, 0, 0);
|
||||
|
||||
if (volume_handle == INVALID_HANDLE_VALUE) {
|
||||
os_file_handle_error_no_exit(volume,
|
||||
"CreateFile()", FALSE);
|
||||
if (GetLastError() != ERROR_ACCESS_DENIED) {
|
||||
os_file_handle_error_no_exit(volume,
|
||||
"CreateFile()", FALSE);
|
||||
}
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
@ -888,16 +890,7 @@ os_file_get_block_size(
|
|||
|
||||
if (!result) {
|
||||
DWORD err = GetLastError();
|
||||
if (err == ERROR_INVALID_FUNCTION || err == ERROR_NOT_SUPPORTED) {
|
||||
// Don't report error, it is driver's fault, not ours or users.
|
||||
// We handle this with fallback. Report wit info message, just once.
|
||||
static bool write_info = true;
|
||||
if (write_info) {
|
||||
ib::info() << "DeviceIoControl(IOCTL_STORAGE_QUERY_PROPERTY)"
|
||||
<< " unsupported on volume " << volume;
|
||||
write_info = false;
|
||||
}
|
||||
} else {
|
||||
if (err != ERROR_INVALID_FUNCTION || err != ERROR_NOT_SUPPORTED) {
|
||||
os_file_handle_error_no_exit(volume,
|
||||
"DeviceIoControl(IOCTL_STORAGE_QUERY_PROPERTY)", FALSE);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue