Blame SOURCES/xfsprogs-4.7.0-defang-frag.patch

4a5a34
commit 027e6efd2b432232562d726f14702f79792b38cb
4a5a34
Author: Eric Sandeen <sandeen@sandeen.net>
4a5a34
Date:   Mon May 30 10:35:56 2016 +1000
4a5a34
4a5a34
    xfs_db: defang frag command
4a5a34
    
4a5a34
    Too many people freak out about this fictitious "fragmentation
4a5a34
    factor."  As shown in the fact, it is largely meaningless, because
4a5a34
    the number approaches 100% extremely quickly for just a few
4a5a34
    extents per file.
4a5a34
    
4a5a34
    I thought about removing it altogether, but perhaps a note
4a5a34
    about its uselessness, and a more soothing metric (avg extents
4a5a34
    per file) might be useful.
4a5a34
    
4a5a34
    Signed-off-by: Eric Sandeen <sandeen@redhat.com>
4a5a34
    Reviewed-by: Christoph Hellwig <hch@lst.de>
4a5a34
    Signed-off-by: Dave Chinner <david@fromorbit.com>
4a5a34
4a5a34
Index: xfsprogs-4.5.0/db/frag.c
4a5a34
===================================================================
4a5a34
--- xfsprogs-4.5.0.orig/db/frag.c
4a5a34
+++ xfsprogs-4.5.0/db/frag.c
4a5a34
@@ -172,6 +172,10 @@ frag_f(
4a5a34
 		answer = 0.0;
4a5a34
 	dbprintf(_("actual %llu, ideal %llu, fragmentation factor %.2f%%\n"),
4a5a34
 		extcount_actual, extcount_ideal, answer);
4a5a34
+	dbprintf(_("Note, this number is largely meaningless.\n"));
4a5a34
+	answer = (double)extcount_actual / (double)extcount_ideal;
4a5a34
+	dbprintf(_("Files on this filesystem average %.2f extents per file\n"),
4a5a34
+		answer);
4a5a34
 	return 0;
4a5a34
 }
4a5a34