Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Jul 1999 15:22:27 -0400 (EDT)
From:      "Brian F. Feldman" <green@unixhelp.org>
To:        current@FreeBSD.org
Cc:        grog@lemis.com
Subject:   world broken in vinum (PATCH)
Message-ID:  <Pine.BSF.4.10.9907021519150.4134-100000@janus.syracuse.net>

next in thread | raw e-mail | index | archive | help
Here's the fix. I'm sure it's not absolutely the same as what Greg will have,
but if anyone wants to commit it, it will fix world.

 Brian Fundakowski Feldman      _ __ ___ ____  ___ ___ ___  
 green@FreeBSD.org                   _ __ ___ | _ ) __|   \ 
     FreeBSD: The Power to Serve!        _ __ | _ \._ \ |) |
       http://www.FreeBSD.org/              _ |___/___/___/ 


--- src/sbin/vinum/vext.h.orig	Fri Jul  2 15:06:24 1999
+++ src/sbin/vinum/vext.h	Fri Jul  2 15:12:12 1999
@@ -80,6 +80,9 @@
 void vinum_makedev(int argc, char *argv[], char *arg0[]);
 void vinum_help(int argc, char *argv[], char *arg0[]);
 void vinum_quit(int argc, char *argv[], char *arg0[]);
+void vinum_concat(int argc, char *argv[], char *arg0[]);
+void vinum_stripe(int argc, char *argv[], char *arg0[]);
+void vinum_mirror(int argc, char *argv[], char *arg0[]);
 void vinum_setdaemon(int argc, char *argv[], char *arg0[]);
 void reset_volume_stats(int volno, int recurse);
 void reset_plex_stats(int plexno, int recurse);
@@ -105,6 +108,7 @@
 #endif
 void make_devices(void);
 void get_drive_info(struct drive *drive, int index);
+struct drive *find_drive_by_devname(char *name);
 void get_sd_info(struct sd *sd, int index);
 void get_plex_sd_info(struct sd *sd, int plexno, int sdno);
 void get_plex_info(struct plex *plex, int index);
@@ -145,3 +149,6 @@
 extern int file_line;					    /* and line in input file (yes, this is tacky) */
 
 extern char buffer[];					    /* buffer to read in to */
+
+extern int sflag;
+extern char *objectname;
--- src/sbin/vinum/commands.c.orig	Fri Jul  2 15:13:19 1999
+++ src/sbin/vinum/commands.c	Fri Jul  2 15:17:46 1999
@@ -1422,7 +1422,8 @@
 	    }
 	    bigchunk = bigchunk > freelist.sectors ? bigchunk : freelist.sectors; /* max it */
 	}
-	maxsize = min(maxsize, bigchunk);		    /* this is as much as we can do */
+	if (bigchunk < maxsize)						/* this is as much as we can do */
+		maxsize = bigchunk;
     }
 
     /* Now create the volume */
@@ -1580,7 +1581,8 @@
 		}
 		bigchunk = bigchunk > freelist.sectors ? bigchunk : freelist.sectors; /* max it */
 	    }
-	    maxsize[o & 1] = min(maxsize[o & 1], bigchunk); /* get the maximum size of a subdisk  */
+		if (bigchunk < maxsize[o & 1]) 						/* get the maximum size of a subdisk	*/
+			maxsize[o & 1] = bigchunk;
 	}
     }
 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9907021519150.4134-100000>