UltraDefrag Engine Logo UltraDefrag Engine

Architecture - Reference Manual - Guides

Analysis

Functions

int Analyze (char *volume_name)
 Performs a volume analysis.
BOOLEAN IsFileLocked (PFILENAME pfn)
 Checks is file locked or not.
BOOLEAN IsMft (PFILENAME pfn)
 Checks whether the file is $MFT or not.
BOOLEAN IsWellKnownSystemFile (PFILENAME pfn)
 Checks is file a well known system file or not.
void RemarkWellKnownLockedFiles (void)
 Remarks space belonging to well known locked files as system.
void CheckAllFragmentedFiles (void)
 Checks all fragmented files, are they locked or not.
void CheckAllFiles (void)
 Checks all files, are they locked or not.
void GenerateFragmentedFilesList (void)
 Produces a list of fragmented files.
ULONGLONG _rdtsc (void)
 Returns the current time in milliseconds since...
ULONGLONG _rdtsc_1 (void)
 Returns the current time in nanoseconds since...

Function Documentation

int Analyze ( char *  volume_name  ) 

Performs a volume analysis.

Parameters:
[in] volume_name the name of the volume.
Returns:
Zero for success, negative value otherwise.
Bug:
Crashes the NT 4.0 system during the NTFS v1.2 volumes analysis.
Todo:
Remove a system files checking which takes a lot of time.

Definition at line 58 of file analyse.c.

References _rdtsc(), CheckForNtfsPartition(), CheckForStopEvent(), DestroyLists(), FillFreeSpaceMap(), FindFiles(), FlushAllFileBuffers(), GenerateFragmentedFilesList(), GetDriveGeometry(), MarkAllSpaceAsFree0(), MarkAllSpaceAsSystem1(), OpenVolume(), RemarkWellKnownLockedFiles(), and ScanMFT().

Referenced by OptimizationRoutine(), and udefrag_kernel_start().

BOOLEAN IsFileLocked ( PFILENAME  pfn  ) 

Checks is file locked or not.

Parameters:
[in,out] pfn pointer to structure describing the file.
Returns:
Boolean value indicating is file locked or not.
Note:
  • Side effect: pfn->blockmap becomes to be equal to NULL if the file is locked.
  • Kalle Koseck (http://dosbatchsubs.sourceforge.net/) suggested me to move all file checking to defragmenter/optimizer to dramatically speed up an analysis. Thus this function born.

Definition at line 188 of file analyse.c.

References OpenTheFile(), and RemarkFileSpaceAsSystem().

Referenced by CheckAllFiles(), CheckAllFragmentedFiles(), Defragment(), DefragmentFreeSpaceLTR(), DefragmentFreeSpaceRTL(), MoveAllFilesRTL(), and Optimize().

BOOLEAN IsMft ( PFILENAME  pfn  ) 

Checks whether the file is $MFT or not.

Parameters:
[in] pfn pointer to structure describing the file.
Returns:
Boolean value indicating whether the file is $MFT or not.
Note:
Optimized for speed.

Definition at line 234 of file analyse.c.

Referenced by GetFileSpaceState(), and IsWellKnownSystemFile().

BOOLEAN IsWellKnownSystemFile ( PFILENAME  pfn  ) 

Checks is file a well known system file or not.

Parameters:
[in] pfn pointer to structure describing the file.
Returns:
Boolean value indicating is file a well known system file or not.
Note:
Optimized for speed.

Definition at line 268 of file analyse.c.

References IsMft().

Referenced by RemarkWellKnownLockedFiles().

void RemarkWellKnownLockedFiles ( void   ) 

Remarks space belonging to well known locked files as system.

Todo:
Speedup desired.

Definition at line 326 of file analyse.c.

References _rdtsc(), IsWellKnownSystemFile(), OpenTheFile(), and RemarkFileSpaceAsSystem().

Referenced by Analyze().

void CheckAllFragmentedFiles ( void   ) 

Checks all fragmented files, are they locked or not.

Note:
Works slow.

Definition at line 368 of file analyse.c.

References _rdtsc(), and IsFileLocked().

void CheckAllFiles ( void   ) 

Checks all files, are they locked or not.

Note:
Works slow.

Definition at line 397 of file analyse.c.

References _rdtsc(), and IsFileLocked().

ULONGLONG _rdtsc ( void   ) 

Returns the current time in milliseconds since...

Returns:
Time, in milliseconds.
Note:
  • Useful for the performance measures.
  • Has no physical meaning.

Definition at line 443 of file analyse.c.

References _rdtsc_1().

Referenced by Analyze(), BuildPaths(), CheckAllFiles(), CheckAllFragmentedFiles(), ReadSectors(), RemarkWellKnownLockedFiles(), SaveReportToDisk(), and ScanMFT().

ULONGLONG _rdtsc_1 ( void   ) 

Returns the current time in nanoseconds since...

Returns:
Time, in nanoseconds. Zero indicates failure.
Note:
  • Useful for the performance measures.
  • Has no physical meaning.

Definition at line 455 of file analyse.c.

Referenced by _rdtsc().


Generated on Sat May 29 23:06:46 2010 for UltraDefrag Engine by doxygen 1.6.2