[Ocfs2-tools-devel] [PATCH 0/11] Ocfs2-tools: Add new tool[o2info] to ocfs2-tools: V4.

tristan tristan.ye at oracle.com
Thu Dec 31 00:33:21 PST 2009


Major changes from v3 to v4:

Mainly incorporate the comments by joel and tao.


Tristan.

tristan wrote:
> Major changes from v2 to v3:
>
> 1. Apply tao's comments on v2.
> 2. Add manpage.
>
> Regards,
> Tristan
>> Hi all,
>>
>> I'm posting a new v2 o2info patch series after a simple sanity check, 
>> which has implemented all desired functions in design doc,
>> I knew it still was in a draft version, and some bugy and 
>> unreasonable codes do exist, especially for the kernel part for new 
>> OCFS2_INFO_IOC ioctls since I'm still a newbie here:-), just wanna 
>> you guys take a quick review in a early time, that's the main reason 
>> why I sent these patches internally:-).
>>
>> Btw, how we handle the ea extents/clusters when filestating a ea 
>> attached file? shall we display them?
>>
>> Some simple tests as follows:
>> ------------------------------------------------------------------------------------------------------- 
>>
>> # ./o2info
>> Usage: o2info [options] <device or file>
>> o2info -h|--help
>> o2info -v|--version
>> [options] can be followings:
>> -V|--volinfo <device or file>
>> --fs-features <device or file>
>> -S|--filestat <file>
>> -F|--freefrag <chunksize in KB> <device or file>
>> -I|--freeinode <device or file>
>> ------------------------------------------------------------------------------------------------------- 
>>
>> # ./o2info --fs-features /dev/sdf1
>> # ./o2info --fs-features /storage/testfile
>> Feature Compat: 3 BackupSuper JBD2SuperBlock
>> Feature Incompat: 80 Sparse InlineData
>> Feature RO compat: 1 UnwrittenExtents
>>
>> #./o2info --volinfo /storage/testfile
>> #./o2info --volinfo /dev/sdf1
>> Block Size: 4096
>> Cluster Size: 32768
>> Node Slots: 8
>> Label: o2info_test
>> UUID: 06382A8D24C2458C881074D63AB7FD0F
>> ------------------------------------------------------------------------------------------------------- 
>>
>> #./o2info --filestat /storage/tao-latest-kernel/REPORTING-BUGS
>> File: /storage/tao-latest-kernel/REPORTING-BUGS
>> Size: 3172 Blocks: 0 IO Block: 4096 regular file
>> Device: 851h/2129d Inode: 1311591 Links: 1
>> Frag%: 0.00 Clusters: 0 Extents: 1 Score: 0
>> Shared: 0 Unwritten: 0 Holes: 0
>> Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
>> Access: 2009-12-15 16:56:58.502408105 +0800
>> Modify: 2009-12-15 16:56:58.515710166 +0800
>> Change: 2009-12-15 16:56:58.515710166 +0800
>> ------------------------------------------------------------------------------------------------------- 
>>
>> #./o2info --freefrag 64 /storage/tao-latest-kernel/README
>> #./o2info --freefrag 64 /dev/sdf1
>> Blocksize: 4096 bytes
>> Clustersize: 32768 bytes
>> Total clusters: 3136439
>> Free clusters: 2914837 (92.9%)
>>
>> Min. free extent: 8160 KB
>> Max. free extent: 1032160 KB
>> Avg. free extent: 942144 KB
>>
>> Chunksize: 65536 bytes (2 clusters)
>> Total chunks: 1568220
>> Free chunks: 1457369 (92.9%)
>>
>> HISTOGRAM OF FREE EXTENT SIZES:
>> Extent Size Range : Free extents Free Clusters Percent
>> 4M... 8M- : 4 1020 0.03%
>> 8M... 16M- : 1 511 0.02%
>> 32M... 64M- : 1 2047 0.07%
>> 128M... 256M- : 2 15797 0.54%
>> 512M... 1024M- : 91 2895462 99.34%
>> ------------------------------------------------------------------------------------------------------- 
>>
>> #./o2info --freeinode /dev/sdf1
>> #./o2info --freeinode /storage/tao-latest-kernel/README
>> Slot Space Free
>> 0 33792 2
>> 1 48128 380
>> 2 0 0
>> 3 0 0
>> 4 0 0
>> 5 0 0
>> 6 0 0
>> 7 0 0
>> Total 81920 382
>> ------------------------------------------------------------------------------------------------------- 
>>
>>
>>
>> Regards,
>> Tristan
>>
>> Tristan wrote:
>>> V1 version is a very much preliminary implementation, It fulfill 2 
>>> options from design doc.
>>>
>>> 1. --volfino
>>> 2. --fs-features
>>>
>>> It used newly-added ioctls in ocfs2 to gather filesys info from 
>>> none-privileged end-user in a mounted case,
>>> while it also support super user to use libocfs2 to access the same 
>>> info, as in,
>>>
>>> #o2info --fs-features /dev/sdax
>>>
>>> #o2info --fs-features /storage
>>>
>>> Above 2 methods dump the same info we requested.
>>>
>>> I posted the patches to get it reviewed early though only 2 options 
>>> get finished.
>>>
>>>
>>> Regards,
>>> Tristan.
>>>
>>> Tristan wrote:
>>>> Hi all,
>>>>
>>>> Inspired by extN's e2freefrag tool, we're going to add a new tool 
>>>> to provide some important information to users which missed from 
>>>> our early ocfs2-tools:
>>>> such as global bitmap free space fragmentation , free inode info, 
>>>> new extended inode information etc. The information it shows should 
>>>> be comprehensive and integrated enough to cover most of the infos 
>>>> in ocfs2 fs.
>>>>
>>>> Refer to http://oss.oracle.com/osswiki/OCFS2/ToolsTasksList for 
>>>> more details.
>>>>
>>>> The v1 implementation is essentially a draft which built a raw 
>>>> framework of the tool ,then implement several operations(such as 
>>>> volinfo, fs-features and filestat), and I do want it get reviewed 
>>>> early before all operations completed.
>>>>
>>>> One of our goals is to modularize the code and make it scalable 
>>>> enough to add new operations.
>>>>
>>>> Work-in-progress:
>>>>
>>>> 1. operations for --freefrag and --freeinode.
>>>>
>>>> 2. o2info.8.in manual file.
>>>>
>>>>
>>>> Regards,
>>>> Tristan.
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Ocfs2-tools-devel mailing list
>>>> Ocfs2-tools-devel at oss.oracle.com
>>>> http://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel
>>>
>>>
>>> _______________________________________________
>>> Ocfs2-tools-devel mailing list
>>> Ocfs2-tools-devel at oss.oracle.com
>>> http://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel
>>
>




More information about the Ocfs2-tools-devel mailing list