diff options
author | Matt Wu <matt@ext2fsd.com> | 2017-10-31 05:00:05 +0300 |
---|---|---|
committer | Matt Wu <matt@ext2fsd.com> | 2017-10-31 05:00:05 +0300 |
commit | 2aaba01aaca9ea5594d4cf1b3725e27cfa25ba06 (patch) | |
tree | 18365395c8b0f042ccdb62b670ffb534031b0b7d /Ext3Fsd | |
parent | b7657e58d1cf6347ac711cc0136f0c22a29cb1b1 (diff) |
FIXME: possible extent overlapping issue (ever happened with ReactOS)
Diffstat (limited to 'Ext3Fsd')
-rw-r--r-- | Ext3Fsd/write.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Ext3Fsd/write.c b/Ext3Fsd/write.c index f3331ce..f2528d4 100644 --- a/Ext3Fsd/write.c +++ b/Ext3Fsd/write.c @@ -491,7 +491,7 @@ Ext2WriteVolume (IN PEXT2_IRP_CONTEXT IrpContext) } Extent->Irp = NULL; - Extent->Lba = DirtyLba; + Extent->Lba = DirtyStart; Extent->Offset = (ULONG)( DirtyStart + Length - RemainLength - DirtyLba ); ASSERT(Extent->Offset <= Length); @@ -504,14 +504,17 @@ Ext2WriteVolume (IN PEXT2_IRP_CONTEXT IrpContext) RemainLength = 0; } else { Extent->Length = (ULONG)(DirtyLength + DirtyLba - DirtyStart); + RemainLength = RemainLength - Extent->Length; +/* RemainLength = (DirtyStart + RemainLength) - (DirtyLba + DirtyLength); +*/ ASSERT(RemainLength <= (LONGLONG)Length); ASSERT(Extent->Length <= Length); } ASSERT(Extent->Length >= SECTOR_SIZE); - DirtyLba = DirtyStart + DirtyLength; + DirtyLba = DirtyStart + Extent->Length; if (List) { List->Next = Extent; |