]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Update some documentation, rationalise some headers, tidy some dead
authorNathan Scott <nathans@sgi.com>
Tue, 12 Nov 2002 04:01:08 +0000 (04:01 +0000)
committerNathan Scott <nathans@sgi.com>
Tue, 12 Nov 2002 04:01:08 +0000 (04:01 +0000)
mkfs code, leftover from IRIX libdisk.
rationalise headers - we'd already included this header.

21 files changed:
db/bmap.c
db/check.c
db/command.c
db/dquot.c
db/fprint.c
db/frag.c
db/freesp.c
db/init.c
doc/README.quota
include/Makefile
include/mountinfo.h [deleted file]
libdisk/Makefile
libdisk/drivers.c
libdisk/drivers.h [new file with mode: 0644]
libdisk/mountinfo.c [deleted file]
libdisk/pttype.c
libdisk/pttype.h
man/man8/mkfs.xfs.8
mkfs/fstyp.c
mkfs/proto.c
mkfs/xfs_mkfs.c

index a114b736cf0a41c6e93368b3807f296fdd92030c..fe6fe380b77475a35e3a9ba11670d301c50cc335 100644 (file)
--- a/db/bmap.c
+++ b/db/bmap.c
@@ -31,7 +31,6 @@
  */
 
 #include <libxfs.h>
-#include <getopt.h>
 #include "command.h"
 #include "data.h"
 #include "type.h"
index d670ee0507651d6804018ef92c4e0cdb37af41ed..aaec90bd536bf7bd1cd5e94e6525c3041a152527 100644 (file)
@@ -32,7 +32,6 @@
 
 #include <libxfs.h>
 #include <math.h>
-#include <getopt.h>
 #include <sys/time.h>
 #include "bmap.h"
 #include "check.h"
index f8f982330c24c7f9d0c602057aa6b6e918063c63..044d097a88362596306fe851d84c1f5b059d7bd7 100644 (file)
@@ -31,7 +31,6 @@
  */
 
 #include <libxfs.h>
-#include <getopt.h>
 #include "addr.h"
 #include "agf.h"
 #include "agfl.h"
index ef28914a21cdbcc495850b21f7e4342ef7cf0d70..c58d2d5465c66bae75555a90a6aa1c76860fc84b 100644 (file)
@@ -31,7 +31,6 @@
  */
 
 #include <libxfs.h>
-#include <getopt.h>
 #include "bit.h"
 #include "bmap.h"
 #include "command.h"
index 55607f3316e2079cbe021b498d18e93699da797c..601fff8d2121665de8b85267292169a9518dd71d 100644 (file)
@@ -31,7 +31,6 @@
  */
 
 #include <libxfs.h>
-#include <getopt.h>
 #include <ctype.h>
 #include <time.h>
 #include "type.h"
index cfa33d2e575cd87c12ba597194185410a3d45ce2..74fb3e016a4dde4b507916e9925a442bbf23ccb6 100644 (file)
--- a/db/frag.c
+++ b/db/frag.c
@@ -31,7 +31,6 @@
  */
 
 #include <libxfs.h>
-#include <getopt.h>
 #include <sys/time.h>
 #include "bmap.h"
 #include "command.h"
index 8d19440bfdcb8c4ddaf67d194e1d52f059f5063d..4af233154c54618617fec336fbec9ac32fda2a9f 100644 (file)
@@ -31,7 +31,6 @@
  */
 
 #include <libxfs.h>
-#include <getopt.h>
 #include "command.h"
 #include "data.h"
 #include "freesp.h"
index c03134448b97cc8cddda2b8065895e1738bef6b4..d12e76e32841034343264ed86ac0a4e5cf5a5527 100644 (file)
--- a/db/init.c
+++ b/db/init.c
@@ -31,7 +31,6 @@
  */
 
 #include <libxfs.h>
-#include <getopt.h>
 #include <signal.h>
 #include "command.h"
 #include "data.h"
index eb2dab49d59a225aa41c6e6abb2a279dd811a49d..6ec89c6a2780a6e0646db1f0be9f4c07842b3080 100644 (file)
@@ -145,11 +145,15 @@ system is administered.
          user accounting with limit enforcement disabled.  quotaon(8)
          contains some examples of frequently used procedures.
 
