[PVFS2-CVS] commit by robl in pvfs2-1/src/apps/admin: pvfs2-genconfig

CVS commit program cvs at parl.clemson.edu
Tue Nov 8 11:35:43 EST 2005


Update of /projects/cvsroot/pvfs2-1/src/apps/admin
In directory parlweb:/tmp/cvs-serv10448/src/apps/admin

Modified Files:
	pvfs2-genconfig 
Log Message:
add a new "--num-dfiles" option (defaults to one dfile per server)


Index: pvfs2-genconfig
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/apps/admin/pvfs2-genconfig,v
diff -u -w -p -u -r1.48 -r1.49
--- pvfs2-genconfig	25 Oct 2005 18:00:56 -0000	1.48
+++ pvfs2-genconfig	8 Nov 2005 16:35:43 -0000	1.49
@@ -29,6 +29,7 @@ my $opt_first_handle = '';
 my $opt_last_handle = '';
 my $opt_root_handle = '';
 my $opt_fsid = '';
+my $opt_default_num_dfiles = '';
 
 my $opt_security = '0';
 my $opt_trusted_port = '';
@@ -232,6 +233,10 @@ sub emit_filesystem
     print $target "\tName $name\n";
     print $target "\tID $fs_id\n";
     print $target "\tRootHandle $root_handle\n";
+    if($default_num_dfiles > 0)
+    {
+        print $target "\tDefaultNumDFiles $default_num_dfiles\n";
+    }
     print $target "\t<MetaHandleRanges>\n";
 
     $start = $end = $first_handle - 1;
@@ -356,6 +361,8 @@ Usage: pvfs2-genconfig [OPTIONS] <fs.con
      --last-handle  <NUM>              last handle value to reserve
      --root-handle  <NUM>              handle value to reserve for root object
      --fsid         <NUM>              fs identifier value
+     --default-num-dfiles <NUM>        number of datafiles to use per file
+                                       (defaults to number of I/O servers)
      --trusted      <0|1>              indicate whether trusted connection options need to be emitted
 THIS
 
@@ -469,6 +476,16 @@ sub get_last_handle
     return $last_handle;
 }
 
+sub get_default_num_dfiles
+{
+    if ($opt_default_num_dfiles) {
+        $default_num_dfiles = $opt_default_num_dfiles;
+    } else {
+        $default_num_dfiles = -1;
+    }
+    return $default_num_dfiles;
+}
+
 sub get_first_handle
 {
     if ($opt_first_handle) {
@@ -666,6 +683,7 @@ GetOptions('protocol=s'    => \$opt_prot
        'logstamp=s'    => \$opt_logstamp,
        'first-handle=i' => \$opt_first_handle,
        'last-handle=i' => \$opt_last_handle,
+       'default-num-dfiles=i' => \$opt_default_num_dfiles,
        'root-handle=i' => \$opt_root_handle,
        'fsid=i'        => \$opt_fsid,
        'trusted=i'        => \$opt_security,
@@ -799,6 +817,7 @@ $logging = get_logging();
 $logstamp = get_logstamp();
 $first_handle = get_first_handle();
 $last_handle = get_last_handle();
+$default_num_dfiles = get_default_num_dfiles();
 $root_handle = get_root_handle();
 $fsid = get_fsid();
 $server_job_timeout = get_server_job_timeout();



More information about the PVFS2-CVS mailing list