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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 18 Aug 2011 10:49:38 +0700
From:	Ivan Shmakov <>
Subject: Re: a (documented) way to get the Ext2+ filesystem size?

>>>>> Ted Ts'o <> writes:
>>>>> On Thu, Aug 18, 2011 at 01:50:48AM +0700, Ivan Shmakov wrote:


 >> The intent is to process a filesystem image, not a mounted
 >> filesystem.  It's my understanding that I cannot use neither
 >> statfs(2) nor POSIX' statvfs(2) in this case.

 >> The code I've posted earlier is used in my e2dis [1–3] project.

 > For this, I'd suggest that you use the ext2fs library.  That will
 > take care of byte swapping, etc.  It also means that you don't have
 > to worry about parsing the extent trees.  If you had used the ext2fs
 > library before ext4 had shipped, you wouldn't have had to make any
 > changes to support extents, since the ext2fs library wraps and
 > provides abstract interfaces for most of what you would need for
 > e2dis project.

	I don't seem to understand.  I've scanned through the
	( Function Index section (as per the Debian's
	e2fslibs-dev package, 1.41.12-2), and I see no mention of a
	function that I can use for that.

	Thus, I've ended up writing my own one, which takes an
	ext2_filsys handle, and references, via its ‘super’ member, the
	‘s_blocks_count’ and ‘s_blocks_count_hi’ members of the
	superblock structure.

	However, I was concerned that I don't seem to find the
	documentation for these structures' contents anywhere.  (Sans
	the source, of course), and wondered, if the interface I use is
	at least stable?


FSF associate member #7257	Coming soon: Software Freedom Day planning-ru (ru), sfd-discuss (en)

To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists