Re: [PATCH] Include journal size in ext3/ext4 existing size value.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Cantrell wrote:
> On 05/13/2009 06:48 PM, Eric Sandeen wrote:
>> David Cantrell wrote:
>>> For ext3 and ext4 filesystems, add the journal size to the value we get
>>> from statvfs() and use that total for the existing size of the
>>> filesystem.  Existing size is meant to be the amount of space occupied
>>> by the filesystem on the volume, for journaled filesystems that means
>>> there is a disconnect between what we get from statvfs() and how much
>>> space the filesystem consumes on the volume.
>> FWIW, I don't think stat f_blocks + journal size adds up quite right
>> either :(  I don't know why.  I didn't write it ;)
>>
>> I was talking to dlehman on irc tonight ... If you really want to know
>> the total blocks under the filesystem, for ext$FOO you can do:
>>
>> # dumpe2fs -h $DEVICE  | grep "Block"
>> dumpe2fs 1.41.4 (27-Jan-2009)
>> Block count:              65536
>> Block size:               1024
>> Blocks per group:         8192
>>
>> for xfs you can do:
>>
>> # xfs_db $DEVICE -c "sb 0" -c "p dblocks" -c "p blocksize"
>> dblocks = 65536
>> blocksize = 1024
>>
>> and those should be accurate for your purposes, if you want to know the
>> total nr of blocks that are under the filesystem's purview...
> 
> And this is what I originally did back in March, then you suggested 
> using statfs() over reading these fields.  I did change the patch and we 
> liked that a lot more than doing this, but I did read these fields 
> initially.

oh :(

I suck.  Sorry...

Perhaps I misunderstood what you wanted it for ... I hope.  Sorry for
the runaround.

-Eric

> See these threads:
> 
> https://www.redhat.com/archives/anaconda-devel-list/2009-March/msg00503.html
> https://www.redhat.com/archives/anaconda-devel-list/2009-March/msg00504.html
> https://www.redhat.com/archives/anaconda-devel-list/2009-March/msg00505.html
> https://www.redhat.com/archives/anaconda-devel-list/2009-March/msg00506.html
> 
> That's patches to do what you described above for ext2, ext3, ext4, 
> ntfs, and jfs.  And can add xfs with the information you just provided.
> 
> I'll update these patches to apply to the current code base.
> 

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux