Re: [PATCH] e4defrag: fallocate donor file only once

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sep 02, 2009  18:09 -0400, Greg Freemyer wrote:
> On Wed, Sep 2, 2009 at 11:35 AM, Peng Tao<bergwolf@xxxxxxxxx> wrote:
> > If we allocate the donor file once for all, it will have a better chance
> > to be continuous.
> >
> > Signed-off-by: "Peng Tao" <bergwolf@xxxxxxxxx>
> 
> Seems like an improvement, but I'm not seeing any special handling for
> sparse files.  (Not before or after this patch.)
> 
> Seems like there should be an outer loop that identifies contiguous
> data block sets in a sparse file and defrags them individually as
> opposed to trying to defrag the entire file at once.
> 
> My impression is that with a large sparse file, e4defrag currently
> (with or without this patch) would fallocate a full non-sparse donor
> set of blocks the full size of the original file, then swap in just
> the truly allocated blocks?
> 
> If so, that is not very optimum.

And of course FIEMAP can be used to easily determine if the file is sparse.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux