Re: [PATCH 13/24] pnfs_submit: read path changeover

Boaz Harrosh
2010-06-10T06:26:35Z

On 06/09/2010 10:46 PM, Fred Isaman wrote:
>>>>> static inline enum pnfs_try_status
>>>>> pnfs_try_to_read_data(struct nfs_read_data *data,
>>>>> const struct rpc_call_ops *call_ops)
>>>>
>>>> Don't think this needs to be inline, whats the point?
>>>>
>>>
>>> The point is that it is in the header file, not a c file.
>>>
>>
>> That's what I meant. Why is it in the header file. Why not
>> in .c file and declared.
>>
>
> To make it easy to ifdef out if CONFIG_NFS_V4_1 is not set.
>
> Fred
>

It's not easier, just:

#ifdef CONFIG_NFS_V4_1
enum pnfs_try_status
pnfs_try_to_read_data(struct nfs_read_data *data,
const struct rpc_call_ops *call_ops); /* declaration */
#else
static inline enum pnfs_try_status
pnfs_try_to_read_data(struct nfs_read_data *data,
const struct rpc_call_ops *call_ops) /* Empty inline */
{
return ...;
}
#endif

We do that everywhere. Should also here
Boaz

>>> Fred
>>>
>>
>> (-Bz
>>