Show
Ignore:
Timestamp:
12/06/10 16:26:00 (2 years ago)
Author:
shuangy
Message:

1. add >InitNumDirdataHandles?< field to fs_config and default value set to 2. 2. add command line options >-n, --init-num-dirdata< to pvfs2-mkdir to set initial number of dirdata handles for a directory. (not yet applied to kernel module.)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/Orange-Elaine-Distr-Dir-Branch/src/common/misc/server-config.c

    r8544 r8648  
    111111static DOTCONF_CB(get_precreate_batch_size); 
    112112static DOTCONF_CB(get_precreate_low_threshold); 
     113static DOTCONF_CB(get_init_num_dirdata_handles); 
    113114static DOTCONF_CB(get_client_retry_limit); 
    114115static DOTCONF_CB(get_client_retry_delay); 
     
    690691         CTX_DEFAULTS|CTX_SERVER_OPTIONS, "0, 16, 256, 16, 16, 16, 0"}, 
    691692 
     693     /* Initial number of dirdata handles when creating a new directory. 
     694      * TODO: determine the default value, use 2 as a start 
     695      */ 
     696     {"InitNumDirdataHandles",ARG_INT, get_init_num_dirdata_handles,NULL, 
     697         CTX_DEFAULTS|CTX_SERVER_OPTIONS, "2"}, 
     698 
    692699    /* Specifies if file stuffing should be enabled or not.  Default is 
    693700     * enabled; this option is only provided for benchmarking purposes  
     
    16971704    return NULL; 
    16981705} 
     1706 
     1707DOTCONF_CB(get_init_num_dirdata_handles) 
     1708{ 
     1709    struct server_configuration_s *config_s =  
     1710        (struct server_configuration_s *)cmd->context; 
     1711    if(config_s->configuration_context == CTX_SERVER_OPTIONS && 
     1712       config_s->my_server_options == 0) 
     1713    { 
     1714        return NULL; 
     1715    } 
     1716    if(cmd->data.value <= 0) 
     1717    { 
     1718        return "InitNumDirdataHandles has to be a positive integer!\n"; 
     1719    } 
     1720    config_s->init_num_dirdata_handles = cmd->data.value; 
     1721    return NULL; 
     1722} 
     1723 
     1724 
    16991725 
    17001726DOTCONF_CB(get_server_job_flow_timeout)