This patch allows NtQueryVolumeInformationFile to pass FileFsVolumeInformation and FileFsAttributeInformation requests to the mountmgr. These requests currently do not work for NT device paths, which results in a bunch of duplication in kernelbase.
Best, Erich
On 9/8/20 3:02 PM, Erich E. Hoover wrote:
From 10add5d0acd423e2fb3d762579493dc50f6e6c96 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" erich.e.hoover@gmail.com Date: Fri, 12 Jun 2020 14:53:43 -0600 Subject: ntdll: Allow NtQueryVolumeInformationFile to query volume information from the mountmgr.
Though really this patch is more general than that, i.e. it's actually allowing for asynchronous volume information queries from server objects.
For that matter, I don't know what was requested before, but this patch split seems a bit awkward. Maybe a better split would be:
0001: allow volume information queries to be asynchronous (including both the changes to server/fd.c and ntdll/unix/file.c, although maybe even those should be split...) 0002: implement volume information queries for device files 0003: hook up volume information queries for mountmgr
As a further note, some simple tests (in dlls/ntoskrnl.exe/tests) could help this series.
Signed-off-by: Erich E. Hoover erich.e.hoover@gmail.com
dlls/ntdll/unix/file.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index 03e92a5c59e..7c16908959d 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -6186,15 +6186,26 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, IO_STATUS_BLOCK *io io->u.Status = server_get_unix_fd( handle, 0, &fd, &needs_close, NULL, NULL ); if (io->u.Status == STATUS_BAD_DEVICE_TYPE) {
struct async_irp *async;
HANDLE wait_handle;
if (!(async = (struct async_irp *)alloc_fileio( sizeof(*async), irp_completion, handle )))
return STATUS_NO_MEMORY;
async->buffer = buffer;
async->size = length;
SERVER_START_REQ( get_volume_info ) {
req->async = server_async( handle, &async->io, NULL, NULL, NULL, io ); req->handle = wine_server_obj_handle( handle ); req->info_class = info_class; wine_server_set_reply( req, buffer, length ); io->u.Status = wine_server_call( req ); if (!io->u.Status) io->Information = wine_server_reply_size( reply );
wait_handle = wine_server_ptr_handle( reply->wait ); } SERVER_END_REQ;
} else if (io->u.Status) return io->u.Status;if (wait_handle) io->u.Status = wait_async( wait_handle, TRUE, io ); return io->u.Status;
-- 2.17.1
On Wed, Oct 28, 2020 at 10:33 AM Zebediah Figura z.figura12@gmail.com wrote:
On 9/8/20 3:02 PM, Erich E. Hoover wrote:
From 10add5d0acd423e2fb3d762579493dc50f6e6c96 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" erich.e.hoover@gmail.com Date: Fri, 12 Jun 2020 14:53:43 -0600 Subject: ntdll: Allow NtQueryVolumeInformationFile to query volume information from the mountmgr.
Though really this patch is more general than that, i.e. it's actually allowing for asynchronous volume information queries from server objects.
I'll update the description.
For that matter, I don't know what was requested before, but this patch split seems a bit awkward. Maybe a better split would be:
The status was just updated to "needs splitting", so I broke the first patch up into the three you see now.
0001: allow volume information queries to be asynchronous (including both the changes to server/fd.c and ntdll/unix/file.c, although maybe even those should be split...) 0002: implement volume information queries for device files 0003: hook up volume information queries for mountmgr
Okay, what I think that you're saying is: 0001: server/fd.c changes 0002: ntdll/unix/file.c changes 0003: ntoskrnl.exe/ntoskrnl.c changes 0004: mountmgr.sys/device.c changes Please let me know if that sounds right to you, I'd be happy to do that.
As a further note, some simple tests (in dlls/ntoskrnl.exe/tests) could help this series.
I'll put that together.
Best, Erich
On 10/28/20 1:32 PM, Erich E. Hoover wrote:
On Wed, Oct 28, 2020 at 10:33 AM Zebediah Figura z.figura12@gmail.com wrote:
On 9/8/20 3:02 PM, Erich E. Hoover wrote:
From 10add5d0acd423e2fb3d762579493dc50f6e6c96 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" erich.e.hoover@gmail.com Date: Fri, 12 Jun 2020 14:53:43 -0600 Subject: ntdll: Allow NtQueryVolumeInformationFile to query volume information from the mountmgr.
Though really this patch is more general than that, i.e. it's actually allowing for asynchronous volume information queries from server objects.
I'll update the description.
For that matter, I don't know what was requested before, but this patch split seems a bit awkward. Maybe a better split would be:
The status was just updated to "needs splitting", so I broke the first patch up into the three you see now.
0001: allow volume information queries to be asynchronous (including both the changes to server/fd.c and ntdll/unix/file.c, although maybe even those should be split...) 0002: implement volume information queries for device files 0003: hook up volume information queries for mountmgr
Okay, what I think that you're saying is: 0001: server/fd.c changes 0002: ntdll/unix/file.c changes 0003: ntoskrnl.exe/ntoskrnl.c changes 0004: mountmgr.sys/device.c changes Please let me know if that sounds right to you, I'd be happy to do that.
Right, something like that, the diff to server/device.c also being part of patch 3.
As a further note, some simple tests (in dlls/ntoskrnl.exe/tests) could help this series.
I'll put that together.
Best, Erich