-     o   Turning on quotas on the root filesystem is slightly different from
-         the above.  quotaon(8) must be used on the root XFS filesystem
-         first; quotas will be turned on the next time the system is
-         rebooted.  It is useful to use repquota(8) with the -v option to
-         monitor the effect of quotaon/off at various stages.
+     o   Turning on quotas on the root filesystem is slightly different
+         from the above.  In more recent versions of XFS, the quota mount
+         flags must be passed in with the "rootflags=" boot parameter.
+         In older versions of XFS and (quota-tools) quotaon(8) must be
+         used on the root XFS filesystem first; and quotas will be turned
+         on the next time the system is rebooted.
+
+     o   It is useful to use repquota(8) with the -v option to monitor
+         the XFS quota state at various stages.
 
      o   quotacheck(8) has no effect on XFS filesystems.  The first time
          quota accounting is turned on, XFS does an automatic quotacheck
@@ -223,7 +227,7 @@ GETTING STARTED
 
 EXAMPLES
 
->>> Enabling quota enforcement on a non-root XFS filesystem
+>>> Enabling quota enforcement on an XFS filesystem
 
 [root@troppo]# echo /dev/hdb10 /mnt/xqm xfs rw,usrquota 0 0 >>/etc/fstab
 [root@troppo]# mount /mnt/xqm
@@ -296,9 +300,8 @@ supported on Linux/XFS, as the concept of a project is specific to IRIX.
 A filesystem that has used user quota on IRIX, however, can be migrated
 to Linux, and vice-versa, as the ondisk format is shared between both
 versions of XFS (and Linux/XFS is "endian clean").  Group quota support
-is planned for a future release of IRIX, and the same level of ondisk
-compatibility will be available as for user quota, once this work has
-been completed.
+has been implemented only in more recent versions of IRIX 6.5f, and the
+same level of ondisk compatibility is now available as for user quota.
 
 Have fun,
 
index 745a0a0888acc63f547da1feea651e6384f78b0d..7a83872b3bc48015d4aa5eeeae63b5e56e302b92 100644 (file)
@@ -45,7 +45,7 @@ HFILES = handle.h jdm.h libxfs.h libxlog.h xqm.h \
        xfs_rtalloc.h xfs_sb.h xfs_trans.h xfs_trans_space.h xfs_types.h
 
 LHFILES = xfs_acl.h xfs_cap.h xfs_mac.h
-DKHFILES = mountinfo.h volume.h fstyp.h dvh.h
+DKHFILES = volume.h fstyp.h dvh.h
 LSRCFILES = platform_defs.h.in builddefs.in buildmacros buildrules \
        $(LHFILES) $(DKHFILES)
 LDIRT = xfs
diff --git a/include/mountinfo.h b/include/mountinfo.h
deleted file mode 100644 (file)
index 1c9773f..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
- * 
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- * 
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * 
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like.  Any license provided herein, whether implied or
- * otherwise, applies only to this software file.  Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- * 
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- * 
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA  94043, or:
- * 
- * http://www.sgi.com 
- * 
- * For further information regarding this notice, see: 
- * 
- * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
- */
-#ifndef __MOUNTINFO_H__
-#define __MOUNTINFO_H__
-
-/*
- * mountinfo.h
- * Header for disk volume/partition check routines
- */
-
-#define MNT_CAUSE_NONE       0x00
-#define MNT_CAUSE_MOUNTED    0x01  /* partition already mounted */
-#define MNT_CAUSE_OVERLAP    0x02  /* partitions overlap */
-#define MNT_CAUSE_NODEV      0x04  /* no /dev/rdsk /dev/dsk entry */
-#define MNT_CAUSE_UNUSED     0x08  /* unallocated partition */
-#define MNT_CAUSE_MULTIMOUNT 0x10  /* multiple owners */
-#define MNT_CAUSE_LVOL_OWNED 0x20  /* owned by logical vol */
-#define MNT_CAUSE_XVM_MNT    0x40  /* mounted xvm subvolume */
-#define MNT_CAUSE_XVM_PART   0x80  /* xvm-owned partition */
-#define MNT_CAUSE__END       0x100 /* last entry */
-
-typedef struct mnt_check_state_s {
-       /* currently unused, remains from IRIX */
-} mnt_check_state_t;
-
-/* prototypes */
-extern int  mnt_check_init (mnt_check_state_t **);
-extern int  mnt_find_mount_conflicts (mnt_check_state_t *, char *);
-extern int  mnt_find_mounted_partitions (mnt_check_state_t *, char *);
-extern int  mnt_causes_test (mnt_check_state_t *, int);
-extern void mnt_causes_show (mnt_check_state_t *, FILE *, char *);
-extern void mnt_plist_show (mnt_check_state_t *, FILE *, char *);
-extern int  mnt_check_end (mnt_check_state_t *);
-
-#endif /* __MOUNTINFO_H__ */
index f54904d0b82e9f35fcdad8d021aee071d49f342a..948e4b6d477c28fb7d54396acec1b96dce80b892 100644 (file)
@@ -38,8 +38,8 @@ LT_CURRENT = 0
 LT_REVISION = 0
 LT_AGE = 0
 
