Whamcloud - gitweb
Numerous little changes:
authorbraam <braam>
Tue, 21 Dec 1999 08:16:22 +0000 (08:16 +0000)
committerbraam <braam>
Tue, 21 Dec 1999 08:16:22 +0000 (08:16 +0000)
   - HOWTO renamed and edited
   - Makefile: no inofs  and other things taht don't work
   - Fixes to doc Makefile
   - obdcontrol a little clearer
   - switch to official MAJOR (186)

lustre/include/linux/obd_class.h
lustre/obdclass/obdcontrol
lustre/obdclass/setup.sh

index 45816d6..ebda1dc 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/obd_rpc.h>
 
 
-#define OBD_PSDEV_MAJOR 120
+#define OBD_PSDEV_MAJOR 186
 #define MAX_OBD_DEVICES 8
 #define MAX_MULTI 16
 
index 9fd3972..379256e 100755 (executable)
@@ -91,7 +91,7 @@ use IO::Handle;
 
 my ($file);
 
-GetOptions("f!" => \$file, "device=s" => \$::device, "fs=s" => $::filesystem) || die "Getoptions";
+GetOptions("f!" => \$file, "device=s" => \$::device, ) || die "Getoptions";
 
 
 # get a console for the app
@@ -147,7 +147,6 @@ my $term, $attribs;
 # Get going....
 
 Device($::device);
-Filesystem($::filesystem);
 
 sub readl {
     if ( $file ) {
@@ -235,17 +234,6 @@ sub execute_line {
     return (&{$commands{$cmd}->{func}}(@arg));
 }
 
-# set the object store in the ext2 formatted block device
-sub Filesystem {
-    my $filesystem = shift;
-    $filesystem = "/dev/loop0" unless $filesystem;
-    
-    $::filesystem = $filesystem;
-    if (!defined($::st = stat($filesystem))) {
-       die "Unable to stat $filesystem.\n";
-    }
-    print "Filesystem now $filesystem\n";
-}
 
 # select the OBD device we talk to
 sub Device {
@@ -272,6 +260,9 @@ sub Attach {
     my $data;
     my $datalen = 0;
 
+    if ( ! $type ) {
+       print "Usage \"attach type (ext2_obd)\"; 
+
     if ($type eq "obdscsi" ) {
        my $adapter = shift;
        my $bus = shift;
@@ -696,7 +687,8 @@ sub Setup {
 
     if ( $type eq "ext2_obd" ) {
        my $dev = shift;
-       $dev = $::st->rdev() unless $dev;
+       my $st = stat($dev);
+       $dev = $st->rdev() unless $dev;
        $data = pack("i", $dev);
        $datalen = 4;
     }
index b7c7041..723efe1 100755 (executable)
@@ -1,4 +1,9 @@
 #! /bin/bash
+if [ -f /tmp/fs ]; then 
+    echo "/tmp/fs exists; I'm unwilling to overwrite it"
+    exit
+fi
+
 dd if=/dev/zero of=/tmp/fs bs=1k count=10k
 
 #insmod loop