Author: pschweitzer
Date: Thu Jun 25 20:49:40 2015
New Revision: 68268
URL:
http://svn.reactos.org/svn/reactos?rev=68268&view=rev
Log:
[NTFS]
Don't attempt to read the unnamed stream of the $DATA attribute of each file
matching:
- We don't need such attribute later on
- In case there's no such unammed stream, finding the file fails, whereas the file
really exist
This fixes (at least here) browsing Win7 NTFS system drives, where our driver was always
failing on pagefile.sys
Modified:
trunk/reactos/drivers/filesystems/ntfs/dirctl.c
trunk/reactos/drivers/filesystems/ntfs/mft.c
trunk/reactos/drivers/filesystems/ntfs/ntfs.h
Modified: trunk/reactos/drivers/filesystems/ntfs/dirctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/d…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/dirctl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/dirctl.c [iso-8859-1] Thu Jun 25 20:49:40 2015
@@ -38,7 +38,6 @@
static NTSTATUS
NtfsGetNameInformation(PDEVICE_EXTENSION DeviceExt,
PFILE_RECORD_HEADER FileRecord,
- PNTFS_ATTR_CONTEXT DataContext,
PFILE_NAMES_INFORMATION Info,
ULONG BufferLength)
{
@@ -66,7 +65,6 @@
static NTSTATUS
NtfsGetDirectoryInformation(PDEVICE_EXTENSION DeviceExt,
PFILE_RECORD_HEADER FileRecord,
- PNTFS_ATTR_CONTEXT DataContext,
ULONGLONG MFTIndex,
PFILE_DIRECTORY_INFORMATION Info,
ULONG BufferLength)
@@ -112,7 +110,6 @@
static NTSTATUS
NtfsGetFullDirectoryInformation(PDEVICE_EXTENSION DeviceExt,
PFILE_RECORD_HEADER FileRecord,
- PNTFS_ATTR_CONTEXT DataContext,
ULONGLONG MFTIndex,
PFILE_FULL_DIRECTORY_INFORMATION Info,
ULONG BufferLength)
@@ -159,7 +156,6 @@
static NTSTATUS
NtfsGetBothDirectoryInformation(PDEVICE_EXTENSION DeviceExt,
PFILE_RECORD_HEADER FileRecord,
- PNTFS_ATTR_CONTEXT DataContext,
ULONGLONG MFTIndex,
PFILE_BOTH_DIR_INFORMATION Info,
ULONG BufferLength)
@@ -236,7 +232,6 @@
PFILE_OBJECT FileObject;
NTSTATUS Status = STATUS_SUCCESS;
PFILE_RECORD_HEADER FileRecord;
- PNTFS_ATTR_CONTEXT DataContext;
ULONGLONG MFTRecord, OldMFTRecord = 0;
UNICODE_STRING Pattern;
@@ -315,7 +310,6 @@
&Pattern,
&Ccb->Entry,
&FileRecord,
- &DataContext,
&MFTRecord,
Fcb->MFTIndex);
@@ -338,7 +332,6 @@
case FileNameInformation:
Status = NtfsGetNameInformation(DeviceExtension,
FileRecord,
- DataContext,
(PFILE_NAMES_INFORMATION)Buffer,
BufferLength);
break;
@@ -346,7 +339,6 @@
case FileDirectoryInformation:
Status = NtfsGetDirectoryInformation(DeviceExtension,
FileRecord,
- DataContext,
MFTRecord,
(PFILE_DIRECTORY_INFORMATION)Buffer,
BufferLength);
@@ -355,7 +347,6 @@
case FileFullDirectoryInformation:
Status = NtfsGetFullDirectoryInformation(DeviceExtension,
FileRecord,
- DataContext,
MFTRecord,
(PFILE_FULL_DIRECTORY_INFORMATION)Buffer,
BufferLength);
@@ -364,7 +355,6 @@
case FileBothDirectoryInformation:
Status = NtfsGetBothDirectoryInformation(DeviceExtension,
FileRecord,
- DataContext,
MFTRecord,
(PFILE_BOTH_DIR_INFORMATION)Buffer,
BufferLength);
Modified: trunk/reactos/drivers/filesystems/ntfs/mft.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/m…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/mft.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/mft.c [iso-8859-1] Thu Jun 25 20:49:40 2015
@@ -796,13 +796,12 @@
PUNICODE_STRING SearchPattern,
PULONG FirstEntry,
PFILE_RECORD_HEADER *FileRecord,
- PNTFS_ATTR_CONTEXT *DataContext,
PULONGLONG MFTIndex,
ULONGLONG CurrentMFTIndex)
{
NTSTATUS Status;
- DPRINT("NtfsFindFileAt(%p, %wZ, %p, %p, %p, %p, %I64x)\n", Vcb,
SearchPattern, FirstEntry, FileRecord, DataContext, MFTIndex, CurrentMFTIndex);
+ DPRINT("NtfsFindFileAt(%p, %wZ, %p, %p, %p, %I64x)\n", Vcb, SearchPattern,
FirstEntry, FileRecord, MFTIndex, CurrentMFTIndex);
Status = NtfsFindMftRecord(Vcb, CurrentMFTIndex, SearchPattern, FirstEntry, TRUE,
&CurrentMFTIndex);
if (!NT_SUCCESS(Status))
@@ -826,21 +825,6 @@
return Status;
}
- if (!((*FileRecord)->Flags & FRH_DIRECTORY))
- {
- Status = FindAttribute(Vcb, *FileRecord, AttributeData, L"", 0,
DataContext);
- if (!NT_SUCCESS(Status))
- {
- DPRINT("NtfsFindFileAt: Can't find data attribute\n");
- ExFreePoolWithTag(*FileRecord, TAG_NTFS);
- return Status;
- }
- }
- else
- {
- *DataContext = NULL;
- }
-
*MFTIndex = CurrentMFTIndex;
return STATUS_SUCCESS;
Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/n…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] Thu Jun 25 20:49:40 2015
@@ -739,7 +739,6 @@
PUNICODE_STRING SearchPattern,
PULONG FirstEntry,
PFILE_RECORD_HEADER *FileRecord,
- PNTFS_ATTR_CONTEXT *DataContext,
PULONGLONG MFTIndex,
ULONGLONG CurrentMFTIndex);