lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A7A434B.9090007@redhat.com>
Date:	Wed, 05 Aug 2009 21:43:23 -0500
From:	Eric Sandeen <sandeen@...hat.com>
To:	ext4 development <linux-ext4@...r.kernel.org>
Subject: [PATCH] filefrag: fix frag count in bmap case

The fragmentation count in the bmap case seems to be
off by one:

# echo foo > /mnt/test/bar
# filefrag /mnt/test/bar
/mnt/test/bar: 0 extents found

Signed-off-by: Eric Sandeen <sandeen@...hat.com>
---

diff --git a/misc/filefrag.c b/misc/filefrag.c
index eed2b86..128a391 100644
--- a/misc/filefrag.c
+++ b/misc/filefrag.c
@@ -342,6 +342,8 @@ static void frag_report(const char *filename)
 			rc = get_bmap(fd, i, &block);
 			if (block == 0)
 				continue;
+			if (!num_extents)
+				num_extents++;
 			count++;
 			if (last_block && (block != last_block+1) ) {
 				if (verbose)


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