NTFS query... Quick reply appreciated...

Associate
Joined
18 Oct 2002
Posts
220
Location
London, UK
Hi All,

I know NTFS is a journaling file system, and only logs changes to the metadata itself, not the entire file... but can anyone answer me this... At what point does windows return a success to the IO stream that called the write? Once it's written successfully to the NTFS $LOGFILE? Or once the data is written and the commit record is added to the log?

Cheers,
Melon.
 
It returns the error/success notification as soon as the change has been added to the journal. Commit operations can occur at any time really.
 
NathanE said:
It returns the error/success notification as soon as the change has been added to the journal. Commit operations can occur at any time really.

Sweet!! Cheers for that...

I think this could be the cause of an issue we are seeing where an application writes files to a Windows server over a network and we're getting the success and trying to read the files again before windows commits to disk...

I've just spent 20 minutes arguing with a £500 a day contractor who was telling me windows doesn't "cache" data unless the RAID controller is set to do so (even though I explained 20 odd times I wasn't really talking about caching) ... Then he went on to tell me that it doesn't matter what OS or filesystem you have as the controller rules all... I even told him I wasn't talking about the hardware level... I mean NTFS!! He wouldn't budge...

Cheers,
Melon.
 
Oh uncommited stuff can still be read back just fine. The NTFS driver ensures that a read operation isn't overlapping a write operation and if it is, flushes the journal first. It's very complicated but you seriously need not worry about writing a file and then wondering if you are reading back the "latest copy". The problem is elsewhere for certain.

£500 a day is very very cheap BTW :)

Oh and Windows caches practically all I/O. It's called the system cache :) Regardless of how crap the disk controller is, this caching can't be turned off completely. Write caching can (and automatically is for some storage mediums such as memory sticks) be though.
 
Last edited:
NathanE said:
Oh uncommited stuff can still be read back just fine. The NTFS driver ensures that a read operation isn't overlapping a write operation and if it is, flushes the journal first. It's very complicated but you seriously need not worry about writing a file and then wondering if you are reading back the "latest copy". The problem is elsewhere for certain.

£500 a day is very very cheap BTW :)

Oh and Windows caches practically all I/O. It's called the system cache :) Regardless of how crap the disk controller is, this caching can't be turned off completely. Write caching can (and automatically is for some storage mediums such as memory sticks) be though.

Ooooops... back to the drawing board then... but I'm pretty much out of ideas now...

I'd be pretty happy with £500 a day!! :(

Yeah... I know windows caches most stuff... and I know this is seperate from any drive electronics / controller hardware... I was merely trying to get across to the guy the fact I wasn't talking about anything bar NTFS... he just didn't seem to get it...
 
Back
Top Bottom