-CFILES = fstype.c pttype.c md.c xvm.c evms.c lvm.c drivers.c mountinfo.c
-HFILES = fstype.h pttype.h md.h xvm.h evms.h
+CFILES = drivers.c fstype.c pttype.c md.c xvm.c evms.c lvm.c
+HFILES = drivers.h fstype.h pttype.h md.h xvm.h evms.h
 
 default: $(LTLIBRARY)
 
index 0468dd452573e0728217a75ebf8ec8785e20a8a4..724fe30292e67cd459306aab6e870316244ffb18 100644 (file)
  * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
  */
 
-#include <stdio.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <volume.h>
-
-extern int   md_get_subvol_stripe(char*, sv_type_t, int*, int*, struct stat64*);
-extern int  lvm_get_subvol_stripe(char*, sv_type_t, int*, int*, struct stat64*);
-extern int  xvm_get_subvol_stripe(char*, sv_type_t, int*, int*, struct stat64*);
-extern int evms_get_subvol_stripe(char*, sv_type_t, int*, int*, struct stat64*);
+#include "drivers.h"
 
 void
 get_subvol_stripe_wrapper(char *dev, sv_type_t type, int *sunit, int *swidth)
@@ -79,8 +69,7 @@ get_driver_block_major(const char *driver)
        char    buf[64], puf[64];
        int     major = -1;
 
-#define PROC_DEVICES   "/proc/devices"
-       if ((f = fopen(PROC_DEVICES, "r")) == NULL)
+       if ((f = fopen("/proc/devices", "r")) == NULL)
                return major;
        while (fgets(buf, sizeof(buf), f))      /* skip to block dev section */
                if (strncmp("Block devices:\n", buf, sizeof(buf)) == 0)
diff --git a/libdisk/drivers.h b/libdisk/drivers.h
new file mode 100644 (file)
index 0000000..395f405
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
+ * 
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ * 
+ * This program is distributed in the hope that it would be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * 
+ * Further, this software is distributed without any warranty that it is
+ * free of the rightful claim of any third person regarding infringement
+ * or the like.  Any license provided herein, whether implied or
+ * otherwise, applies only to this software file.  Patent licenses, if
+ * any, provided herein do not apply to combinations of this program with
+ * other software, or any other product whatsoever.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write the Free Software Foundation, Inc., 59
+ * Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ * 
+ * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
+ * Mountain View, CA  94043, or:
+ * 
+ * http://www.sgi.com 
+ * 
+ * For further information regarding this notice, see: 
+ * 
+ * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
+ */
+
+#include <stdio.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <volume.h>
+
+/*
+ * This stuff is all very platform specific.
+ */
+
+#ifdef __linux__
+extern int   md_get_subvol_stripe(char*, sv_type_t, int*, int*, struct stat64*);
+extern int  lvm_get_subvol_stripe(char*, sv_type_t, int*, int*, struct stat64*);
+extern int  xvm_get_subvol_stripe(char*, sv_type_t, int*, int*, struct stat64*);
+extern int evms_get_subvol_stripe(char*, sv_type_t, int*, int*, struct stat64*);
+#else
+#define stat64 stat
+#define   md_get_subvol_stripe(dev, type, a, b, stat)  (-1)
+#define  lvm_get_subvol_stripe(dev, type, a, b, stat)  (-1)
+#define  xvm_get_subvol_stripe(dev, type, a, b, stat)  (-1)
+#define evms_get_subvol_stripe(dev, type, a, b, stat)  (-1)
+#endif
diff --git a/libdisk/mountinfo.c b/libdisk/mountinfo.c
deleted file mode 100644 (file)
index a639447..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
- * 
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- * 
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * 
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like.  Any license provided herein, whether implied or
- * otherwise, applies only to this software file.  Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- * 
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- * 
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA  94043, or:
- * 
- * http://www.sgi.com 
- * 
- * For further information regarding this notice, see: 
- * 
- * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
- */
-
-#include <stdio.h>
-#include <fcntl.h>
-#include <mntent.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <sys/param.h>
-#include "mountinfo.h"
-
-int
-mnt_check_init(mnt_check_state_t **check_state)
-{
-       return(0);
-}
-
-int
-mnt_find_mount_conflicts(mnt_check_state_t *check_state, char *devname)
-{
-#define PROC_MOUNTED   "/proc/mounts"
-       int             sts = 0;
-       FILE            *f;
-       struct mntent   *mnt;
-       struct stat64   ns, ms;
-       char            mounts[MAXPATHLEN];
-
-       if (stat64(devname, &ns) < 0)
-               return sts;
-
-       strcpy(mounts, access(PROC_MOUNTED, R_OK)? PROC_MOUNTED : MOUNTED);
-       if ((f = setmntent(mounts, "r")) == NULL)
-               return sts;
-       while ((mnt = getmntent(f)) != NULL) {
-               if (stat64(mnt->mnt_fsname, &ms) < 0)
-                       continue;
-               if (S_ISBLK(ms.st_mode) && ns.st_rdev == ms.st_rdev)
-                       break;
-               if (!S_ISBLK(ms.st_mode) && !strcmp(devname, mnt->mnt_fsname))
-                       break;
-       }
-       endmntent(f);
-       if (mnt)
-               sts = 1;
-       return sts;
-}
-
-int
-mnt_find_mounted_partitions(mnt_check_state_t *check_state, char *devname)
-{
-       return 0;
-}
-
-int
-mnt_causes_test(mnt_check_state_t *check_state, int cause)
-{
-       switch(cause) {
-       case MNT_CAUSE_MOUNTED:
-               return(1);
-
-       default:
-               fprintf(stderr, "mnt_causes_test: unknown cause %d\n", cause);
-               exit(99);
-       }
-}
-
-void
-mnt_causes_show(mnt_check_state_t *check_state, FILE *fp, char *prefix)
-{
-       fprintf(fp, "mnt_causes_show: not implemented. Called with %s\n",
-               prefix);
-       exit(98);
-}
-
-void
-mnt_plist_show(mnt_check_state_t *check_state, FILE *fp, char *prefix)
-{
-       /*
-        * Need to do some work for volume mgmt.
-        */
-}
-
-int
-mnt_check_end(mnt_check_state_t *check_state)
-{
-       return(0);
-}
index e84429d2413005e7a1ee93a1d7bbe9cf1c3d75ea..12ed223eb16fcf2269126b5b9d8fb9f83e1c5d93 100644 (file)
 
 #define blksize 512
 
