Bug 1589

Summary: % of Fragmentation invalid
Product: Defrag Reporter: Christian Blackburn <MyPurchases@Yahoo.com>
Component: coreAssignee: defrag@freedos.org <defrag@freedos.org>
Status: RESOLVED WORKSFORME    
Severity: major    
Priority: P2    
Version: unspecified   
Hardware: PC   
OS: FreeDOS   

Description:   Opened: 2003-02-04 04:31
Problem:
The % of fragmentation is being reported incorrectly.  

Repro:
(On FreeCom 0.83.54 + Kernel 12/09/2002)
1.  Start Defrag 0.31
2.  Select the C Drive (fat 16, and the only hard drive/partition present, I
also have a 1.44MB A drive) and click OK

Result:
The following dialog appears:
"Recommendation
-3529% of drive C is not fragmented.  
Recommended optimization method:
Full Optimization
[Optimize][Configure]
"

Expected:
The value should be both non negative and between 0 and 100%.  

Comments:
The program seems to be coming along nicely.   
Thanks,
Christian Blackburn
------- Comment #1 From Eric (EA) 2003-03-22 17:22:01 -------
Confirmed. Gives all kinds of values to me, but could not find a pattern
in how the values are generated. I would say 100% is when 100% of the
files consist of more than one chunk (that is, have a "jump" point in
their FAT chain). Counting the chunks per file could give an additional
value to be reported: "Fragmentation ratio is 2.5" would mean an average
of 2.5 chunks per file. Optimum would be 1.0 ...

Version tested: DEFRAG 0.31, on FAT16 filesystems, FreeDOS kernel 2029.
------- Comment #2 From jhall@freedos.org 2003-11-18 13:22:30 -------
Assigning to FreeDOS_1.0 milestone. -jh
------- Comment #3 From jhall@freedos.org 2003-11-18 14:35:21 -------
Upgrading the severity from 'normal' to 'major'.  If it's on the "1.0 to-do
list", then it should be more important than a 'normal' severity.  -jh
------- Comment #4 From Eric (EA) 2004-06-04 15:11:22 -------
Cannot reproduce this anymore with DEFRAG 0.4 - both
FAT12 and FAT16 give plausible fragmentation statistics
now. However, DEFRAG attempts to defrag FAT32 even though
it does not support FAT32! The fragmentation statistics are
okay even for FAT32 (!), but the defragging itself fails.

PS: CHKDSK /R should give a progress indicator display
during surface scan (which can take very long). And it
should support disk formats like 1.68 MB (DOSFSCK does
support them, there is no special support needed beyond
the FreeDOS kernel builtin disk driver flexibility...).