Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
May 19, 2013, 07:59:45 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [4.3.1] It seems that something is wrong with ZoneBegin variable  (Read 764 times)
Cushy
JkDefrag Supporter
***
Posts: 17


View Profile
« on: May 21, 2010, 04:47:16 pm »

I wanted to make the size of MFT+MFT Reserved Space be the multiple of 64MB, so I wrote the script:
Code:
MakeGap( 1651904 * BytesPerCluster, DoNotVacate )

FileSelect
FullPath("C:\","$MFT") and Directory(no)
FileActions
MoveUpToZone()
Defragment()
AddGap( ZoneBegin + RoundUp( MftSize, 64MB ) )
FileEnd
The size of my MFT on C: is 157MB so the size of the MFT+MFT Reserved Space should be 192MB. That leaves around 35MB for the gap that should be produced with the help of the above AddGap() function. However the size of the produced gap turned out to be exactly 192MB (I calculated the number of clusters that constitute this gap), as if the argument of the AddGap() function was ZoneEnd + RoundUp( MftSize, 64MB ).
Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #1 on: May 21, 2010, 10:21:19 pm »

You are right. At the point in time when the AddGap statement is executed, MyDefrag has already moved the zone cursor upwards, and ZoneBegin is then in fact the end of the zone. Not the beginning of the zone, which is what you would expect. To solve this idiosyncrasy I have to completely rewrite the AddGap code, but it's rather a lot of work and I have not yet gotten around to it.

p.s. You should use the PlaceNtfsSystemFiles command to place the MFT and the NTFS reserved zone. I won't bother you with the technical details, but the MFT is not a normal file and the NTFS reserved zone is not a normal gap.
Logged
Cushy
JkDefrag Supporter
***
Posts: 17


View Profile
« Reply #2 on: May 22, 2010, 04:16:19 am »

To solve this idiosyncrasy I have to completely rewrite the AddGap code
Well there is no need to as there is a workaround. Just wanted to point out that the name of the variable in this case is ambiguous.
Quote
You should use the PlaceNtfsSystemFiles command to place the MFT and the NTFS reserved zone
Nah, I prefer my way of sorting these metafiles.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!