Eric Sandeen <sandeen@xxxxxxxxxxx> writes:
> Just Marc wrote:
>
> > 2. Files for which 'No improvement will be made' should also be marked
> > as no-defrag, this will avoid a ton of extra work in the future.
>
> But... that file could drastically change in the future, no? Just
> because it can't be improved now doesn't necessarily mean that it should
> never be revisited on subsequent runs, does it?
I guess one could define an additional dont-defrag (or perhaps
rather already-defrag) flag that is always
cleared when the file changes. That could be safely set here.
But then I'm not sure it would be worth the effort. Why would you
run fsr that often that it matters?
Also I would expect that one can easily detect in many cases an defragmented
file by looking at the number of extents in the inode only and that would
make it equivalent to the flag. The cases where this is not the case
are probably rare too.
-Andi