On Tue, 28 Nov 2006, Anton Altaparmakov wrote:
> On Tue, 2006-11-28 at 14:20 +0100, Szakacsits Szabolcs wrote:
> > 
> > relocate_inodes(), relocate_inode(), especially the $MFT part. There is a
> > strict order in what and when is relocated. At some point ntfs_volume is
> > mostly used only for reading and a new NTFS gets written.
> 
> That is not true, at least not in the code that I am reading here!  It
> may have been your intention perhaps but you failed to code it...

Then it wouldn't have worked. 

> relocate_inodes() -> relocate_inode() -> at the end of the function
> calls write_mft_record() which uses the ntfs_volume and the libntfs
> function ntfs_mft_record_write() to do the writing.

Think about relocating $MFT.
 
> After that we have truncate_badclust_file() and truncate_bitmap_file()
> both of which use write_mft_record() also...

The beginning of the $MFT is never relocated, so the MFT records belonging
to these files can be safely modified in place, otherwise resizing is
restricted to a safe size.

> Remember that what you were doing was not working for Vista and it works
> now...

I didn't have time to check the patches yet but wasn't the Vista problem due
to a bug in libntfs and not because of ntfsresize?

You seem to mix here two different problems: the missing log file reset in
libntfs and the unsafe umount you introduced by another patch to ntfsresize
because you thought that it was missing by accident.
 
> Anyway, given ntfsresize is your code, if you want to insist on not
> allowing unmounting, then can you please tell me the exact point in the
> code at which unmounting becomes dangerous/wrong 

I must think about it. The design rule was being always consistent or
trivially recoverable whenever we exit immediately without any cleanup.

> > There is a huge difference between the "works for me" and "always works".
> 
> Certainly but given it was broken to start with "works for me" and
> "never works for Vista" is more like the real comparison here and the
> "works for me" is a big improvement...  (-;

The first patch seems to fixed Vista, the next one broke all of them in
certain scenarios.

        Szaka



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to