So how do I get the length of a volume on W2K
From: Jan Bottorff (nospam4096_at_online.nospam)
Date: 03/04/05
- Next message: paullee: "question for AllocateCommonBuffer and How to send user mode memory data to kernel"
- Previous message: Philipp Ineichen: "Re: kbfiltr on hid - how to getpiv/vid?"
- Next in thread: Bart Bartel [MSFT]: "RE: So how do I get the length of a volume on W2K"
- Reply: Bart Bartel [MSFT]: "RE: So how do I get the length of a volume on W2K"
- Reply: Maxim S. Shatskih: "Re: So how do I get the length of a volume on W2K"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 3 Mar 2005 21:40:02 -0800
I have a storage filter driver that layers above a volume. Under W2K there
is no IOCTL I can make to find the size of the volume.
I tried IOCTL_DISK_GET_DRIVE_GEOMETRY (the _EX variant is not defined in the
W2K DDK headers), which returns the size of the physical disk the volume is
on
I tried IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS, which on RAID and Mirror
volumes returns extents that include the mirror or parity extent, so adding
them together gives the wrong size on these kinds of volumes. This might
work if there is another IOCTL that could tell me which extents to add
together.
I tried IOCTL_DISK_GET_PARTITION_INFO (the _EX variant is not defined in the
W2K DDK headers), which fails on a dynamic non-simple volumes such as RAID,
Stripe sets, mirror volumes and spanned volumes.
For W2K3 I use IOCTL_DISK_GET_LENGTH_INFO (not defined in W2K DDK headers),
but this does not exists on W2K.
Things like the file system must get the size of a volume, but see no easy
way under W2K. At the moment, I do a binary search of the last valid sector
doing IRP_MJ_READ's
Is there some other IOCTL, or is the binary search my only option?
- Jan
- Next message: paullee: "question for AllocateCommonBuffer and How to send user mode memory data to kernel"
- Previous message: Philipp Ineichen: "Re: kbfiltr on hid - how to getpiv/vid?"
- Next in thread: Bart Bartel [MSFT]: "RE: So how do I get the length of a volume on W2K"
- Reply: Bart Bartel [MSFT]: "RE: So how do I get the length of a volume on W2K"
- Reply: Maxim S. Shatskih: "Re: So how do I get the length of a volume on W2K"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|