Volume label woes

Hi,
My remote FSD has the following parameters:
DeviceType = FILE_DEVICE_NETWORK_FILE_SYSTEM
Characteristics = 0
during device creation with IoCreateDevice.

Also in response to a FileFsDeviceInformation request the values returned
are:
deviceInfo->DeviceType = FILE_DEVICE_DISK;
deviceInfo->Characteristics = FILE_DEVICE_IS_MOUNTED;
so that the Win32 call GetFileType will work.

IRP_MJ_QUERY_VOLUME_INFORMATION and IRP_MJ_SET_VOLUME_INFORMATION are both
handled in the FSD.

Since there is no VPB and no mount request is received for the remote FSD,
on receving a request to set the volume label, the new volume label is
stored and the Irp is completed. In future IRP_MJ_QUERY_VOLUME_INFORMATION
requests this new volume label is returned.

The problem Im seeing is that my remote FSD which creates a symbolic link
to a drive letter, always shows the volume label as “Network Drive” in
Win2k and “Disconnected Network Drive” in XP when using Explorer. The
label is displayed correctly in the command prompt but never in Explorer.
Even if I use a test program to read and set the volume label using Win32
calls like SetVolumeLabel(), the calls succeed and while new the label is
displayed correctly in the command prompt (using ‘dir’) it remains
“Network Drive” in explorer.

In fact if I change the label using explorer (right click the drive letter
and then click properties) it changes, but the FSD does not get any
IRP_MJ_SET_VOLUME_INFORMATION call! The volume label then reverts back to
“Network Drive” after a while if I play around trying to map and unmap
other drive letters there. If I dont play around with this, this new label
actually persists across a reboot.

Have I missed implementing something in the driver? Some special Ioctl or
FSCTL perhaps? Why doesnt my driver receive a
IRP_MJ_SET_VOLUME_INFORMATION call when the volume label is set through
explorer? What does explorer do to set the label? Does it cache
information? Also does the FSD need to store the volume label in the
registry to make it persist?

I’ll appreciate any inputs on these questions.

Thanks!
Jagannath

p.s. My FSD does not support directory change notification.

Do not emulate the disk FS from a redirector. Use the usual
redirector’s way of doing things instead - NP DLL and net roots. No
disks, no VPBs.

Max

----- Original Message -----
From: “Jagannath Krishnan”
To: “File Systems Developers”
Sent: Tuesday, May 06, 2003 11:53 PM
Subject: [ntfsd] Volume label woes

> Hi,
> My remote FSD has the following parameters:
> DeviceType = FILE_DEVICE_NETWORK_FILE_SYSTEM
> Characteristics = 0
> during device creation with IoCreateDevice.
>
> Also in response to a FileFsDeviceInformation request the values
returned
> are:
> deviceInfo->DeviceType = FILE_DEVICE_DISK;
> deviceInfo->Characteristics = FILE_DEVICE_IS_MOUNTED;
> so that the Win32 call GetFileType will work.
>
> IRP_MJ_QUERY_VOLUME_INFORMATION and IRP_MJ_SET_VOLUME_INFORMATION
are both
> handled in the FSD.
>
> Since there is no VPB and no mount request is received for the
remote FSD,
> on receving a request to set the volume label, the new volume label
is
> stored and the Irp is completed. In future
IRP_MJ_QUERY_VOLUME_INFORMATION
> requests this new volume label is returned.
>
> The problem Im seeing is that my remote FSD which creates a symbolic
link
> to a drive letter, always shows the volume label as “Network Drive”
in
> Win2k and “Disconnected Network Drive” in XP when using Explorer.
The
> label is displayed correctly in the command prompt but never in
Explorer.
> Even if I use a test program to read and set the volume label using
Win32
> calls like SetVolumeLabel(), the calls succeed and while new the
label is
> displayed correctly in the command prompt (using ‘dir’) it remains
> “Network Drive” in explorer.
>
> In fact if I change the label using explorer (right click the drive
letter
> and then click properties) it changes, but the FSD does not get any
> IRP_MJ_SET_VOLUME_INFORMATION call! The volume label then reverts
back to
> “Network Drive” after a while if I play around trying to map and
unmap
> other drive letters there. If I dont play around with this, this new
label
> actually persists across a reboot.
>
> Have I missed implementing something in the driver? Some special
Ioctl or
> FSCTL perhaps? Why doesnt my driver receive a
> IRP_MJ_SET_VOLUME_INFORMATION call when the volume label is set
through
> explorer? What does explorer do to set the label? Does it cache
> information? Also does the FSD need to store the volume label in the
> registry to make it persist?
>
> I’ll appreciate any inputs on these questions.
>
> Thanks!
> Jagannath
>
>
> p.s. My FSD does not support directory change notification.
>
> —
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Could you elaborate a little please?
Also my FSD is not a redirector. It is a remote FSD (doesnt serve files
from local disk but over some other communication channel using an
internal protocol). Hence the deviceType and characteristics.

Is there a problem with these settings?

Thanks,
Jagannath