Re: how to disable read/write cache - one more question

Thank you everyone for the information.

“David J. Craig” wrote in message
news:xxxxx@ntfsd…
>
>
> 2. Windows XP has an option for media that is marked as ‘removable’ or
> devices that indicate they are a ‘removable device’. A standard floppy is
> ‘removable media’ while a USB hard drive is a ‘removable device’ and a USB
> flash memory reader is both. There is a property page that allows
> ‘removable media’ to be treated as ‘Optimize for performance’ or ‘Optimize
> for quick removal’. ‘removable devices’ also have a ‘Enable write caching
> on the disk’ option if ‘Optimize for performance’ is chosen. Choosing
> ‘Optimize for quick removal’ is probably the best solution to keeping the
> remote media updated.

If the disk drives can set an option to enable/disable the write cache, is
that something I can use in my virtual disk driver? Obviously, there is no
“Policies” tab that comes up in my entry under Device Manager. But if I
knew how this was done (the write caching, not the property tab) I could at
least have it working like I want on XP. Does anyone know how I can access
this particular functionality?

Stupid users will find a way to scramble the data no
> matter what you do.

Sadly, yes.

Diane

“Policies” tab allows to disable cache in hardware, it is nothing to do with
windows cache.
If your virtual disk driver is a SCSI port driver you can make this page
appear but it will not help to address your original problem

Alexei.

If the disk drives can set an option to enable/disable the write cache, is
that something I can use in my virtual disk driver? Obviously, there is
no
“Policies” tab that comes up in my entry under Device Manager. But if I
knew how this was done (the write caching, not the property tab) I could
at
least have it working like I want on XP. Does anyone know how I can
access
this particular functionality?

What you really want the benefit of is FASTFAT’s aggressive flushing
when it detects a volume or its media is hotplugable. Only FASTFAT
supports this – NTFS is not intended for removable media.

When FASTFAT mounts the volume, it queries the device for the
IOCTL_STORAGE_GET_HOTPLUG_INFO ioctl. If the device sets either the
MediaHotPlug or DeviceHotPlug fields to TRUE, FAST will flush the file
on close so you don’t have to wait for the cache manager’s lazy writes
to flush the data to the disk. (I know this IOCTL is documented in the
Server 2003 DDK, but I’m guessing it was also documented in the XP DDK.)

IOCTL_STORAGE_GET_HOTPLUG_INFO was introduced in Windows XP, but the
basic functionality was backported to Windows 2000 for SP5. Instead of
responding to the IOCTL, you add a registry key under your service key
to specify that you want hotplug enabled. If you can’t wait until
Windows 2000 SP5 is released, this change is available as a QFE today.
See KB article Q328504 for more details.

If you only need to support FAT, I believe this should work for you.

Molly Brown
Microsoft Corporation

This posting is provided “AS IS” with no warranties and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of DianeRose
Sent: Monday, December 08, 2003 10:12 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Re: how to disable read/write cache - one more question

Thank you everyone for the information.

“David J. Craig” wrote in message
news:xxxxx@ntfsd…
>
>
> 2. Windows XP has an option for media that is marked as ‘removable’
> or devices that indicate they are a ‘removable device’. A standard
> floppy is ‘removable media’ while a USB hard drive is a ‘removable
> device’ and a USB flash memory reader is both. There is a property
> page that allows ‘removable media’ to be treated as ‘Optimize for
> performance’ or ‘Optimize for quick removal’. ‘removable devices’
> also have a ‘Enable write caching on the disk’ option if ‘Optimize for

> performance’ is chosen. Choosing ‘Optimize for quick removal’ is
> probably the best solution to keeping the remote media updated.

If the disk drives can set an option to enable/disable the write cache,
is that something I can use in my virtual disk driver? Obviously, there
is no “Policies” tab that comes up in my entry under Device Manager.
But if I knew how this was done (the write caching, not the property
tab) I could at least have it working like I want on XP. Does anyone
know how I can access this particular functionality?

Stupid users will find a way to scramble the data no
> matter what you do.

Sadly, yes.

Diane


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com