Jump to content

About FAT16 file system cache


Recommended Posts

Posted

I make a FAT16 file system on ramdisk(Not Hard disk). But I found it's not

so timely when writing data to the ramdisk. That means when I copy files to

the ramdisk, there will be several seconds' delay after my copy action. The

FAT table about the copied-file info is created 2~5 seconds delay.

 

So the question is HOW to disable the file system's cache? In linux OS,

there's 'SYNC' command and synchronize time can be set. In WinXP, how to do?

Do I need to add something in my ramdisk driver?

Thanks your support if you can.

  • Replies 8
  • Created
  • Last Reply
Guest Uwe Sieber
Posted

Re: About FAT16 file system cache

 

Watson wrote:

> I make a FAT16 file system on ramdisk(Not Hard disk). But I found it's not

> so timely when writing data to the ramdisk. That means when I copy files to

> the ramdisk, there will be several seconds' delay after my copy action. The

> FAT table about the copied-file info is created 2~5 seconds delay.

>

> So the question is HOW to disable the file system's cache? In linux OS,

> there's 'SYNC' command and synchronize time can be set. In WinXP, how to do?

> Do I need to add something in my ramdisk driver?

> Thanks your support if you can.

 

You can call FlushFileBuffers with a read+write handle

to the storage volume to get a 'sync on request'. But

as far as I know there is no way to set a snychronize

time.

Deactivating the write cache might be possible by setting

the removal policy CM_REMOVAL_POLICY_EXPECT_SURPRISE_REMOVAL.

 

Try the newsgroup microsoft.public.win32.programmer.kernel,

they know better...

 

 

Uwe

Guest Ken Blake, MVP
Posted

Re: About FAT16 file system cache

 

On Tue, 19 Feb 2008 00:41:00 -0800, Watson

<Watson@discussions.microsoft.com> wrote:

> I make a FAT16 file system on ramdisk(Not Hard disk).

 

 

Although there may occasionally be a special situation where this

makes sense, for almost everyone running Windows, doing this is

counterproductive. Why are you doing this, and what do you hope to

gain?

 

> But I found it's not

> so timely when writing data to the ramdisk. That means when I copy files to

> the ramdisk, there will be several seconds' delay after my copy action. The

> FAT table about the copied-file info is created 2~5 seconds delay.

>

> So the question is HOW to disable the file system's cache? In linux OS,

> there's 'SYNC' command and synchronize time can be set. In WinXP, how to do?

> Do I need to add something in my ramdisk driver?

> Thanks your support if you can.

 

--

Ken Blake, Microsoft MVP - Windows Desktop Experience

Please Reply to the Newsgroup

Guest David H. Lipman
Posted

Re: About FAT16 file system cache

 

From: "Ken Blake, MVP" <kblake@this.is.an.invalid.domain>

 

| On Tue, 19 Feb 2008 00:41:00 -0800, Watson

| <Watson@discussions.microsoft.com> wrote:

|

>> I make a FAT16 file system on ramdisk(Not Hard disk).

|

| Although there may occasionally be a special situation where this

| makes sense, for almost everyone running Windows, doing this is

| counterproductive. Why are you doing this, and what do you hope to

| gain?

|

 

I agree. What does a WinXP user nees a RAM Disk for ??

 

--

Dave

http://www.claymania.com/removal-trojan-adware.html

Multi-AV - http://www.pctipp.ch/downloads/dl/35905.asp

Guest Ken Blake, MVP
Posted

Re: About FAT16 file system cache

 

On Tue, 19 Feb 2008 13:19:06 -0500, "David H. Lipman"

<DLipman~nospam~@Verizon.Net> wrote:

> From: "Ken Blake, MVP" <kblake@this.is.an.invalid.domain>

>

> | On Tue, 19 Feb 2008 00:41:00 -0800, Watson

> | <Watson@discussions.microsoft.com> wrote:

> |

> >> I make a FAT16 file system on ramdisk(Not Hard disk).

> |

> | Although there may occasionally be a special situation where this

> | makes sense, for almost everyone running Windows, doing this is

> | counterproductive. Why are you doing this, and what do you hope to

> | gain?

> |

>

> I agree. What does a WinXP user nees a RAM Disk for ??

 

 

