doubt in FSCTL_DISMOUNT_VOLUME

I have a filter driver where I call FSCTL_DISMOUNT_VOLUME to dismount my volume.
Once this is done I extend the dismounted partition using diskpart utility.
Now when I see the disk management console I see the updated details.The partition size is updated.
Now I am mounting the volume from my application.
But after this when I call GetDiskFreeSpaceEx I am not getting the updated information.
Explorer window is also not updated with the new extended information.

I thought once the volume gets mounted after the extend operation both GetDiskFreeSpaceEx and the explorer window should return the new extended info.
But it doesnt look like that.

Any idea regarding this would be of great help

I hope you locked(for exclusive access) the volume before issuing
dismount.
After dismount, you have to close the volume handle that you used to
open the volume exclusively. Only then other components in the system
will have access to it.

Harish

-----Original Message-----
From: xxxxx@gmail.com [mailto:xxxxx@gmail.com]
Sent: Tuesday, February 24, 2009 2:31 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] doubt in FSCTL_DISMOUNT_VOLUME

I have a filter driver where I call FSCTL_DISMOUNT_VOLUME to dismount my
volume.
Once this is done I extend the dismounted partition using diskpart
utility.
Now when I see the disk management console I see the updated details.The
partition size is updated.
Now I am mounting the volume from my application.
But after this when I call GetDiskFreeSpaceEx I am not getting the
updated information.
Explorer window is also not updated with the new extended information.

I thought once the volume gets mounted after the extend operation both
GetDiskFreeSpaceEx and the explorer window should return the new
extended info.
But it doesnt look like that.

Any idea regarding this would be of great help


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

> But after this when I call GetDiskFreeSpaceEx I am not getting the updated information.

You must also extend the FS’s volume, not only the partition itself.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

Can you please tell me how to extend the FS’s volume, I am not aware of this.

At 09:04 25/02/2009, xxxxx@gmail.com wrote:

Can you please tell me how to extend the FS’s volume, I am not aware of this.

FSCTL_EXTEND_VOLUME - It’s next but one to FSCTL_DISMOUNT_VOLUME in
the documentation.

FSCTL_EXTEND_VOLUME


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

wrote in message news:xxxxx@ntdev…
> Can you please tell me how to extend the FS’s volume, I am not aware of this.
>

I called FSCTL_EXTEND_VOLUME from my application, I am able to see the updated partition size in the explorer. I am finding the difference in size when I see in Device manager and in explore window. suppose the partition size is 1002MB in deviceManager, the window explorer is showing 999MB and GetDiskFreeSpaceEx shows 1001.98MB .

when we call from the application FSCTL_EXTEND_VOLUME , we have to specify the total size of the volume in sector. so I am dividing the total partition size by 512 gives me sector size of the partition.

Do we any IOCTL to get the size of the volume in sector, so that I can use in FSCTL_EXTEND_VOLUME.

> Do we any IOCTL to get the size of the volume in sector

IOCTL_DISK_GET_LENGTH_INFO (works from XP up)


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

FSCTL_EXTEND_VOLUME control code is only supported on NTFS and RAW file systems but we need for FAT32 file system also.

I tried with Diskpart utility to extend the filesystem.
It worked and the explorer got updated.
I wanted to do the same stuff in my application but not sure how to do it.
I dont want to give sector details in my app in FSCTL_EXTEND_VOLUME.
I jus wanted to tell it to update with new details.
kind of refresh

> FSCTL_EXTEND_VOLUME control code is only supported on NTFS and RAW file systems but we

need for FAT32 file system also.

This is the major task, even if you’re allowed to dismount the FS for the duration of extension.

There is no good support for extend in FAT filesystems, it is a very complex thing.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

In DISKPART the command “extend filesystem” update the new volume size in the explorer without giving any size to command.

I just want to do same as diskpart command without giving any size to update the window explorer in my application, I want refresh the File system from the volume manager because volume manager is already updated. If any one already know the IOCTL please help me.