[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#756170: mount option timeo - in deciseconds, or seconds?



I think this report is incorrect.
If you agree, please close it.
If not, please offer some evidence for your belief.
My evidence is below.

I looked in the upstream git of nfs-utils.
The 'deciseconds' has been in there since the start of git history
(2007, commit id 16db99b56a532bf56fa27618a6ef30763cd9006f).
 
There is no direct use of the 'timeo' field of the NFS data structure
in nfs-utils so we have to look at the kernel code.
 
In linux/fs/nfs/client.c there is this function

/*                                                                              
 * Initialise the timeout values for a connection                               
 */                                                                             
void nfs_init_timeout_values(struct rpc_timeout *to, int proto,                 
                                    int timeo, int retrans)                     
{                                                                               
        to->to_initval = timeo * HZ / 10;                                       
...

which is called from this function in the same module

static int nfs_init_server(struct nfs_server *server,                           
                           const struct nfs_parsed_mount_data *data,            
                           struct nfs_subversion *nfs_mod)                      
{                                                                               
        struct rpc_timeout timeparms;                                           
        struct nfs_client_initdata cl_init = {                                  
                .hostname = data->nfs_server.hostname,                          
                .addr = (const struct sockaddr *)&data->nfs_server.address,     
                .addrlen = data->nfs_server.addrlen,                            
                .nfs_mod = nfs_mod,                                             
                .proto = data->nfs_server.protocol,                             
                .net = data->net,                                               
                .timeparms = &timeparms,                                        
        };                                                                      
        struct nfs_client *clp;                                                 
        int error;                                                              
                                                                                
        nfs_init_timeout_values(&timeparms, data->nfs_server.protocol,          
                        data->timeo, data->retrans);                            
        if (data->flags & NFS_MOUNT_NORESVPORT)                                 
                set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags);                


I think this makes it reasonably  clear 'timeo' is in deciseconds,
although the manpage could take a few words to explain how it comes
to use that peculiar unit.

Kind regards
Vince


Reply to: