xfs
[Top] [All Lists]

Re: Clarification

To: Juri Haberland <juri@xxxxxxxxxxxxxx>
Subject: Re: Clarification
From: Chris Wedgwood <cw@xxxxxxxx>
Date: Fri, 20 Sep 2002 12:43:26 -0700
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <3D8B75DC.1010305@koschikode.com>
References: <3D8B03F4.497B7EE4@tataelxsi.co.in> <20020920190749.GB10692@tapu.f00f.org> <3D8B75DC.1010305@koschikode.com>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4i
On Fri, Sep 20, 2002 at 09:24:12PM +0200, Juri Haberland wrote:

> Out of curiosity, could you elaborate on this a little bit?

Sure.

xfs_fsr defragments file be looking at which files are fragmented,
create a new file preallocating space for a defragmented version of
that file an copying the old file to the new file.

However, xfs_fsr doesn't always know reliably when it can and cannot
further defragment files.  I mad fixed to my local version here when I
saw it was trying to defragment files that *must* span multiple AGs
because of their size (technically it's not the file size, but
aggregated size of adjacent extents as holes don't count).

Whe the file is copied, it tests to see if the original has changed
and then 'swaps' the extents from the old to the new.

Because xfs_fsr 'copies' the data, it's actually rather slow and can
(usually) does slow access to the fs noticeably.  It also means you
cannot defragment files which are in use.

The other things to consider is that it defagments *files* not
filesystems, so potentially as you defragment files, you fragment free
space.  (I'm not sure in reality of this is a problem though, in
practise if your filesystem is large compared to you average file size
then probaby not).


On last this to consider, a recent minor security fix means xfs_fsr
cannot defragment non-root owned files...



  --cw


<Prev in Thread] Current Thread [Next in Thread>