-static __uint32_t
-twos_complement_32bit_sum(__uint32_t *base, int size)
+static u_int32_t
+twos_complement_32bit_sum(u_int32_t *base, int size)
 {
        int i;
-       __uint32_t sum = 0;
+       u_int32_t sum = 0;
 
-       size = size / sizeof(__uint32_t);
+       size = size / sizeof(u_int32_t);
        for (i = 0; i < size; i++)
                sum = sum - ntohl(base[i]);
        return sum;
@@ -55,12 +55,12 @@ twos_complement_32bit_sum(__uint32_t *base, int size)
 static int
 sgi_parttable(char *base)
 {
-       __uint32_t csum;
+       u_int32_t csum;
        struct volume_header *vh = (struct volume_header *)base;
 
        if (ntohl(vh->vh_magic) != VHMAGIC)
                return 0;
-       csum = twos_complement_32bit_sum((__uint32_t *)vh,
+       csum = twos_complement_32bit_sum((u_int32_t *)vh,
                                         sizeof(struct volume_header));
        return !csum;
 }
index 3d0b71fffbed1553529ddb67ec0e4b911ed3c339..3193eba45451fe85ea00f002df5afcdc44b4ee77 100644 (file)
@@ -20,8 +20,8 @@ typedef struct {
        unsigned short nsect;      /* Sectors per track */
        unsigned char spare3[4];   /* Even more magic... */
        struct sun_partition {
-               __uint32_t start_cylinder;
-               __uint32_t num_sectors;
+               u_int32_t start_cylinder;
+               u_int32_t num_sectors;
        } partitions[8];
        unsigned short magic;      /* Magic number */
        unsigned short csum;       /* Label xor'd checksum */
index 65787ecf0be6ff3bfd966f3cae4fb1d1d584b394..c8439381df4be9e960c8c1d13871b2efe354b47f 100644 (file)
@@ -6,7 +6,7 @@ mkfs.xfs \- construct an XFS filesystem
 \f3mkfs.xfs\f1 [ \f3\-b\f1 subopt=value ] [ \f3\-d\f1 subopt[=value] ]
        [ \f3\-i\f1 subopt=value ] [ \f3\-l\f1 subopt[=value] ]
        [ \f3\-n\f1 subopt[=value] ] [ \f3\-p\f1 protofile ] [ \f3\-q\f1 ]
-       [ \f3\-r\f1 subopt[=value] ] [ \f3\-C\f1 ] [ \f3\-L\f1 label ] device
+       [ \f3\-r\f1 subopt[=value] ] [ \f3\-N\f1 ] [ \f3\-L\f1 label ] device
 .fi
 .SH DESCRIPTION
 .I mkfs.xfs
@@ -73,8 +73,8 @@ The block size is specified either as a base two logarithm value with
 .BR log= ,
 or in bytes with
 .BR size= .
-The default value is 4096 bytes (4 KB) on systems with a 4KB pagesize.
-The minimum value for block size is 512; the maximum is 65536 (64 KB).
+The default value is 4096 bytes (4 KB), the minimum is 512, and the
+maximum is 65536 (64 KB).
 XFS on Linux currently only supports pagesize or smaller blocks.
 .TP
 .B \-d
@@ -586,19 +586,6 @@ This suboption is only needed if the real-time section of the
 filesystem should occupy
 less space than the size of the partition or logical volume containing the section.
 .TP
-.B \-C
-Disable overlapping partition/volume checks.
-.IP
-By default \f2mkfs.xfs\f1 checks to see if the destination partition or logical
-volume overlaps any mounted or reserved partitions in the system.  If an
-overlap or mount conflict is found, the user will be notified and prevented
-from potentially corrupting the existing data.  For systems with
-a large number of disks, this additional checking may add noticable overhead
-to the command's execution time.  For situations where command performance is
-necessary, this switch may be used to disable the safeguards.  Due to the
-potential for user-error causing corrupted filesystems or other on-disk
-data corruption, we strongly discourage use of this switch in normal operation.
-.TP
 \f3\-L\f1 \f2label\f1
 Set the filesystem label.
 XFS filesystem labels can be at most 12 characters long; if
@@ -610,6 +597,10 @@ will not proceed with creating the filesystem.  Refer to the
 and
 .IR xfs_admin (8)
 manual entries for additional information.
+.TP
+.B \-N
+Causes the file system parameters to be printed out without really
+creating the file system.
 .SH SEE ALSO
 mkfs(8),
 mount(8),
index 7b787d3192ce37a0cdd46e5919bd2e7cc3d09390..038cfed5d131a8a348f4ae8e2880db127b47aa90 100644 (file)
  * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
  */
 
-#include <stdio.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
+#include <libxfs.h>
 #include <fstyp.h>
 
 /*
index c67cf87516eab109fbdf8dbbc21d3ab526050b9e..5113620a06dc35f01daa0d58b53ee453fb5e6a0b 100644 (file)
@@ -31,6 +31,7 @@
  */
 
 #include <libxfs.h>
+#include <sys/stat.h>
 #include "proto.h"
 
 /*
index 0e67fc1c531f7bd6d260ba2aee016c75d2d5a111..bd6ff68f2655d9d218de458956478071ddb99734 100644 (file)
@@ -33,7 +33,6 @@
 #include <fstyp.h>
 #include <stdio.h>
 #include <volume.h>
-#include <mountinfo.h>
 #include <libxfs.h>
 #include <ctype.h>
 
@@ -433,7 +432,6 @@ main(int argc, char **argv)
        int                     dirblocklog;
        int                     dirblocksize;
        int                     dirversion;
-       int                     do_overlap_checks;
        char                    *dsize;
        int                     dsu;
        int                     dsw;
@@ -468,8 +466,6 @@ main(int argc, char **argv)
        int                     lsu;
        int                     lsunit;
        int                     min_logblocks;
-       mnt_check_state_t       *mnt_check_state;
-       int                     mnt_partition_count;
        xfs_mount_t             *mp;
        xfs_mount_t             mbuf;
        xfs_extlen_t            nbmblocks;
@@ -478,6 +474,7 @@ main(int argc, char **argv)
        xfs_alloc_rec_t         *nrec;
        int                     nsflag;
        int                     nvflag;
+       int                     Nflag;
        char                    *p;
        char                    *protofile;
        char                    *protostring;
@@ -508,7 +505,7 @@ main(int argc, char **argv)
        loginternal = 1;
        logversion = 1;
        logagno = logblocks = rtblocks = 0;
-       nlflag = nsflag = nvflag = 0;
+       Nflag = nlflag = nsflag = nvflag = 0;
        dirblocklog = dirblocksize = dirversion = 0;
        qflag = 0;
        imaxpct = inodelog = inopblock = isize = 0;
@@ -520,16 +517,13 @@ main(int argc, char **argv)
        dsize = logsize = rtsize = rtextsize = protofile = NULL;
        opterr = 0;
        dsu = dsw = dsunit = dswidth = nodsflag = lalign = lsu = lsunit = 0;
-       do_overlap_checks = 1;
        extent_flagging = 0;
        force_overwrite = 0;
        worst_freelist = 0;
 
-       while ((c = getopt(argc, argv, "b:d:i:l:L:n:p:qr:CfV")) != EOF) {
+       while ((c = getopt(argc, argv, "b:d:i:l:L:n:Np:qr:CfV")) != EOF) {
                switch (c) {
                case 'C':
-                       do_overlap_checks = 0;
-                       break;
                case 'f':
                        force_overwrite = 1;
                        break;
@@ -584,7 +578,8 @@ main(int argc, char **argv)
                                                reqval('d', dopts, D_AGCOUNT);
                                        if (daflag)
                                                respec('d', dopts, D_AGCOUNT);
-                                       agcount = (__uint64_t)atoll(value);
+                                       agcount = (__uint64_t)
+                                               strtoul(value, NULL, 10);
                                        if ((__int64_t)agcount <= 0)
                                                illegal(value, "d agcount");
                                        daflag = 1;
@@ -937,6 +932,9 @@ main(int argc, char **argv)
                                }
                        }
                        break;
+               case 'N':
+                       Nflag = 1;
+                       break;
                case 'p':
                        if (protofile)
                                respec('p', 0, 0);
@@ -1260,50 +1258,6 @@ main(int argc, char **argv)
                }
        }
 
-       if (!xi.disfile && do_overlap_checks) {
-               /*
-                * do partition overlap check
-                * If this is a straight file we assume that it's been created
-                * before the call to mnt_check_init()
-                */
-
-                if (mnt_check_init(&mnt_check_state) == -1) {
-                        fprintf(stderr,
-                               "unable to initialize mount checking "
-                               "routines, bypassing protection checks.\n");
-               } else {
-                       mnt_partition_count = mnt_find_mount_conflicts(
-                               mnt_check_state, dfile);
-
-                       /* 
-                        * ignore -1 return codes, since 3rd party devices
-                        * may not be part of hinv.
-                        */
-                       if (mnt_partition_count > 0) {
-                               if (mnt_causes_test(mnt_check_state, MNT_CAUSE_MOUNTED)) {
-                                       fprintf(stderr, "%s: "
-                                               "%s is already in use.\n",
-                                               progname, dfile);
-                               } else if (mnt_causes_test(mnt_check_state, MNT_CAUSE_OVERLAP)) {
-                                       fprintf(stderr, "%s: "
-                                               "%s overlaps partition(s) "
-                                               "already in use.\n",
-                                               progname, dfile);
-                               } else {
-                                       mnt_causes_show(mnt_check_state, stderr, progname);
-                               }
-                               fprintf(stderr, "\n");
-                               fflush(stderr);
-                               mnt_plist_show(mnt_check_state, stderr, progname);
-                               fprintf(stderr, "\n");
-                       }
-                       mnt_check_end(mnt_check_state);
-                       if (mnt_partition_count > 0) {
-                               usage();
-                       }
-               }
-       }
-
        if (!liflag && !ldflag)
                loginternal = xi.logdev == 0;
        if (xi.logname)
@@ -1813,6 +1767,27 @@ an AG size that is one stripe unit smaller, for example %llu\n",
                XFS_SB_VERSION_MKFS(iaflag, dsunit != 0, extent_flagging,
                        dirversion == 2, logversion == 2);
 
+       if (!qflag || Nflag) {
+               printf(
+                  "meta-data=%-22s isize=%-6d agcount=%lld, agsize=%lld blks\n"
+                  "data     =%-22s bsize=%-6d blocks=%lld, imaxpct=%d\n"
+                  "         =%-22s sunit=%-6d swidth=%d blks, unwritten=%d\n"
+                  "naming   =version %-14d bsize=%-6d\n"
+                  "log      =%-22s bsize=%-6d blocks=%lld, version=%d\n"
+                  "         =%-22s sunit=%d blks\n"
+                  "realtime =%-22s extsz=%-6d blocks=%lld, rtextents=%lld\n",
+                       dfile, isize, (long long)agcount, (long long)agsize,
+                       "", blocksize, (long long)dblocks, sbp->sb_imax_pct,
+                       "", dsunit, dswidth, extent_flagging,
+                       dirversion, dirversion == 1 ? blocksize : dirblocksize,
+                       logfile, 1 << blocklog, (long long)logblocks,
+                       logversion, "", lsunit,
+                       rtfile, rtextblocks << blocklog,
+                       (long long)rtblocks, (long long)rtextents);
+               if (Nflag)
+                       exit(0);
+       }
+
        /*
         * Zero out the first 68k in on the device, to obliterate any old 
         * filesystem signatures out there.  This should take care of 
@@ -1831,23 +1806,6 @@ an AG size that is one stripe unit smaller, for example %llu\n",
                        XFS_SB_ALL_BITS);
        libxfs_writebuf(buf, 1);
 
-       if (!qflag)
-               printf(
-                  "meta-data=%-22s isize=%-6d agcount=%lld, agsize=%lld blks\n"
-                  "data     =%-22s bsize=%-6d blocks=%lld, imaxpct=%d\n"
-                  "         =%-22s sunit=%-6d swidth=%d blks, unwritten=%d\n"
-                  "naming   =version %-14d bsize=%-6d\n"
-                  "log      =%-22s bsize=%-6d blocks=%lld, version=%d\n"
-                  "         =%-22s sunit=%d blks\n"
-                  "realtime =%-22s extsz=%-6d blocks=%lld, rtextents=%lld\n",
-                       dfile, isize, (long long)agcount, (long long)agsize,
-                       "", blocksize, (long long)dblocks, sbp->sb_imax_pct,
-                       "", dsunit, dswidth, extent_flagging,
-                       dirversion, dirversion == 1 ? blocksize : dirblocksize,
-                       logfile, 1 << blocklog, (long long)logblocks,
-                       logversion, "", lsunit,
-                       rtfile, rtextblocks << blocklog,
-                       (long long)rtblocks, (long long)rtextents);
        /*
         * If the data area is a file, then grow it out to its final size
         * so that the reads for the end of the device in the mount code