diff options
author | Matt Wu <matt@ext2fsd.com> | 2014-05-11 06:57:08 +0400 |
---|---|---|
committer | Matt Wu <matt@ext2fsd.com> | 2014-05-11 06:57:08 +0400 |
commit | 8271309762a3e20e589765ad04c2f8cc6413d2ff (patch) | |
tree | 6aff2383abbe68daa5d983b5147c3303346ceb0c | |
parent | 81ee2fa6e26f51c70b46438468ff4865c239102f (diff) |
Version 0.52:Ext3Fsd-0.52
1, Feature: Windows 8 supported
2, Feature: Force-writing supported
3, FIXME: data loss with TeraCopy when moving directories
4, FIXME: ATTO Disk Benchnmark fails with direct i/o tests
5, FIXME: files become invisible with empty hidden pattens
6, FIXME: possible hang with concurrent access attempts
upon the same file
7, FIXME: BSOD due to pagable code sections
-rw-r--r-- | Ext3Fsd/cleanup.c | 5 | ||||
-rw-r--r-- | Ext3Fsd/close.c | 1 | ||||
-rw-r--r-- | Ext3Fsd/cmcb.c | 23 | ||||
-rw-r--r-- | Ext3Fsd/create.c | 23 | ||||
-rw-r--r-- | Ext3Fsd/dirctl.c | 6 | ||||
-rw-r--r-- | Ext3Fsd/except.c | 22 | ||||
-rw-r--r-- | Ext3Fsd/ext3/generic.c | 3 | ||||
-rw-r--r-- | Ext3Fsd/fileinfo.c | 2 | ||||
-rw-r--r-- | Ext3Fsd/fsctl.c | 2 | ||||
-rw-r--r-- | Ext3Fsd/include/ext2fs.h | 12 | ||||
-rw-r--r-- | Ext3Fsd/lock.c | 17 | ||||
-rw-r--r-- | Ext3Fsd/memory.c | 16 | ||||
-rw-r--r-- | Ext3Fsd/notes.txt | 27 | ||||
-rw-r--r-- | Ext3Fsd/read.c | 10 | ||||
-rw-r--r-- | Ext3Fsd/readme.txt | 18 | ||||
-rw-r--r-- | Ext3Fsd/write.c | 36 |
16 files changed, 112 insertions, 111 deletions
diff --git a/Ext3Fsd/cleanup.c b/Ext3Fsd/cleanup.c index 4d7d7cf..c63a809 100644 --- a/Ext3Fsd/cleanup.c +++ b/Ext3Fsd/cleanup.c @@ -17,11 +17,6 @@ extern PEXT2_GLOBAL Ext2Global; /* DEFINITIONS *************************************************************/ -#ifdef ALLOC_PRAGMA -#pragma alloc_text(PAGE, Ext2Cleanup) -#endif - - NTSTATUS Ext2Cleanup (IN PEXT2_IRP_CONTEXT IrpContext) { diff --git a/Ext3Fsd/close.c b/Ext3Fsd/close.c index c514649..ddc2b63 100644 --- a/Ext3Fsd/close.c +++ b/Ext3Fsd/close.c @@ -18,7 +18,6 @@ extern PEXT2_GLOBAL Ext2Global; /* DEFINITIONS *************************************************************/ #ifdef ALLOC_PRAGMA -#pragma alloc_text(PAGE, Ext2Close) #pragma alloc_text(PAGE, Ext2QueueCloseRequest) #pragma alloc_text(PAGE, Ext2DeQueueCloseRequest) #endif diff --git a/Ext3Fsd/cmcb.c b/Ext3Fsd/cmcb.c index aae9d28..eef0f21 100644 --- a/Ext3Fsd/cmcb.c +++ b/Ext3Fsd/cmcb.c @@ -17,21 +17,6 @@ extern PEXT2_GLOBAL Ext2Global; /* DEFINITIONS *************************************************************/ -#ifdef ALLOC_PRAGMA -#pragma alloc_text(PAGE, Ext2AcquireForLazyWrite) -#pragma alloc_text(PAGE, Ext2ReleaseFromLazyWrite) -#pragma alloc_text(PAGE, Ext2AcquireForReadAhead) -#pragma alloc_text(PAGE, Ext2ReleaseFromReadAhead) -#pragma alloc_text(PAGE, Ext2NoOpAcquire) -#pragma alloc_text(PAGE, Ext2NoOpRelease) -#pragma alloc_text(PAGE, Ext2AcquireForCreateSection) -#pragma alloc_text(PAGE, Ext2ReleaseForCreateSection) -#pragma alloc_text(PAGE, Ext2AcquireFileForModWrite) -#pragma alloc_text(PAGE, Ext2ReleaseFileForModWrite) -#pragma alloc_text(PAGE, Ext2AcquireFileForCcFlush) -#pragma alloc_text(PAGE, Ext2ReleaseFileForCcFlush) -#endif - #define CMCB_DEBUG_LEVEL DL_NVR BOOLEAN @@ -173,8 +158,8 @@ Ext2AcquireForCreateSection ( { PEXT2_FCB Fcb = FileObject->FsContext; - if (Fcb->Header.PagingIoResource != NULL) { - ExAcquireResourceExclusiveLite(Fcb->Header.PagingIoResource, TRUE); + if (Fcb->Header.Resource != NULL) { + ExAcquireResourceExclusiveLite(Fcb->Header.Resource, TRUE); } DEBUG(CMCB_DEBUG_LEVEL, ("Ext2AcquireForCreateSection: Fcb=%p\n", Fcb)); @@ -190,8 +175,8 @@ Ext2ReleaseForCreateSection ( DEBUG(CMCB_DEBUG_LEVEL, ("Ext2ReleaseForCreateSection: Fcb=%p\n", Fcb)); - if (Fcb->Header.PagingIoResource != NULL) { - ExReleaseResourceLite(Fcb->Header.PagingIoResource); + if (Fcb->Header.Resource != NULL) { + ExReleaseResourceLite(Fcb->Header.Resource); } } diff --git a/Ext3Fsd/create.c b/Ext3Fsd/create.c index 84c5472..dfa1253 100644 --- a/Ext3Fsd/create.c +++ b/Ext3Fsd/create.c @@ -450,7 +450,7 @@ Ext2LookupFile ( } /* set inode attribute */ - if (Ext2IsReadOnly(Mcb->Inode.i_mode)) { + if (Ext2IsOwnerReadOnly(Mcb->Inode.i_mode)) { SetFlag(Mcb->FileAttr, FILE_ATTRIBUTE_READONLY); } @@ -857,8 +857,7 @@ McbExisting: PathName.Length -=2; PathName.Buffer[PathName.Length/2] = 0; } else { - Status = STATUS_NOT_A_DIRECTORY; - __leave; + DirectoryFile = TRUE; } } @@ -959,6 +958,11 @@ Dissecting: __leave; } + if (Ext2IsOwnerReadOnly(ParentFcb->Mcb->Inode.i_mode)) { + Status = STATUS_ACCESS_DENIED; + __leave; + } + if (IsFlagOn(Vcb->Flags, VCB_WRITE_PROTECTED)) { IoSetHardErrorOrVerifyDevice( IrpContext->Irp, Vcb->Vpb->RealDevice ); @@ -1142,6 +1146,18 @@ Openit: } } + // Check readonly flag + if (Ext2IsOwnerReadOnly(Mcb->Inode.i_mode)) { + if (BooleanFlagOn(DesiredAccess, FILE_WRITE_DATA | FILE_APPEND_DATA | + FILE_ADD_SUBDIRECTORY | FILE_DELETE_CHILD)) { + Status = STATUS_ACCESS_DENIED; + __leave; + } else if (IsFlagOn(Options, FILE_DELETE_ON_CLOSE )) { + Status = STATUS_CANNOT_DELETE; + __leave; + } + } + Fcb = Mcb->Fcb; if (Fcb == NULL) { @@ -1387,6 +1403,7 @@ Openit: if (!IsDirectory(Fcb)) { if (NoIntermediateBuffering) { Fcb->NonCachedOpenCount++; + SetFlag(IrpSp->FileObject->Flags, FO_CACHE_SUPPORTED); } else { SetFlag(IrpSp->FileObject->Flags, FO_CACHE_SUPPORTED); } diff --git a/Ext3Fsd/dirctl.c b/Ext3Fsd/dirctl.c index a957efa..3d9a37e 100644 --- a/Ext3Fsd/dirctl.c +++ b/Ext3Fsd/dirctl.c @@ -184,7 +184,7 @@ Ext2ProcessEntry( FileAttributes = FILE_ATTRIBUTE_NORMAL; } - if (Ext2IsReadOnly(Inode.i_mode)) { + if (Ext2IsOwnerReadOnly(Inode.i_mode)) { SetFlag(FileAttributes, FILE_ATTRIBUTE_READONLY); } } @@ -364,7 +364,7 @@ Ext2IsWearingCloak( /* checking name prefix */ if (Vcb->bHidingPrefix) { PatLen = strlen(&Vcb->sHidingPrefix[0]); - if (PatLen <= OemName->Length) { + if (PatLen > 0 && PatLen <= OemName->Length) { if ( _strnicmp( OemName->Buffer, Vcb->sHidingPrefix, PatLen ) == 0) { @@ -376,7 +376,7 @@ Ext2IsWearingCloak( /* checking name suffix */ if (Vcb->bHidingSuffix) { PatLen = strlen(&Vcb->sHidingSuffix[0]); - if (PatLen <= OemName->Length) { + if (PatLen > 0 && PatLen <= OemName->Length) { if ( _strnicmp(&OemName->Buffer[OemName->Length - PatLen], Vcb->sHidingSuffix, PatLen ) == 0) { return TRUE; diff --git a/Ext3Fsd/except.c b/Ext3Fsd/except.c index f1cd0a4..405d606 100644 --- a/Ext3Fsd/except.c +++ b/Ext3Fsd/except.c @@ -17,12 +17,6 @@ extern PEXT2_GLOBAL Ext2Global; /* DEFINITIONS *************************************************************/ -#ifdef ALLOC_PRAGMA -#pragma alloc_text(PAGE, Ext2ExceptionFilter) -#pragma alloc_text(PAGE, Ext2ExceptionHandler) -#endif - - NTSTATUS Ext2ExceptionFilter ( IN PEXT2_IRP_CONTEXT IrpContext, @@ -50,14 +44,16 @@ Ext2ExceptionFilter ( if (IrpContext) { if ((IrpContext->Identifier.Type != EXT2ICX) || - (IrpContext->Identifier.Size != sizeof(EXT2_IRP_CONTEXT))) { + (IrpContext->Identifier.Size != sizeof(EXT2_IRP_CONTEXT))) { DbgBreak(); IrpContext = NULL; } else if (IrpContext->DeviceObject) { PEXT2_VCB Vcb = NULL; Vcb = (PEXT2_VCB) IrpContext->DeviceObject->DeviceExtension; - if (Vcb->Identifier.Type == EXT2VCB) { - if (!IsMounted(Vcb)) { + if (NULL == Vcb) { + Status = EXCEPTION_EXECUTE_HANDLER; + } else { + if (Vcb->Identifier.Type == EXT2VCB && !IsMounted(Vcb)) { Status = EXCEPTION_EXECUTE_HANDLER; } } @@ -77,13 +73,13 @@ Ext2ExceptionFilter ( } if ( Status == EXCEPTION_EXECUTE_HANDLER || - FsRtlIsNtstatusExpected(ExceptionCode)) { + FsRtlIsNtstatusExpected(ExceptionCode)) { // // If the exception is expected execute our handler // DEBUG(DL_ERR, ( "Ext2ExceptionFilter: Catching exception %xh\n", - ExceptionCode)); + ExceptionCode)); Status = EXCEPTION_EXECUTE_HANDLER; @@ -140,7 +136,9 @@ Ext2ExceptionHandler (IN PEXT2_IRP_CONTEXT IrpContext) IrpSp = IoGetCurrentIrpStackLocation(Irp); Vcb = (PEXT2_VCB) IrpContext->DeviceObject->DeviceExtension; - if (Vcb->Identifier.Type != EXT2VCB) { + if (NULL == Vcb) { + Status = STATUS_INVALID_PARAMETER; + } else if (Vcb->Identifier.Type != EXT2VCB) { Status = STATUS_INVALID_PARAMETER; } else if (!IsMounted(Vcb)) { if (IsFlagOn(Vcb->Flags, VCB_DEVICE_REMOVED)) { diff --git a/Ext3Fsd/ext3/generic.c b/Ext3Fsd/ext3/generic.c index 9e98f1f..86d3ba3 100644 --- a/Ext3Fsd/ext3/generic.c +++ b/Ext3Fsd/ext3/generic.c @@ -40,9 +40,6 @@ Ext2IsBlockEmpty(PULONG BlockArray, ULONG SizeArray); #pragma alloc_text(PAGE, Ext2SaveBuffer) #pragma alloc_text(PAGE, Ext2GetBlock) -#pragma alloc_text(PAGE, Ext2BlockMap) -#pragma alloc_text(PAGE, Ext2ExtentMap) -#pragma alloc_text(PAGE, Ext2ExtentSearch) #pragma alloc_text(PAGE, Ext2UpdateVcbStat) #pragma alloc_text(PAGE, Ext2NewBlock) diff --git a/Ext3Fsd/fileinfo.c b/Ext3Fsd/fileinfo.c index 7ac4da5..4583cd0 100644 --- a/Ext3Fsd/fileinfo.c +++ b/Ext3Fsd/fileinfo.c @@ -684,7 +684,7 @@ Ext2SetFileInformation (IN PEXT2_IRP_CONTEXT IrpContext) NotifyFilter |= FILE_NOTIFY_CHANGE_ATTRIBUTES; if (IsFlagOn(FBI->FileAttributes, FILE_ATTRIBUTE_READONLY)) { - Ext2SetReadOnly(Inode->i_mode); + Ext2SetOwnerReadOnly(Inode->i_mode); } else { Ext2SetOwnerWritable(Inode->i_mode); } diff --git a/Ext3Fsd/fsctl.c b/Ext3Fsd/fsctl.c index 15a9ef5..e9d7cde 100644 --- a/Ext3Fsd/fsctl.c +++ b/Ext3Fsd/fsctl.c @@ -1573,6 +1573,7 @@ Ext2MountVolume (IN PEXT2_IRP_CONTEXT IrpContext) } SetLongFlag(Vcb->Flags, VCB_MOUNTED); + SetFlag(Vcb->Vpb->Flags, VPB_MOUNTED); Ext2InsertVcb(Vcb); Vcb = NULL; Vpb = NULL; @@ -1794,7 +1795,6 @@ Ext2VerifyVolume (IN PEXT2_IRP_CONTEXT IrpContext) } ASSERT(NULL != ext2_sb); - if ((ext2_sb->s_magic == EXT2_SUPER_MAGIC) && (memcmp(ext2_sb->s_uuid, SUPER_BLOCK->s_uuid, 16) == 0) && (memcmp(ext2_sb->s_volume_name, SUPER_BLOCK->s_volume_name, 16) ==0)) { diff --git a/Ext3Fsd/include/ext2fs.h b/Ext3Fsd/include/ext2fs.h index 7b4bc96..33619e8 100644 --- a/Ext3Fsd/include/ext2fs.h +++ b/Ext3Fsd/include/ext2fs.h @@ -355,12 +355,14 @@ Ext2ClearFlag(PULONG Flags, ULONG FlagBit) #define S_ISREADABLE(m) (((m) & S_IPERMISSION_MASK) == (S_IRUSR | S_IRGRP | S_IROTH)) #define S_ISWRITABLE(m) (((m) & S_IPERMISSION_MASK) == (S_IWUSR | S_IWGRP | S_IWOTH)) -#define Ext2SetReadable(m) (m) = ((m) | (S_IRUSR | S_IRGRP | S_IROTH)) -#define Ext2SetWritable(m) (m) = ((m) | (S_IWUSR | S_IWGRP | S_IWOTH)) -#define Ext2SetOwnerWritable(m) (m) = ((m) | (S_IWUSR)) +#define Ext2SetReadable(m) do {(m) = (m) | (S_IRUSR | S_IRGRP | S_IROTH);} while(0) +#define Ext2SetWritable(m) do {(m) = (m) | (S_IWUSR | S_IWGRP | S_IWOTH);} while(0) -#define Ext2SetReadOnly(m) (m) = ((m) & (~(S_IWUSR | S_IWGRP | S_IWOTH))) -#define Ext2IsReadOnly(m) (!((m) & (S_IWUSR | S_IWGRP | S_IWOTH))) +#define Ext2SetOwnerWritable(m) do {(m) |= S_IWUSR;} while(0)
+#define Ext2SetOwnerReadOnly(m) do {(m) &= ~S_IWUSR;} while(0) +#define Ext2IsOwnerReadOnly(m) (!((m) & S_IWUSR))
+ +#define Ext2SetReadOnly(m) do {(m) &= ~(S_IWUSR | S_IWGRP | S_IWOTH);} while(0) /* * We need 8-bytes aligned for all the sturctures diff --git a/Ext3Fsd/lock.c b/Ext3Fsd/lock.c index 1b2a3fc..93d5e23 100644 --- a/Ext3Fsd/lock.c +++ b/Ext3Fsd/lock.c @@ -25,13 +25,15 @@ NTSTATUS Ext2LockControl (IN PEXT2_IRP_CONTEXT IrpContext) { PDEVICE_OBJECT DeviceObject; - BOOLEAN CompleteContext = TRUE; - BOOLEAN CompleteIrp = TRUE; - NTSTATUS Status = STATUS_UNSUCCESSFUL; PFILE_OBJECT FileObject; PEXT2_FCB Fcb; PIRP Irp; + NTSTATUS Status = STATUS_UNSUCCESSFUL; + BOOLEAN CompleteContext = TRUE; + BOOLEAN CompleteIrp = TRUE; + BOOLEAN bFcbAcquired = FALSE; + __try { ASSERT(IrpContext != NULL); @@ -49,9 +51,7 @@ Ext2LockControl (IN PEXT2_IRP_CONTEXT IrpContext) FileObject = IrpContext->FileObject; Fcb = (PEXT2_FCB) FileObject->FsContext; - ASSERT(Fcb != NULL); - if (Fcb->Identifier.Type == EXT2VCB) { Status = STATUS_INVALID_PARAMETER; __leave; @@ -65,6 +65,9 @@ Ext2LockControl (IN PEXT2_IRP_CONTEXT IrpContext) __leave; } + ExAcquireResourceSharedLite(&Fcb->MainResource, TRUE); + bFcbAcquired = TRUE; + Irp = IrpContext->Irp; CompleteIrp = FALSE; @@ -102,6 +105,10 @@ Ext2LockControl (IN PEXT2_IRP_CONTEXT IrpContext) } __finally { + if (bFcbAcquired) { + ExReleaseResourceLite(&Fcb->MainResource); + } + if (!IrpContext->ExceptionInProgress) { if (!CompleteIrp) { diff --git a/Ext3Fsd/memory.c b/Ext3Fsd/memory.c index f26110a..f51b89e 100644 --- a/Ext3Fsd/memory.c +++ b/Ext3Fsd/memory.c @@ -29,18 +29,14 @@ extern PEXT2_GLOBAL Ext2Global; #pragma alloc_text(PAGE, Ext2CountExtents) #pragma alloc_text(PAGE, Ext2JointExtents) #pragma alloc_text(PAGE, Ext2DestroyExtentChain) -#pragma alloc_text(PAGE, Ext2BuildExtents) #pragma alloc_text(PAGE, Ext2ListExtents) #pragma alloc_text(PAGE, Ext2CheckExtent) #pragma alloc_text(PAGE, Ext2AddVcbExtent) #pragma alloc_text(PAGE, Ext2RemoveVcbExtent) -#pragma alloc_text(PAGE, Ext2LookupVcbExtent) #pragma alloc_text(PAGE, Ext2ClearAllExtents) #pragma alloc_text(PAGE, Ext2AddMcbExtent) #pragma alloc_text(PAGE, Ext2RemoveMcbExtent) -#pragma alloc_text(PAGE, Ext2LookupMcbExtent) #pragma alloc_text(PAGE, Ext2AddBlockExtent) -#pragma alloc_text(PAGE, Ext2LookupBlockExtent) #pragma alloc_text(PAGE, Ext2RemoveBlockExtent) #pragma alloc_text(PAGE, Ext2BuildName) #pragma alloc_text(PAGE, Ext2AllocateMcb) @@ -1955,9 +1951,9 @@ Ext2ParseRegistryVolumeParams( UCHAR DrvLetter[4]; BOOLEAN bWriteSupport = FALSE, - bCheckBitmap = FALSE, - bCodeName = FALSE, - bMountPoint = FALSE; + bCheckBitmap = FALSE, + bCodeName = FALSE, + bMountPoint = FALSE; struct { PWCHAR Name; /* parameters name */ PBOOLEAN bExist; /* is it contained in params */ @@ -2503,12 +2499,16 @@ Ext2InitializeVcb( IN PEXT2_IRP_CONTEXT IrpContext, Status = STATUS_UNRECOGNIZED_VOLUME; __leave; } + features = EXT3_HAS_RO_COMPAT_FEATURE(&Vcb->sb, ~EXT3_FEATURE_RO_COMPAT_SUPP); if (features) { printk(KERN_ERR "EXT3-fs: %s: couldn't mount RDWR because of " "unsupported optional features (%x).\n", Vcb->sb.s_id, le32_to_cpu(features)); - SetLongFlag(Vcb->Flags, VCB_READ_ONLY); + if (IsFlagOn(Ext2Global->Flags, EXT3_FORCE_WRITING)) { + } else { + SetLongFlag(Vcb->Flags, VCB_READ_ONLY); + } } has_huge_files = EXT3_HAS_RO_COMPAT_FEATURE(&Vcb->sb, diff --git a/Ext3Fsd/notes.txt b/Ext3Fsd/notes.txt index 95d5c48..754f4dc 100644 --- a/Ext3Fsd/notes.txt +++ b/Ext3Fsd/notes.txt @@ -1,18 +1,20 @@ ==================================
-Release Notes for Ext2Fsd V0.51
+Release Notes for Ext2Fsd V0.52
==================================
-Features implemented or bugfix since V0.50:
+Features implemented or bugfix since V0.51:
- 1, FIXME: Data corruption issue, especially for multiple-thread
- writing on XP system
- 2, FIXME: Set ValidDataLength only for FileEndOfFileInformation
- w/ AdvanceOnly
- 3, Support writing to ext4 volumes w/ flex_bg
- 4, Code cleanup and enhancement for global/volume property settings
+ 1, Feature: Windows 8 supported
+ 2, Feature: Force-writing supported
+ 3, FIXME: data loss with TeraCopy when moving directories
+ 4, FIXME: ATTO Disk Benchnmark fails with direct i/o tests
+ 5, FIXME: files become invisible with empty hidden pattens
+ 6, FIXME: possible hang with concurrent access attempts
+ upon the same file
+ 7, FIXME: BSOD due to pagable code sections
-Supported Ext3/4 features by 0.51:
+Supported Ext3/4 features by 0.52:
1, flexible inode size: > 128 bytes, up to block size
2, dir_index: htree directory index
@@ -25,9 +27,11 @@ Supported Ext3/4 features by 0.51: 9, flex_bg: first flexible metadata group
Unsupported Ext3/4 features:
+
1, journal: log-based operations, external journal
2, extent: size truncating & expanding, file deletion
3, EA (extended attributes), ACL support
+ 4, symlink creation
Features to be implemented in future:
@@ -37,11 +41,6 @@ Features to be implemented in future: 4, Automatic check & update of new versions
5, LVM support, e2fsprogs porting for Windows
- Since 0.38, Ext2fsd is much stable even under heavy i/o loads,
- both for reading and writing. Performance and stability are
- highly, improved especially stability. A new and strong era of
- Ext2Fsd in product shape is coming :)
-
WARNINGS:
The driver may crash your system and ruin your data unexpectedly,
diff --git a/Ext3Fsd/read.c b/Ext3Fsd/read.c index e3528b3..230e422 100644 --- a/Ext3Fsd/read.c +++ b/Ext3Fsd/read.c @@ -26,16 +26,6 @@ Ext2ReadFile (IN PEXT2_IRP_CONTEXT IrpContext); NTSTATUS Ext2ReadVolume (IN PEXT2_IRP_CONTEXT IrpContext); -#ifdef ALLOC_PRAGMA -#pragma alloc_text(PAGE, Ext2CompleteIrpContext) -#pragma alloc_text(PAGE, Ext2Read) -#pragma alloc_text(PAGE, Ext2ReadVolume) -#pragma alloc_text(PAGE, Ext2ReadInode) -#pragma alloc_text(PAGE, Ext2ReadFile) -#pragma alloc_text(PAGE, Ext2ReadComplete) - -#endif - /* FUNCTIONS *************************************************************/ NTSTATUS diff --git a/Ext3Fsd/readme.txt b/Ext3Fsd/readme.txt index 2d27a22..388d0b6 100644 --- a/Ext3Fsd/readme.txt +++ b/Ext3Fsd/readme.txt @@ -2,10 +2,9 @@ About Ext2Fsd
======================
-The Ext2Fsd project is an ext2 file system driver for WinNT/2000/XP.
+Ext2Fsd project is an ext2 file system driver for Windows (2000/2003/XP/7/8).
-It's a free software and everyone can distribute and modify it under
-GNU GPL.
+It's a free software. Everyone can distribute and modify it under GNU GPLv2.
======================
Author & Homepage
@@ -29,6 +28,19 @@ Everyone can get to him at http://www.acc.umu.se/~bosse/. Revision history
======================
+43, V0.52: 2014-05-10
+
+Modifications from V0.51:
+
+ 1, Feature: Windows 8 supported
+ 2, Feature: Force-writing supported
+ 3, FIXME: data loss with TeraCopy when moving directories
+ 4, FIXME: ATTO Disk Benchnmark fails with direct i/o tests
+ 5, FIXME: files become invisible with empty hidden pattens
+ 6, FIXME: possible hang with concurrent access attempts
+ upon the same file
+ 7, FIXME: BSOD due to pagable code sections
+
42, V0.51: 2011-07-10
Modifications from V0.50:
diff --git a/Ext3Fsd/write.c b/Ext3Fsd/write.c index 176db0c..1fb169f 100644 --- a/Ext3Fsd/write.c +++ b/Ext3Fsd/write.c @@ -56,16 +56,6 @@ Ext2WriteVolume (IN PEXT2_IRP_CONTEXT IrpContext); VOID Ext2DeferWrite(IN PEXT2_IRP_CONTEXT, PIRP Irp); -#ifdef ALLOC_PRAGMA -#pragma alloc_text(PAGE, Ext2FloppyFlush) -#pragma alloc_text(PAGE, Ext2StartFloppyFlushDpc) -#pragma alloc_text(PAGE, Ext2ZeroHoles) -#pragma alloc_text(PAGE, Ext2Write) -#pragma alloc_text(PAGE, Ext2WriteVolume) -#pragma alloc_text(PAGE, Ext2WriteInode) -#pragma alloc_text(PAGE, Ext2WriteFile) -#pragma alloc_text(PAGE, Ext2WriteComplete) -#endif /* FUNCTIONS *************************************************************/ @@ -220,9 +210,9 @@ Ext2WriteVolume (IN PEXT2_IRP_CONTEXT IrpContext) ULONG Length; LARGE_INTEGER ByteOffset; - BOOLEAN PagingIo; - BOOLEAN Nocache; - BOOLEAN SynchronousIo; + BOOLEAN PagingIo = FALSE; + BOOLEAN Nocache = FALSE; + BOOLEAN SynchronousIo = FALSE; BOOLEAN MainResourceAcquired = FALSE; BOOLEAN bDeferred = FALSE; @@ -756,15 +746,16 @@ Ext2WriteFile(IN PEXT2_IRP_CONTEXT IrpContext) ULONG ReturnedLength = 0; BOOLEAN OpPostIrp = FALSE; - BOOLEAN PagingIo; - BOOLEAN Nocache; - BOOLEAN SynchronousIo; + BOOLEAN PagingIo = FALSE; + BOOLEAN Nocache = FALSE; + BOOLEAN SynchronousIo = FALSE; BOOLEAN RecursiveWriteThrough = FALSE; BOOLEAN MainResourceAcquired = FALSE; BOOLEAN PagingIoResourceAcquired = FALSE; BOOLEAN bDeferred = FALSE; + BOOLEAN UpdateFileSize = FALSE; BOOLEAN FileSizesChanged = FALSE; PUCHAR Buffer; @@ -1156,9 +1147,18 @@ Ext2WriteFile(IN PEXT2_IRP_CONTEXT IrpContext) Irp = IrpContext->Irp; } + if (NT_SUCCESS(Status) && !PagingIo) { + if (CcIsFileCached(FileObject)) { + if (!RecursiveWriteThrough && + Fcb->LazyWriterThread != PsGetCurrentThread()) + UpdateFileSize = TRUE; + } else { + UpdateFileSize = TRUE; + } + } + /* Update files's ValidDateLength */ - if (NT_SUCCESS(Status) && !PagingIo && CcIsFileCached(FileObject) && - !RecursiveWriteThrough && Fcb->LazyWriterThread != PsGetCurrentThread()) { + if (UpdateFileSize) { if (Fcb->Header.ValidDataLength.QuadPart < ByteOffset.QuadPart + Length) { Fcb->Header.ValidDataLength.QuadPart = ByteOffset.QuadPart + Length; |