On Thu, 12 Dec 2002, Szakacsits Szabolcs wrote:
> Hi,
>
> Great report Leonard :) Apparently libntfs couldn't handle the
> situation when MFT had extents (very fragmented MFT). Attached patch
> should fix it.
>
> Anton, the patch has 3 fixes, small but they are important:
>
> 1. ntfs_external_attr_find don't loop more then it should
applied, thanks. well spotted.
> 2. ntfs_extent_inode_open: fix a negation typo causing
> memory corruptions
applied, thanks. well spotted again. I had actually fixed this exactly
same bug ages ago in the NTFS kernel driver but I obviously had forgotten
to port the fix to the library. A very annoying oversight on my part!
> 3. ntfs_extent_inode_open: extents are copied to a newly
> allocated memory. Before using just the pointer equality the
> memory was freed by the extent and the base inode happily used
> the unfreed memory => severe memory corruptions.
I don't understand this description and I don't understand why you are
doing the copying. What exactly is wrong and where are the memory
corruptions? - Your fix 2. from above should cure everything. The memory
allocations and copying are already done in the if clause fixed by point
2 so I don't see why you repeat them again here. What am I missing?
> I tested ntfsresize with the fix on several partitions and everything
> is ok (ntfsresize has severe cluster accounting/checks), except now
> the fragmented MFT case also works. Would you also try Leonard?
Cool. He just told me on irc:
---quote---
seems the patch gets me past the overlapping runlists problem but, I get
11298 messages saying Couldn't read MFT record %n (where %n is the record
number, of course).
---eoq---
Best regards,
Anton
--
Anton Altaparmakov <aia21 at cantab.net> (replace at with @)
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/
|