From: Sankar P <sankar.curiosity@gmail.com>
To: Kernelnewbies@kernelnewbies.org, linux-fsdevel@vger.kernel.org
Subject: How defragmentation works in linux filesystems ?
Date: Mon, 7 Jan 2013 14:57:59 +0530 [thread overview]
Message-ID: <CAMSEaH71w-4o2JP-6+4NjZbzP0drhpVysprsAPCHetuRtF7CzQ@mail.gmail.com> (raw)
Hi,
Is there any technical article explaining how defragmentation works in
linux filesystems, say btrfs or ext4 ?
Do they recreate the file data blocks and change the root pointer to
the new extent ? Or do they do some kind of moving blocks around ? Or
is it based on some other strategy ? Partial defragmentation (based on
either byte offset or extents) is also supported by any of the file
systems ?
Is there a standard way to trigger a defragmentation operation (an
ioctl ?) that my filesystem could implement so that any user space
tool that work with other fs will work with mine too ? (Like, how
FIEBMAP ioctl can help in giving the extent information for a file
from the userspace)
I googled a bit to find any articles explaining this. But could not
get anything the design. So links to any documentation, article
explaining the linux filesystems' way of defragmenting are welcome.
Thanks.
--
Sankar P
http://psankar.blogspot.com
next reply other threads:[~2013-01-07 9:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-07 9:27 Sankar P [this message]
2013-01-15 21:23 ` How defragmentation works in linux filesystems ? Phillip Susi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMSEaH71w-4o2JP-6+4NjZbzP0drhpVysprsAPCHetuRtF7CzQ@mail.gmail.com \
--to=sankar.curiosity@gmail.com \
--cc=Kernelnewbies@kernelnewbies.org \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).