disk.IOCounters()
returns ERROR_INVALID_FUNCTION
when Google Drive is mounted as a disk in Windows.
#1461
Labels
disk.IOCounters()
returns ERROR_INVALID_FUNCTION
when Google Drive is mounted as a disk in Windows.
#1461
Describe the bug
disk.IOCounters(names ...string)
returnsERROR_INVALID_FUNCTION
when Google Drive is mounted as a disk in Windows.To Reproduce
Call:
when Google Drive is mounted as a disk in Windows and observe returned
ERROR_INVALID_FUNCTION
. In my case it has letterG
.Expected behavior
ERROR_INVALID_FUNCTION
(returned fromwindows.DeviceIoControl
) can be ignored insideIOCountersWithContext
(in the similar way as in mentioned https://github.com/giampaolo/psutil/blob/544e9daa4f66a9f80d7bf6c7886d693ee42f0a13/psutil/arch/windows/disk.c#L83)or
names
passed toIOCountersWithContext
can be implemented (so consumer can get stats only for particular drives) - right nownames
are ignored.Environment (please complete the following information):
/etc/os-release
and the result ofuname -a
]sw_vers
anduname -a
freebsd-version -k -r -u
anduname -a
]uname -a
]Additional context
Problem disappears after Google Drive is unmounted (Google Drive daemon is closed).
The text was updated successfully, but these errors were encountered: