linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: Peng Tao <bergwolf@gmail.com>
Cc: linux-ext4@vger.kernel.org, Andreas Dilger <adilger@sun.com>
Subject: Re: [PATCH-e2fsprogs-resend] filefrag: fix fm_start in filefrag_fiemap loop
Date: Thu, 2 Jul 2009 00:24:59 -0400	[thread overview]
Message-ID: <20090702042459.GB22615@mit.edu> (raw)
In-Reply-To: <1244078320-13888-1-git-send-email-bergwolf@gmail.com>

On Thu, Jun 04, 2009 at 09:18:40AM +0800, Peng Tao wrote:
> When used with -v and the targeted file has more than 144 extents(double of
> the length of fm_extents array provided by buf), filefrag_fiemap loops and
> calls fiemap ioctl() multiple times to calculate the actual number of extents
> in a file. Each call to fiemap ioctl() uses  fm_start as the starting logical
> offset. The patch fixes fm_start in each loop( except for the first one) and
> makes the extent calculation correct for files with more that 144 extents.  
> 
> To produce the problem, first run filefrag -v on a highly fragmented file.
> Then change the buf size in filefrag_fiemap to make it large enough to have
> all the extent mapped in a single loop and run filefrag -v after recompiling.
> The former will produce a much smaller extent count because of the false
> fm_start used in the loop. And the two will produce different extent output
> since the 145th extent.

Thanks, applied.

						- Ted

      reply	other threads:[~2009-07-02  4:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-04  1:18 [PATCH-e2fsprogs-resend] filefrag: fix fm_start in filefrag_fiemap loop Peng Tao
2009-07-02  4:24 ` Theodore Tso [this message]

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=20090702042459.GB22615@mit.edu \
    --to=tytso@mit.edu \
    --cc=adilger@sun.com \
    --cc=bergwolf@gmail.com \
    --cc=linux-ext4@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).