From: Theodore Ts'o <tytso@mit.edu>
To: Eric Sandeen <sandeen@redhat.com>
Cc: ext4 development <linux-ext4@vger.kernel.org>, maxnet@onlinehome.de
Subject: Re: filefrag: Fix segfault on virtual fs
Date: Sat, 28 Jul 2012 17:43:12 -0400 [thread overview]
Message-ID: <20120728214312.GA8073@thunk.org> (raw)
In-Reply-To: <4FE9C02C.8040703@redhat.com>
On Tue, Jun 26, 2012 at 03:59:08AM -0000, Eric Sandeen wrote:
> filefrag on a virtual fs like proc segfaults:
>
> # filefrag /proc/filesystems
> Floating point exception
>
> because stat.f_blocks is 0, so the calculation of cylgroups is 0,
> which leads to a divide by 0 when calculating expected extents.
>
> Since it's only used for ext2 filesystems anyway, just move
> the calculation of expected under "if (is_ext2)" to fix this.
>
> Reported-by: Max Beikirch <maxnet@onlinehome.de>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Applied, thanks.
- Ted
prev parent reply other threads:[~2012-07-28 21:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-26 13:59 [PATCH] filefrag: Fix segfault on virtual fs Eric Sandeen
2012-07-28 21:43 ` Theodore Ts'o [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=20120728214312.GA8073@thunk.org \
--to=tytso@mit.edu \
--cc=linux-ext4@vger.kernel.org \
--cc=maxnet@onlinehome.de \
--cc=sandeen@redhat.com \
/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).