![]() |
UltraDefrag Engine Architecture - Reference Manual - Guides |
|
Functions | |
void | MovePartOfFileBlock (PFILENAME pfn, ULONGLONG startVcn, ULONGLONG targetLcn, ULONGLONG n_clusters) |
Moves a part of file. | |
void | DefragmentFreeSpaceRTL (void) |
Defragments the free space by moving all files to the beginning part of the volume. | |
void | DefragmentFreeSpaceLTR (void) |
Defragments the free space by moving all files to the terminal part of the volume. | |
int | MoveAllFilesRTL (void) |
Moves all files to the beginning part of the volume. | |
int | OptimizationRoutine (char *volume_name) |
Performs a single pass of the volume optimization. | |
int | Optimize (char *volume_name) |
Performs a volume optimization job. | |
BOOLEAN | MoveTheUnfragmentedFile (PFILENAME pfn, ULONGLONG target) |
Moves a file containing a single fragment. |
void MovePartOfFileBlock | ( | PFILENAME | pfn, | |
ULONGLONG | startVcn, | |||
ULONGLONG | targetLcn, | |||
ULONGLONG | n_clusters | |||
) |
Moves a part of file.
[in] | pfn | pointer to the structure describing the file. |
[in] | startVcn | the starting virtual cluster number defining position inside the file. |
[in] | targetLcn | the starting logical cluster number defining position of target space on the volume. |
[in] | n_clusters | the number of clusters to move. |
Definition at line 254 of file defrag.c.
References MovePartOfFile(), and OpenTheFile().
Referenced by DefragmentFreeSpaceLTR(), and DefragmentFreeSpaceRTL().
void DefragmentFreeSpaceRTL | ( | void | ) |
Defragments the free space by moving all files to the beginning part of the volume.
Definition at line 187 of file optimize.c.
References CheckForStopEvent(), GetFileSpaceState(), IsFileLocked(), MovePartOfFileBlock(), and RemarkBlock().
void DefragmentFreeSpaceLTR | ( | void | ) |
Defragments the free space by moving all files to the terminal part of the volume.
Definition at line 255 of file optimize.c.
References CheckForStopEvent(), GetFileSpaceState(), IsFileLocked(), MovePartOfFileBlock(), and RemarkBlock().
Referenced by OptimizationRoutine().
int MoveAllFilesRTL | ( | void | ) |
Moves all files to the beginning part of the volume.
Definition at line 369 of file optimize.c.
References CheckForStopEvent(), IsFileLocked(), and MoveTheUnfragmentedFile().
Referenced by OptimizationRoutine().
int OptimizationRoutine | ( | char * | volume_name | ) |
Performs a single pass of the volume optimization.
[in] | volume_name | the name of the volume. |
AnalyzeFreeSpace(volume_name); /* refresh free space map */
Definition at line 126 of file optimize.c.
References Analyze(), CheckForStopEvent(), Defragment(), DefragmentFreeSpaceLTR(), and MoveAllFilesRTL().
Referenced by Optimize().
int Optimize | ( | char * | volume_name | ) |
Performs a volume optimization job.
[in] | volume_name | the name of the volume. |
Definition at line 50 of file optimize.c.
References CheckForStopEvent(), IsFileLocked(), and OptimizationRoutine().
Referenced by udefrag_kernel_start().
BOOLEAN MoveTheUnfragmentedFile | ( | PFILENAME | pfn, | |
ULONGLONG | target | |||
) |
Moves a file containing a single fragment.
Updates the global statistics and map.
[in] | pfn | pointer to the structure describing the file. |
[in] | target | the starting logical cluster number defining position of target space on the volume. |
Definition at line 329 of file optimize.c.
References GetFileSpaceState(), MoveBlocksOfFile(), OpenTheFile(), ProcessFreedBlock(), RemarkBlock(), and TruncateFreeSpaceBlock().
Referenced by MoveAllFilesRTL().