Author: adrian.chadd
Date: Thu Jul 16 01:18:56 2009
New Revision: 14197

Modified:
    playpen/LUSCA_HEAD_storework/app/coss_rebuild/coss_build_dir.c
    playpen/LUSCA_HEAD_storework/app/coss_rebuild/coss_rebuild.c

Log:
Integrate the directory build into the utility. This now replicates
the cossdump functionality. Now, to have it spit out swaplog entries..



Modified: playpen/LUSCA_HEAD_storework/app/coss_rebuild/coss_build_dir.c
==============================================================================
--- playpen/LUSCA_HEAD_storework/app/coss_rebuild/coss_build_dir.c       
(original)
+++ playpen/LUSCA_HEAD_storework/app/coss_rebuild/coss_build_dir.c      Thu Jul 
 
16 01:18:56 2009
@@ -29,14 +29,6 @@
   * All in all this is quite a horrible method for rebuilding..
   */

-#define        DEFAULT_BLOCKSIZE       1024
-#define        DEFAULT_BLOCKBITS       10
-#define        DEFAULT_STRIPESIZE      1048576
-
-size_t stripe_size = 0;        /* XXX needs to be changed, obviously */
-int    stripe_blksize = 1024;
-
-
  static void
  parse_stripe(int stripeid, char *buf, int len, int blocksize, size_t  
stripesize)
  {

Modified: playpen/LUSCA_HEAD_storework/app/coss_rebuild/coss_rebuild.c
==============================================================================
--- playpen/LUSCA_HEAD_storework/app/coss_rebuild/coss_rebuild.c        
(original)
+++ playpen/LUSCA_HEAD_storework/app/coss_rebuild/coss_rebuild.c        Thu Jul 
16  
01:18:56 2009
@@ -4,6 +4,9 @@
  #include <stdlib.h>
  #include <unistd.h>

+#include "libcore/tools.h"
+#include "libsqdebug/debug.h"
+
  #include "coss_build_dir.h"

  int shutting_down = 0;        /* needed for libiapp */
@@ -11,5 +14,21 @@
  int
  main(int argc, const char *argv[])
  {
+       const char *path;
+       int block_size;
+       size_t stripe_size;
+       int num_stripes;
+
+        /* Setup the debugging library */
+        _db_init("ALL,1");
+        _db_set_stderr_debug(1);
+
+       path = argv[1];
+       block_size = atoi(argv[2]);
+       stripe_size = atoi(argv[3]);
+       num_stripes = atoi(argv[4]);
+
+       (void) coss_rebuild_dir(path, stripe_size, block_size, num_stripes);
+
        exit(0);
  }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to