[Pvfs2-developers] pvfs2.ko and 2.6.21

Sam Lang slang at mcs.anl.gov
Thu May 10 14:05:24 EDT 2007


Yeah that is a bit nicer to look at.

-sam

On May 10, 2007, at 12:54 PM, Pete Wyckoff wrote:

> slang at mcs.anl.gov wrote on Thu, 10 May 2007 12:41 -0500:
>> How's this?  I've only tried building against 2.6.21 yet.  Seems to
>> work there.
>
> Looks perfectly fine.  I will point out for the future that C99
> initializers should be okay for even ancient linux and gcc, so
> instead of:
>
> /* controls ncache soft limit */
> -    {3, "soft-limit", NULL, sizeof(int), 0644, NULL,
> -        &pvfs2_param_proc_handler, NULL, NULL,
> &ncache_soft_extra, NULL},
> +    DECLARE_STATIC_CTL_TABLE(3, "soft-limit", NULL, sizeof(int),  
> 0644,
> +                             NULL, &pvfs2_param_proc_handler, NULL,
> +                             &ncache_soft_extra, NULL),
>
> you could do something like:
>
>     { .ctl_name = 3,
>       .procname = "soft-limit",
>       .maxlen = sizeof(int),
>       .mode = 0644,
>       .proc_handler = &pvfs2_param_proc_handler,
>       .extra1 = &ncache_soft_extra,
>     },
>
> and just not say anything about .de or .parent.  Unmentioned fields
> in static tables get initialized to NULL.
>
> 		-- Pete
>



More information about the Pvfs2-developers mailing list