[Pvfs2-developers] Re: Gossip'ing kmod

Sam Lang slang at mcs.anl.gov
Thu Aug 10 14:17:48 EDT 2006


On Aug 10, 2006, at 12:53 PM, Murali Vilayannur wrote:

> Hi Sam,
>
>> Thanks for the patch.  I like the use of sizeof to get the size of a
>> static array.  I think we should use that in more places in pvfs
>> where possible.
>
> I agree.. but you should thank someone else (Phil? or
> Neil? dunno) for doing that... :)
>
>> Since kmod_eventlog_to_mask is nearly identical to
>> debug_eventlog_to_mask, could you define a generic function that
>> works for both, and then some macros or inlined functions that can
>> call the generic one?
>
> Yep. I will change that.
> I copied it because I dont want a 64 bit debug mask.. but I guess I  
> could
> change that..
>
>> Also, I've been itching to take the errno macros out of pvfs2-
>> error.h,
>
> pvfs2-types.h?
>

right.

>> which I believe is defined that way so that functions could
>> be defined in both the kernel module as well as userspace code.  So
>> if we're going to start sharing source files between the two, maybe
>> I'll be able to move that stuff to a source file now?  Are there any
>> issues with that from the kernel module perspective?
>
> perhaps I dont understand.. Can you tell me what the exact issue is?

The issue is DECLARE_ERRNO_MAPPING_AND_FN.  Its something that could  
be moved to a source file in my view.

> Ideally we should strive to share header files between user and kernel
> module. I am not too comfortable sharing C files although it is  
> entirely
> doable.

It seems reasonable for some instances where we end up defining the  
exact same functions or global variables anyway.  I'm targeting those  
cases.

> Plus we need to make sure that the header files are all sanitized for
> 32-64 bit interactions.
> I will send you an updated patch shortly.
> Thanks,
> Murali
>
>> Thanks,
>>
>> -sam
>>
>> On Aug 9, 2006, at 1:48 AM, Murali Vilayannur wrote:
>>
>>> <gossip-kmod.patch.gz>
>>
>>
>



More information about the Pvfs2-developers mailing list