Usually it's because the poster mistakenly thinks it will speed up

Windows to put the page file there. In fact, that will slow down

Windows.

 

 

--

Ken Blake, Microsoft MVP - Windows Desktop Experience

Please Reply to the Newsgroup

Guest Uncle Grumpy
Posted

Re: About FAT16 file system cache

 

"David H. Lipman" <DLipman~nospam~@Verizon.Net> wrote:

>I agree. What does a WinXP user nees a RAM Disk for ??

 

The user has probably been using a RAM disk for centuries - like since

systems came with only a couple megs of RAM - and just can't let go.

Posted

Re: About FAT16 file system cache

 

David H. Lipman wrote:

>

> >> I make a FAT16 file system on ramdisk(Not Hard disk).

> |

> | Although there may occasionally be a special situation where this

> | makes sense, for almost everyone running Windows, doing this is

> | counterproductive. Why are you doing this, and what do you hope to

> | gain?

>

> I agree. What does a WinXP user nees a RAM Disk for ??

 

Nothing at all....

 

 

 

--

http://www.bootdisk.com/

Posted

Re: About FAT16 file system cache

 

Thanks, Uwe, everyone.

I have used FlushFileBuffers in my user mode application and it does work.

But my customer would like me to implement this 'sync' feature in ramdisk

driver. Is there any function call in driver mode like FlushFileBuffers? Or

is there a flag in driver to notify FAT 16 to do sync operation right now?

 

In fact, on my board I write this driver for a SRAM with battery. The SRAM

will store some files like a disk.

I used WinDBG to debug and found FAT file system would write the table

2~5seconds delay when do file copy/delete action. Thus when power is off

suddenly, the files would NOT occur on the SRAM disk because FAT table has

not finished writing. But the data have already been on SRAM disk.

 

Also, if you have any advice you can contact me with :

wangson.wang@radisys.com

 

"Uwe Sieber" wrote:

> Watson wrote:

> > I make a FAT16 file system on ramdisk(Not Hard disk). But I found it's not

> > so timely when writing data to the ramdisk. That means when I copy files to

> > the ramdisk, there will be several seconds' delay after my copy action. The

> > FAT table about the copied-file info is created 2~5 seconds delay.

> >

> > So the question is HOW to disable the file system's cache? In linux OS,

> > there's 'SYNC' command and synchronize time can be set. In WinXP, how to do?

> > Do I need to add something in my ramdisk driver?

> > Thanks your support if you can.

>

> You can call FlushFileBuffers with a read+write handle

> to the storage volume to get a 'sync on request'. But

> as far as I know there is no way to set a snychronize

> time.

> Deactivating the write cache might be possible by setting

> the removal policy CM_REMOVAL_POLICY_EXPECT_SURPRISE_REMOVAL.

>

> Try the newsgroup microsoft.public.win32.programmer.kernel,

> they know better...

>

>

> Uwe

>

>

>

Posted

RE: About FAT16 file system cache

 

Thanks, Uwe, everyone.

I have used FlushFileBuffers in my user mode application and it does work.

But my customer would like me to implement this 'sync' feature in ramdisk

driver. Is there any function call in driver mode like FlushFileBuffers? Or

is there a flag in driver to notify FAT 16 to do sync operation right now?

 

In fact, on my board I write this driver for a SRAM with battery. The SRAM

will store some files like a disk.

I used WinDBG to debug and found FAT file system would write the table

2~5seconds delay when do file copy/delete action. Thus when power is off

suddenly, the files would NOT occur on the SRAM disk because FAT table has

not finished writing. But the data have already been on SRAM disk.

 

 

"Watson" wrote:

> I make a FAT16 file system on ramdisk(Not Hard disk). But I found it's not

> so timely when writing data to the ramdisk. That means when I copy files to

> the ramdisk, there will be several seconds' delay after my copy action. The

> FAT table about the copied-file info is created 2~5 seconds delay.

>

> So the question is HOW to disable the file system's cache? In linux OS,

> there's 'SYNC' command and synchronize time can be set. In WinXP, how to do?

> Do I need to add something in my ramdisk driver?

> Thanks your support if you can.


×
×
  • Create New...