cluster/gfs2 libgfs2/libgfs2.h libgfs2/misc.c ...
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: rpeterso at sourceware.org 2007-05-11 16:53:33
Modified files:
gfs2/libgfs2 : libgfs2.h misc.c gfs2/mkfs : Makefile main.c main_jadd.c main_mkfs.c gfs2/quota : check.c gfs2_quota.h main.c gfs2/tool : gfs2_tool.h
Added files:
gfs2/mkfs : main_grow.c
Log message:
Resolves: Bugzilla Bug 234844: Need to add a "gfs2_grow" command
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/libgfs2.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.7.2.4&r2=1.7.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/misc.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mkfs/main_grow.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=NONE&r2=1.4.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mkfs/Makefile.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.12.2.1&r2=1.12.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mkfs/main.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.7&r2=1.7.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mkfs/main_jadd.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.10&r2=1.10.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mkfs/main_mkfs.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.8.2.4&r2=1.8.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/quota/check.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.2.1&r2=1.2.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/quota/gfs2_quota.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.1&r2=1.1.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/quota/main.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.2.1&r2=1.2.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/gfs2_tool.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.5&r2=1.5.2.1
gfs2/libgfs2/libgfs2.h +10 -2
@@ -165,7 +165,7 @@int expert;int override; -char *device_name; +char device_name[PATH_MAX ];char *path_name;/* Constants */
@@ -219,6 +219,9 @@unsigned int spills;unsigned int writes; +int metafs_fd; +int metafs_mounted;/* If metafs was already mounted */ +char metafs_path[PATH_MAX ];/* where metafs is mounted */ };extern char *prog_name;
@@ -343,7 +346,6 @@/* device_geometry.c */ void device_geometry (struct gfs2_sbd *sdp);void fix_device_geometry (struct gfs2_sbd *sdp); -void munge_device_geometry_for_grow (struct gfs2_sbd *sdp);/* fs_bits.c */ #define BFITNOENT (0xFFFFFFFF)
@@ -497,6 +499,12 @@/* misc.c */ void compute_constants (struct gfs2_sbd *sdp); +int find_gfs2_meta (struct gfs2_sbd *sdp); +int dir_exists (const char *dir); +void check_for_gfs2 (struct gfs2_sbd *sdp); +void mount_gfs2_meta (struct gfs2_sbd *sdp); +void lock_for_admin (struct gfs2_sbd *sdp); +void cleanup_metafs (struct gfs2_sbd *sdp);/* rgrp.c */ int gfs2_compute_bitstructs (struct gfs2_sbd *sdp,struct rgrp_list *rgd);
gfs2/libgfs2/misc.c +171 -2
189 lines not on this page · raw message
/cvs/cluster/cluster/gfs2/mkfs/main_grow.c,v --> standard output revision 1.4.2.1
- renamed from gfs2/mkfs/main_grow.c +346 -0
346 lines not on this page · raw message
gfs2/mkfs/Makefile +8 -4
@@ -9,6 +9,7 @@ MKFS=mkfs.gfs2 JADD=gfs2_jadd +GROW=gfs2_grow INCLUDEPATH=-I${KERNEL_SRC}/include/ -I${top_srcdir}/include/ -I${top_srcdir}/libgfs2/ -I${top_srcdir}/config/ INSTALL=install
@@ -19,10 +20,10 @@ LDFLAGS=-L${top_srcdir}/libgfs2 -L${libdir} H=gfs2_disk_hash.h gfs2_mkfs.h linux_endian.h ondisk.h osi_list.h -C=main.c main_mkfs.c main_jadd.c +C=main.c main_mkfs.c main_jadd.c main_grow.c O=$(subst .c,.o,${C}) -all: ${MKFS} ${JADD} +all: ${MKFS} ${JADD} ${GROW} ${MKFS}: ${O} ${top_srcdir}/libgfs2/libgfs2.a ${LD} ${LDFLAGS} ${O} -o ${@} -lgfs2 -lvolume_id
@@ -30,13 +31,16 @@ ${JADD}: ${MKFS} ln -s ${MKFS} ${JADD} +${GROW}: ${MKFS} + ln -s ${MKFS} ${GROW} + .c.o: $< ${CC} ${CFLAGS} -o $@ $^ install: all ${INSTALL} -m 0755 ${MKFS} ${sbindir} ln -f ${sbindir}/${MKFS} ${sbindir}/${JADD} + ln -f ${sbindir}/${MKFS} ${sbindir}/${GROW} clean: - rm -f *.o ${MKFS} ${JADD} - + rm -f *.o ${MKFS} ${JADD} ${GROW}
gfs2/mkfs/main.c +4 -3
@@ -53,14 +53,15 @@main_jadd (argc, argv); else if (!strcmp(whoami, "gfs2_mkfs") || !strcmp(whoami, "mkfs.gfs2"))main_mkfs (argc, argv); -#if 0 -if (!strcmp (whoami,"gfs2_grow" )) + else if (!strcmp(whoami, "gfs2_grow"))main_grow (argc, argv); +#if 0 else if (!strcmp(whoami, "gfs2_shrink"))main_shrink (argc, argv); +#endif else die("I don't know who I am!\n"); -#endif +free (p);return EXIT_SUCCESS ;
gfs2/mkfs/main_jadd.c +20 -180
262 lines not on this page · raw message
gfs2/mkfs/main_mkfs.c +7 -9
@@ -86,7 +86,7 @@int cont = TRUE;int optchar; - sdp->device_name =NULL ; +memset (sdp->device_name,0 ,sizeof (sdp->device_name)); sdp->md.journals =1 ;strcpy (sdp->lockproto,"lock_nolock" );
@@ -169,10 +169,10 @@case 1 :if (strcmp (optarg,"gfs2" ) ==0 )continue ; -if (sdp->device_name) { +if (sdp->device_name[0 ]) {die ("More than one device specified (try -h for help)" ); } - sdp->device_name = optarg; +strcpy (sdp->device_name, optarg);break ;default :
@@ -181,11 +181,10 @@ }; } -if ((sdp->device_name ==NULL ) && (optind < argc)) { - sdp->device_name = argv[optind++]; - } +if ((sdp->device_name[0 ] ==0 ) && (optind < argc)) +strcpy (sdp->device_name, argv[optind++]); -if (sdp->device_name ==NULL ) +if (sdp->device_name[0 ] =='\0' )die ("no device specified (try -h for help)\n" );if (optind < argc)
@@ -264,8 +263,7 @@die ("error identifying the contents of %s: %s\n" , sdp->device_name,strerror (errno)); -printf ("This will destroy any data on %s.\n" , - sdp->device_name); +printf ("This will destroy any data on %s.\n" , sdp->device_name);if (volume_id_probe_all (vid,0 , sdp->device_size) ==0 )printf (" It appears to contain a %s %s.\n" , vid->type, vid->usage_id ==VOLUME_ID_OTHER ?"partition" : vid->usage);
gfs2/quota/check.c +31 -29
142 lines not on this page · raw message
gfs2/quota/gfs2_quota.h +4 -6
@@ -2,7 +2,7 @@ ******************************************************************************* ** ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. -** Copyright (C) 2004 Red Hat, Inc. All rights reserved. +** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. ** ** This copyrighted material is made available to anyone wishing to use, ** modify, copy, or redistribute it subject to the terms and conditions
@@ -98,19 +98,17 @@/* main.c */ -void check_for_gfs2 (const char *path);void do_get_super (int fd,struct gfs2_sb *sb); -void do_sync (commandline_t *comline); +void do_sync (struct gfs2_sbd *sdp,commandline_t *comline);void lock_for_admin (); -int find_gfs2_meta (const char *mnt);void mount_gfs2_meta ();void cleanup ();void read_superblock (struct gfs2_sb *sb);/* check.c */ -void do_check (commandline_t *comline); -void do_quota_init (commandline_t *comline); +void do_check (struct gfs2_sbd *sdp,commandline_t *comline); +void do_quota_init (struct gfs2_sbd *sdp,commandline_t *comline);/* names.c */
gfs2/quota/main.c +52 -195
431 lines not on this page · raw message
gfs2/tool/gfs2_tool.h +2 -1
@@ -2,7 +2,7 @@ ******************************************************************************* ** ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. -** Copyright (C) 2004 Red Hat, Inc. All rights reserved. +** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. ** ** This copyrighted material is made available to anyone wishing to use, ** modify, copy, or redistribute it subject to the terms and conditions
@@ -95,6 +95,7 @@void check_for_gfs2 (int fd,char *path);char *get_list (void );char **str2lines (char *str); +const char *find_debugfs_mount (void );char *mp2fsname (char *mp);char *name2value (char *str,char *name);uint32_t name2u32 (char *str,char *name);