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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 18 Aug 2011 10:34:24 +0800
From:	Steven Liu <lingjiujianke@...il.com>
To:	"Ted Ts'o" <tytso@....edu>
Cc:	Ivan Shmakov <oneingray@...il.com>, linux-ext4@...r.kernel.org
Subject: Re: a (documented) way to get the Ext2+ filesystem size?

Hi, Ivan,


      Do you want use mkfs.ext2 to make a small ext2 image file
     and write the image to mmc or some devices?

     when you write it to block device, the tool can modify the sb info
     about the file system size?

    for example:

           You must cost  60s to write a 64MB ext2 image
           You want to make a 8MB ext2 image
           So you can cost little time to write image to block device
           and use 64MB partition space?


    Is this?




Best Regards?


2011/8/18 Ted Ts'o <tytso@....edu>:
> On Thu, Aug 18, 2011 at 01:50:48AM +0700, Ivan Shmakov wrote:
>> >>>>> Ted Ts'o <tytso@....edu> writes:
>> >>>>> On Tue, Aug 16, 2011 at 06:37:23PM +0700, Ivan Shmakov wrote:
>>
>>  >> How do I get the Ext2+ filesystem size (in blocks)?
>>
>>  > I assume you need the exact numbers, so you can't use statfs(2)?
>>  > What are you using it for?
>>
>>       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.
>
> Regards,
>
>                                        - Ted
> --
> 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
>
--
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