Gregor,
Small files are stored in-line. Once they become large enough that they
cannot be stored in-line, they are assigned to separate storage areas in the
file system. At that point, they can then be moved.
To the best of my knowledge, moving to Windows XP is not going to change the
behavior for you in this regard.
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
-----Original Message-----
From: Gregor Brunmar [mailto:xxxxx@home.se]
Sent: Thursday, October 18, 2001 6:22 PM
To: File Systems Developers
Subject: [ntfsd] RE: Cluster movement?
I have NTFS, but how come it works with large files when moving eg. 4
clusters
at the time? The MFT is unmovable on Win2K I’ve read, do I have to upgrade
to
WinXP where it can be done? But it must be done, how else does
defrag-programs
work?
/Gregor Brunmar
Tony Mason wrote:
Gregor,
Are you doing this on NTFS? If so, the problem is that the data is stored
“in-line” within the MFT entry. Thus, you can’t move the data (you would
need to move the MFT, not the file data.)
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
See the new NTFSD FAQ on the OSR Web Site!
-----Original Message-----
From: xxxxx@home.se [mailto:xxxxx@home.se]
Sent: Thursday, October 18, 2001 1:45 PM
To: File Systems Developers
Subject: [ntfsd] Cluster movement?
Is there any way to move small files? When I use DeviceIoControl with
FSCTL_MOVE_FILE on a small file, the function returnes success, but the
file isn’t moved!
Code:
firstFreeCluster = findFirstFreeCluster();
file = CreateFile(…);
MOVE_FILE_DATA move;
move.ClusterCount = 1;
move.FileHandle = file;
move.StartingVcn.QuadPart = 0;
move.StartingLcn.QuadPart = firstFreeCluster;
if( DeviceIoControl( disk, FSCTL_MOVE_FILE, &move,
sizeof(MOVE_FILE_DATA),
NULL, 0, &q, NULL) == 0 ) {
bla…
}
else
bla…
-EndOfCode-
Is there any way to move one cluster at the time, because when I execute
this code, GetLastError() returned 5. It works if I set ClusterCount to
eg.
4.
/Gregor Brunmar
You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntfsd as: xxxxx@home.se
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com