[Ocfs2-devel] [PATCH 1/2] Ocfs2: Add stuffs associated with ocfs2_info_request ioctls to ioctl.h

tristan tristan.ye at oracle.com
Mon Jan 4 01:21:30 PST 2010


Joel Becker wrote:
> On Mon, Jan 04, 2010 at 10:36:15AM +0800, tristan wrote:
>   
>> Oh, I may misunderstand your words, Joel. Did you mean we only split the on-disk layout and ioctls into two parts(ocfs2_fs.h and ocfs2_ioctl.h) in ocfs2-tools for userspace,
>> while kernel part still maintains one ocfs2_fs.h to cover both definitions for on-disk and ioctl strutures?
>>     
>
> 	No, I don't mean that.  I mean we have ocfs2_fs.h and
> ocfs2_ioctl.h in both the kernel and the tools.
>
>   
>> If not, why we need maintain two ioctl headers in kernel part(ioctl.h and ocfs2_ioctl.h)?
>>     
>
> 	ioctl.h contains things that are only important inside the
> kernel build; specifically, the declarations of the ioctl functions
> called by file_operations.  No userspace program needs the declaration
> of kernel code functions.   ocfs2_ioctl.h should contain the things a
> userspace program needs to invoke the ioctls.  The IOC definitions and
> any structures they use.
> 	Basically, anything ocfs2_*.h is a userspace header that can be
> installed for userspace programs to use.  They get copied to ocfs2-tools
> include/ocfs2-kernel.  All the other headers are kernel-only.
>   

Oh, I got the naming convention of "ocfs2_*.h":-)

Thanks for the clarification!



> Joel
>
>
>   




More information about the Ocfs2-devel mailing list