- Implement NtfsReadFCBAttribute() which is responsible for reading an attribute from a file which is referenced by its FCB. It will first read the file record in the MFT and then read the attribute, if found.
- Use NtfsReadFCBAttribute() to implement support for reparse point in NtfsCreateFile(). Once a reparse point is found, we attempt to open its data. Given their layout, we directly hand them to the Io manager. Just make sure that we return something consistent on disk. Only handle IO_REPARSE_TAG_MOUNT_POINT so far.
Next question to answer is: what to do when a reparse point is encountered during path traversal?
svn path=/trunk/; revision=65586
- Add a flag to enable (or disable depends on your reading ;-)) the VPB swapout process for volume umount.
- By default, disable it for MSVC builds.
This *might* lolfix the MSVC builds.
Just for the record, we also have a bug in the GCC builds but it doesn't seem to show up.
The main issue is that after formatting, we close handle to the volume, and IRP_MJ_CLEANUP is properly received and initiates a bit of dismount.
But then, the IRP_MJ_CLOSE is never received (why????) and thus, dismount cannot properly end.
This is a real & serious issue.
svn path=/trunk/; revision=65527
Fix a FIXME in fastfat:
- Implement support for device buffers flush in VfatFlushVolume().
Unlike Windows SDK, we don't divert the current IRP to pass it to storage device. Here, we allocate a new IRP and call the device so that it flushes buffers.
svn path=/trunk/; revision=65526
If you decrease handles count on cleanup, don't forget to increase it on create.
This fixes sharing violation on ReactOS installation with IopParseDevice hack disabled.
svn path=/trunk/; revision=65525
Warn about unimplemented sub-node browsing while looking into a MFT directory stream.
Might likely explain why we cannnot enumerate all the files on a Win7 volume.
svn path=/trunk/; revision=65474
- Implement NtfsGetPositionInformation(), NtfsGetBasicInformation()
- Add a fixme in NtfsGetStandardInformation() regarding the number of links
svn path=/trunk/; revision=65468
- In NtfsQueryDirectory(), don't upcase name in dir search pattern, it can conflict with POSIX names.
- In CompareFileName(), handle the fact that for Win32 & DOS we do case insensitive comparisons by upcasing name before match. Don't do it for POSIX names!
This fixes name completion in cmd for POSIX. And doesn't break it for Win32 :-).
svn path=/trunk/; revision=65462
- Implement GetBestFileNameFromRecord() which will select the higher subsystem name available (POSIX -> Win32 -> DOS) and return it
- Replace the hand-made implementation of it in dirctl functions relying on it (NtfsGetDirectoryInformation(), NtfsGetFullDirectoryInformation(), NtfsGetBothDirectoryInformation())
- Use it in NtfsMakeFCBFromDirEntry()
This fixes browsing POSIX volume (and opening file) in cmd. Even though, explorer doesn't seem to be happy with such change...
This doesn't fix yet the autocompletion in cmd either.
svn path=/trunk/; revision=65456
- Implement VPB swapout in our FAT driver for dismout (see VfatCheckForDismount)
- Dereference volume handles on close (not on cleanup)
- Keep track of the VDO in our VCB
- Let VfatCheckForDismount() do the actual dismount, instead of VfatDismountVolume() which just initiates it
CORE-8732 #comment Can you retry?
svn path=/trunk/; revision=65372
- Fix failure case handling in vfatUpdateFCB
- NULL output parameters on failure in vfatGetFCBForFile
- Fix a few typos
svn path=/trunk/; revision=65278
- Fix incorrect referencing in VfatCreateFile. vfatGetFCBForFile expects a reference on ParentFcb (and may release it), and also returns a referenced parent FCB.
CORE-8756 #resolve
svn path=/trunk/; revision=65276
- VfatCleanupFile: do not dereference the FCB when closing the volume file object. ObDereferenceObject already causes an IRP_MJ_CLOSE request to be sent, which dereferences the FCB.
CORE-8733 #resolve
svn path=/trunk/; revision=65269
- Move the ROUND_UP & ROUND_DOWN macro definition to header
- Make NtfsReadDisk() sector size aware so that it can properly align read on the disk (and thus prevent them from failing)
- If $ATTRIBUTE_LIST is non resident, then display a message and continue, don't assert on it. This is to be implemented later on.
This fixes directory enumeration on a Windows 7 NTFS volume.
svn path=/trunk/; revision=65240
Try to read the names from the biggest name space to the smallest.
Only at the end assert we have to have a name.
This fixes name enumeration on Windows 7 NTFS volumes.
svn path=/trunk/; revision=65239
Quickly implement NtfsReadFile().
By quickly, I mean that it works but is under optimal in many ways, and also doesn't support any caching. So, don't expect breaking performances.
BUUUUUUT... This implements reading a file on a NTFS volume on ReactOS! And it works!
Here is a picture of all the achievements of ReactOS with NTFS lately: http://www.heisspiter.net/~Pierre/rostests/NTFS_all.png
-> Volume information
-> Displaying files in explorer
-> Moving across directories
-> Reading a file (with more here)
That's all folks! (for now ;-))
svn path=/trunk/; revision=65192
Implement some kind of volume dismount in FastFAT (ie, implement VfatDismountVolume())
This is not fully perfect situation, but it does most of the job (+ leaking a few things). So far, this is not dramatic as its main use is for 1st stage. This will have to be improved later on.
CORE-8732 #comment Can you retest please?
svn path=/trunk/; revision=65173
Simplify buffer size management in GetNtfsFileRecord(). As tests shown, Windows doesn't care about the real size of the file record and expects the caller to pass the complete size of the record and returns it fully.
CORE-8725
svn path=/trunk/; revision=65166
- Move FSCTL_GET_NTFS_VOLUME_DATA implementation in its own function GetNfsVolumeData(), so remove it from NtfsUserFsRequest()
- Add support for FSCTL_GET_NTFS_FILE_RECORD in NtfsUserFsRequest()
- Implement GetNtfsFileRecord() which returns a file record. Not fully sure about its implementation, this is to be checked.
This does not really improve the nfi situation in any kind yet...
CORE-8725
svn path=/trunk/; revision=65145
- Fix renaming files in case the target file already exists.
- Plug a few reference count leaks on FCBs.
CORE-8660 #comment fixed in r65140 #resolve
CORE-8633 #comment fixed in r65140 #resolve
CORE-4758 #comment fixed in r65140 #resolve
svn path=/trunk/; revision=65140
On the road for getting rid of IopParseDevice() hack....
- Add support for FSCTL_LOCK_VOLUME, FSCTL_UNLOCK_VOLUME, FSCTL_DISMOUNT_VOLUME in VfatFileSystemControl()
- Implement VfatLockOrUnlockVolume(). This brings some kind of volume locking to FastFAT FSD. It's likely not fully accurate and welcome to race conditions. But, its main purpose is to be used in usetup. So, this is fine for now.
- Stubplement VfatDismountVolume(). This will be implemented later on, but should be relatively straightforward as it requires volume to be locked (so, we're the last ones on it :-)).
svn path=/trunk/; revision=65129