]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Keep userspace packaging in sync, portability changes; sync user/kernel source/header...
authorNathan Scott <nathans@sgi.com>
Thu, 30 Sep 2004 14:52:19 +0000 (14:52 +0000)
committerNathan Scott <nathans@sgi.com>
Thu, 30 Sep 2004 14:52:19 +0000 (14:52 +0000)
Merge of xfs-cmds-melb:slinx:19613a by kenmcd.

29 files changed:
VERSION
debian/changelog
doc/CHANGES
include/builddefs.in
include/buildmacros
include/libxfs.h
include/platform_defs.h.in
include/xfs_arch.h
include/xfs_bmap.h
include/xfs_bmap_btree.h
include/xfs_dfrag.h
include/xfs_dinode.h
include/xfs_fs.h
include/xfs_inode.h
include/xfs_mount.h
include/xfs_quota.h
include/xfs_sb.h
include/xfs_trans.h
include/xfs_types.h
libxfs/init.c
libxfs/xfs_alloc.c
libxfs/xfs_alloc_btree.c
libxfs/xfs_bmap.c
libxfs/xfs_bmap_btree.c
libxfs/xfs_da_btree.c
libxfs/xfs_mount.c
man/man8/mkfs.xfs.8
man/man8/xfs_db.8
mkfs/xfs_mkfs.c

diff --git a/VERSION b/VERSION
index da221c84d7e184da0c532825dbcf5521556c01e8..714a5aabcb401e6add98cdb0849c48ebc1af6f6e 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -3,5 +3,5 @@
 #
 PKG_MAJOR=2
 PKG_MINOR=6
-PKG_REVISION=23
+PKG_REVISION=24
 PKG_BUILD=1
index e756b508725c277437e0f29a6e100cf6d84a358e..741c7d00ab34130d6508c6bc1ad88e7f995135d9 100644 (file)
@@ -1,3 +1,9 @@
+xfsprogs (2.6.24-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Nathan Scott <nathans@debian.org>  Wed, 29 Sep 2004 11:28:20 +1000
+
 xfsprogs (2.6.23-1) unstable; urgency=low
 
   * New upstream release.
index 26cbf781c08377f08dafbdbbb65fb3829ab8efcf..0cc43a53967fdd66e0b2f72ed380d6f830d693f0 100644 (file)
@@ -1,10 +1,18 @@
+xfsprogs-2.6.24 (29 September 2004)
+       - Allow 'e' suffix in size arguments to mkfs.
+       - Update mkfs man page description of maximum allocation
+         group size.
+       - Update mkfs and xfs_db man pages to use consistent,
+         standard notations.
+       - Sync up user/kernel source in libxfs and headers.
+
 xfsprogs-2.6.23 (17 September 2004)
        - Fix xfs_io pread/pwrite -b option, when used more than
          once we would use the largest of the previous values,
          instead of the (possibly smaller) value specified.
        - Add recursive modes to lsattr/chattr xfs_io commands.
-        - Make xfs_io run any given command line commands (-c)
-          on all files specified, not just the first.
+       - Make xfs_io run any given command line commands (-c)
+         on all files specified, not just the first.
 
 xfsprogs-2.6.22 (10 September 2004)
        - Update xfs_io to get a clean compile on IRIX with the
index 7710215aa5a19770aeb77a06608ebf9dd6a07bd8..ea27618dab5429310211fc61aa516ee56ce4574a 100644 (file)
@@ -113,9 +113,9 @@ PLDLIBS = -L/usr/local/lib -lintl
 PCFLAGS = -I/usr/local/include
 endif
 
-GCFLAGS += -O1 $(OPTIMIZER) $(DEBUG) -funsigned-char -Wall -I$(TOPDIR)/include \
-       -DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\" \
-       -DPACKAGE=\"$(PKG_NAME)\"
+GCFLAGS = -O1 $(OPTIMIZER) $(DEBUG) -funsigned-char -fno-strict-aliasing -Wall \
+         -DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\"  \
+         -DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include
 
 # Global, Platform, Local CFLAGS
 CFLAGS += $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
index 2cfaa52fe0b315f510549d4dd9a770e13c60bbb6..28806272d4703f85e62281e84a000007789cbce8 100644 (file)
@@ -72,7 +72,7 @@ LTVERSION = $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
 LTLINK = $(LIBTOOL) --mode=link $(CC)
 LTEXEC = $(LIBTOOL) --mode=execute
 LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CCF) -D_REENTRANT -fno-strict-aliasing
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CCF)
 
 ifeq ($(ENABLE_SHARED),yes)
 LTLDFLAGS += -rpath $(PKG_LIB_DIR)
index c971a9875edf7f394f254d4c4679d959a3cd3eeb..0262c4ce1e2902c18128044a44a535a72ab76896 100644 (file)
@@ -145,6 +145,7 @@ extern int  libxfs_log_header (xfs_caddr_t, uuid_t *, int, int, int,
 struct xfs_inode;
 typedef struct xfs_mount {
        xfs_sb_t                m_sb;           /* copy of fs superblock */
+       char                    *m_fsname;      /* filesystem name */
        int                     m_bsize;        /* fs logical block size */
        xfs_agnumber_t          m_agfrotor;     /* last ag where space found */
        xfs_agnumber_t          m_agirotor;     /* last ag dir inode alloced */
@@ -206,7 +207,7 @@ typedef struct xfs_mount {
 extern xfs_mount_t     *libxfs_mount (xfs_mount_t *, xfs_sb_t *,
                                dev_t, dev_t, dev_t, int);
 extern void    libxfs_mount_common (xfs_mount_t *, xfs_sb_t *);
-extern void    libxfs_initialize_perag (xfs_mount_t *, int);
+extern xfs_agnumber_t  libxfs_initialize_perag (xfs_mount_t *, xfs_agnumber_t);
 extern void    libxfs_umount (xfs_mount_t *);
 extern int     libxfs_rtmount_init (xfs_mount_t *);
 extern void    libxfs_alloc_compute_maxlevels (xfs_mount_t *);
index 902be05bb1ac54c5dd7e8c11ebbc63a1fa7f89ca..c216e93363f33bd3487cddcb52103af6aa728836 100644 (file)
@@ -127,6 +127,10 @@ typedef unsigned long long __psunsigned_t;
 # define ASSERT(EX)    ((void) 0)
 #endif
 
+#ifndef __user
+#define __user
+#endif
+
 #define IRIX_DEV_BITSMAJOR      14
 #define IRIX_DEV_BITSMINOR      18
 #define IRIX_DEV_MAXMAJ         0x1ff
index 3d65fe3c65830065d9875272cdeaa9ad231b74b2..3c7a90bfb0e31e2c68d14a55f8f02450730f7cd5 100644 (file)
 
 /* does not return a value */
 #define INT_MOD_EXPR(reference,arch,code) \
-    (void)(((arch) == ARCH_NOCONVERT) \
+    (((arch) == ARCH_NOCONVERT) \
        ? \
-           ((reference) code) \
+           (void)((reference) code) \
        : \
-           ( \
+           (void)( \
                (reference) = INT_GET((reference),arch) , \
                ((reference) code), \
                INT_SET(reference, arch, reference) \
 
 /* does not return a value */
 #define INT_COPY(dst,src,arch) \
-    (void)( \
+    ( \
        ((sizeof(dst) == sizeof(src)) || ((arch) == ARCH_NOCONVERT)) \
            ? \
-               ((dst) = (src)) \
+               (void)((dst) = (src)) \
            : \
                INT_SET(dst, arch, INT_GET(src, arch)) \
     )
index 429e053f6917127faa75d79a9cdba180c9028d87..f1bc22fb26aec4abb63a7df717c22f40f7a3114a 100644 (file)
@@ -177,13 +177,6 @@ void
 xfs_bmap_cancel(
        xfs_bmap_free_t         *flist);        /* free list to clean up */
 
-/*
- * Routine to check if a specified inode is swap capable.
- */
-int
-xfs_bmap_check_swappable(
-       struct xfs_inode        *ip);           /* incore inode */
-
 /*
  * Compute and fill in the value of the maximum depth of a bmap btree
  * in this filesystem.  Done once, during mount.
@@ -335,7 +328,7 @@ int                                         /* error code */
 xfs_getbmap(
        bhv_desc_t              *bdp,           /* XFS behavior descriptor*/
        struct getbmap          *bmv,           /* user bmap structure */
-       void                    *ap,            /* pointer to user's array */
+       void                    __user *ap,     /* pointer to user's array */
        int                     iflags);        /* interface flags */
 
 /*
index 6bc85d7911c6580e55b83abbcf6639fe92e2e637..a4a666a7c3a0f9f35200c463bdce06640494602f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000,2002-2004 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
@@ -153,7 +153,7 @@ typedef enum {
  */
 typedef enum {
        XFS_EXT_NORM, XFS_EXT_UNWRITTEN,
-       XFS_EXT_DMAPI_OFFLINE
+       XFS_EXT_DMAPI_OFFLINE, XFS_EXT_INVALID
 } xfs_exntst_t;
 
 /*
@@ -673,7 +673,7 @@ xfs_bmbt_update(
        xfs_filblks_t,
        xfs_exntst_t);
 
-#ifdef XFSDEBUG
+#ifdef DEBUG
 /*
  * Get the data from the pointed-to record.
  */
index 0e1c26fba89354080c4102dd5ec39372acf67e16..904860594b8f1f3816337a8659410d05fcf66ac7 100644 (file)
@@ -60,7 +60,7 @@ typedef struct xfs_swapext
 /*
  * Syscall interface for xfs_swapext
  */
-int    xfs_swapext(struct xfs_swapext *sx);
+int    xfs_swapext(struct xfs_swapext __user *sx);
 
 #endif /* __KERNEL__ */
 
index f43530fdce9f19eb90abd310824d9cfd4b72a901..d395f783833a16e22ad0c68c471c7d3336b9ed1a 100644 (file)
@@ -457,7 +457,7 @@ xfs_dinode_t *xfs_buf_to_dinode(struct xfs_buf *bp);
 #define XFS_DIFLAG_NOATIME_BIT   6     /* do not update atime */
 #define XFS_DIFLAG_NODUMP_BIT    7     /* do not dump */
 #define XFS_DIFLAG_RTINHERIT_BIT 8     /* create with realtime bit set */
-#define XFS_DIFLAG_PROJINHERIT_BIT  9  /* create with parents project id */
+#define XFS_DIFLAG_PROJINHERIT_BIT  9  /* create with parents projid */
 #define XFS_DIFLAG_NOSYMLINKS_BIT  10  /* disallow symlink creation */
 #define XFS_DIFLAG_REALTIME      (1 << XFS_DIFLAG_REALTIME_BIT)
 #define XFS_DIFLAG_PREALLOC      (1 << XFS_DIFLAG_PREALLOC_BIT)
index 4c95ee8ecbf4dfbfb66047b912d4ce229bdd2249..6ee8443bf9d33da239e8b389f0dd64108d429324 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995-2004 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 1995-2003 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.1 of the GNU Lesser General Public License
@@ -167,7 +167,7 @@ typedef struct xfs_flock64 {
        __s64           l_start;
        __s64           l_len;          /* len == 0 means until end of file */
        __s32           l_sysid;
-       pid_t           l_pid;
+       __u32           l_pid;
        __s32           l_pad[4];       /* reserve area                     */
 } xfs_flock64_t;
 
@@ -316,10 +316,10 @@ typedef struct xfs_bstat {
  * The user-level BulkStat Request interface structure.
  */
 typedef struct xfs_fsop_bulkreq {
-       __u64           *lastip;        /* last inode # pointer         */
+       __u64           __user *lastip; /* last inode # pointer         */
        __s32           icount;         /* count of entries in buffer   */
-       void            *ubuffer;       /* user buffer for inode desc.  */
-       __s32           *ocount;        /* output count pointer         */
+       void            __user *ubuffer;/* user buffer for inode desc.  */
+       __s32           __user *ocount; /* output count pointer         */
 } xfs_fsop_bulkreq_t;
 
 
@@ -347,12 +347,12 @@ typedef struct xfs_error_injection {
  */
 typedef struct xfs_fsop_handlereq {
        __u32           fd;             /* fd for FD_TO_HANDLE          */
-       void            *path;          /* user pathname                */
+       void            __user *path;   /* user pathname                */
        __u32           oflags;         /* open flags                   */
-       void            *ihandle;       /* user supplied handle         */
+       void            __user *ihandle;/* user supplied handle         */
        __u32           ihandlen;       /* user supplied length         */
-       void            *ohandle;       /* user buffer for handle       */
-       __u32           *ohandlen;      /* user buffer length           */
+       void            __user *ohandle;/* user buffer for handle       */
+       __u32           __user *ohandlen;/* user buffer length          */
 } xfs_fsop_handlereq_t;
 
 /*
@@ -363,35 +363,35 @@ typedef struct xfs_fsop_handlereq {
  */
 
 typedef struct xfs_fsop_setdm_handlereq {
-       struct xfs_fsop_handlereq hreq; /* handle interface structure */
-       struct fsdmidata *data;         /* DMAPI data to set          */
+       struct xfs_fsop_handlereq       hreq;   /* handle information   */
+       struct fsdmidata                __user *data;   /* DMAPI data   */
 } xfs_fsop_setdm_handlereq_t;
 
 typedef struct xfs_attrlist_cursor {
-       __u32   opaque[4];
+       __u32           opaque[4];
 } xfs_attrlist_cursor_t;
 
 typedef struct xfs_fsop_attrlist_handlereq {
-       struct xfs_fsop_handlereq hreq; /* handle interface structure */
-       struct xfs_attrlist_cursor pos; /* opaque cookie, list offset */
-       __u32 flags;                    /* flags, use ROOT/USER names */
-       __u32 buflen;                   /* length of buffer supplied  */
-       void *buffer;                   /* attrlist data to return    */
+       struct xfs_fsop_handlereq       hreq; /* handle interface structure */
+       struct xfs_attrlist_cursor      pos; /* opaque cookie, list offset */
+       __u32                           flags;  /* which namespace to use */
+       __u32                           buflen; /* length of buffer supplied */
+       void                            __user *buffer; /* returned names */
 } xfs_fsop_attrlist_handlereq_t;
 
 typedef struct xfs_attr_multiop {
-       __u32   am_opcode;
-       __s32   am_error;
-       void    *am_attrname;
-       void    *am_attrvalue;
-       __u32   am_length;
-       __u32   am_flags;
+       __u32           am_opcode;
+       __s32           am_error;
+       void            __user *am_attrname;
+       void            __user *am_attrvalue;
+       __u32           am_length;
+       __u32           am_flags;
 } xfs_attr_multiop_t;
 
 typedef struct xfs_fsop_attrmulti_handlereq {
-       struct xfs_fsop_handlereq hreq; /* handle interface structure */
-       __u32 opcount;                  /* count of following multiop */
-       struct xfs_attr_multiop *ops;   /* attr_multi data to get/set */
+       struct xfs_fsop_handlereq       hreq; /* handle interface structure */
+       __u32                           opcount;/* count of following multiop */
+       struct xfs_attr_multiop         __user *ops; /* attr_multi data */
 } xfs_fsop_attrmulti_handlereq_t;
 
 /*
@@ -447,7 +447,13 @@ typedef struct xfs_handle {
 #define XFS_FSOP_GOING_FLAGS_LOGFLUSH          0x1     /* flush log but not data */
 #define XFS_FSOP_GOING_FLAGS_NOLOGFLUSH                0x2     /* don't flush log nor data */
 
-#ifndef HAVE_IOCMACROS
+/*
+ * ioctl commands that are used by Linux filesystems
+ */
+#define XFS_IOC_GETXFLAGS      _IOR('f', 1, long)
+#define XFS_IOC_SETXFLAGS      _IOW('f', 2, long)
+#define XFS_IOC_GETVERSION     _IOR('v', 1, long)
+
 /*
  * ioctl commands that replace IRIX fcntl()'s
  * For 'documentation' purposed more than anything else,
@@ -502,7 +508,7 @@ typedef struct xfs_handle {
 #define XFS_IOC_FSGEOMETRY          _IOR ('X', 124, struct xfs_fsop_geom)
 #define XFS_IOC_GOINGDOWN           _IOR ('X', 125, __uint32_t)
 /*     XFS_IOC_GETFSUUID ---------- deprecated 140      */
-#endif
+
 
 #ifndef HAVE_BBMACROS
 /*
index aa07ce3dc2a73ec5bfa74b72ee6a94198599b8be..f606073adf6bf5f5b052960c6c07f76880087b00 100644 (file)
@@ -459,8 +459,8 @@ xfs_inode_t *xfs_bhvtoi(struct bhv_desc *bhvp);
  * directory, group of new file is set to that of the parent, and
  * new subdirectory gets S_ISGID bit from parent.
  */
-#define XFS_INHERIT_GID(pip, vfsp)     ((pip) != NULL && \
-       (((vfsp)->vfs_flag & VFS_GRPID) || ((pip)->i_d.di_mode & S_ISGID)))
+#define XFS_INHERIT_GID(pip, vfsp)     \
+       (((vfsp)->vfs_flag & VFS_GRPID) || ((pip)->i_d.di_mode & S_ISGID))
 
 /*
  * xfs_iget.c prototypes.
@@ -503,8 +503,9 @@ int         xfs_iread_extents(struct xfs_trans *, xfs_inode_t *, int);
 int            xfs_ialloc(struct xfs_trans *, xfs_inode_t *, mode_t, nlink_t,
                           xfs_dev_t, struct cred *, xfs_prid_t, int,
                           struct xfs_buf **, boolean_t *, xfs_inode_t **);
-void           xfs_xlate_dinode_core(xfs_caddr_t, struct xfs_dinode_core *, int,
-                          xfs_arch_t);
+void           xfs_xlate_dinode_core(xfs_caddr_t, struct xfs_dinode_core *,
+                                       int, xfs_arch_t);
+uint           xfs_dic2xflags(struct xfs_dinode_core *, xfs_arch_t);
 int            xfs_ifree(struct xfs_trans *, xfs_inode_t *,
                           struct xfs_bmap_free *);
 int            xfs_atruncate_start(xfs_inode_t *);
index ea86fbaffd407a945dc8babb39af8ad9336abc51..c194b8ef03aa4cacddfbc7b6fb2efc871e81d2bc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2004 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
@@ -95,7 +95,8 @@ typedef int   (*xfs_send_data_t)(int, struct vnode *,
                        xfs_off_t, size_t, int, vrwlock_t *);
 typedef int    (*xfs_send_mmap_t)(struct vm_area_struct *, uint);
 typedef int    (*xfs_send_destroy_t)(struct vnode *, dm_right_t);
-typedef int    (*xfs_send_namesp_t)(dm_eventtype_t, struct vnode *,
+typedef int    (*xfs_send_namesp_t)(dm_eventtype_t, struct vfs *,
+                       struct vnode *,
                        dm_right_t, struct vnode *, dm_right_t,
                        char *, char *, mode_t, int, int);
 typedef void   (*xfs_send_unmount_t)(struct vfs *, struct vnode *,
@@ -116,7 +117,9 @@ typedef struct xfs_dmops {
 #define XFS_SEND_DESTROY(mp, vp,right) \
        (*(mp)->m_dm_ops.xfs_send_destroy)(vp,right)
 #define XFS_SEND_NAMESP(mp, ev,b1,r1,b2,r2,n1,n2,mode,rval,fl) \
-       (*(mp)->m_dm_ops.xfs_send_namesp)(ev,b1,r1,b2,r2,n1,n2,mode,rval,fl)
+       (*(mp)->m_dm_ops.xfs_send_namesp)(ev,NULL,b1,r1,b2,r2,n1,n2,mode,rval,fl)
+#define XFS_SEND_PREUNMOUNT(mp, vfs,b1,r1,b2,r2,n1,n2,mode,rval,fl) \
+       (*(mp)->m_dm_ops.xfs_send_namesp)(DM_EVENT_PREUNMOUNT,vfs,b1,r1,b2,r2,n1,n2,mode,rval,fl)
 #define XFS_SEND_UNMOUNT(mp, vfsp,vp,right,mode,rval,fl) \
        (*(mp)->m_dm_ops.xfs_send_unmount)(vfsp,vp,right,mode,rval,fl)
 
@@ -379,10 +382,6 @@ typedef struct xfs_mount {
        struct xfs_dmops        m_dm_ops;       /* vector of DMI ops */
        struct xfs_qmops        m_qm_ops;       /* vector of XQM ops */
        struct xfs_ioops        m_io_ops;       /* vector of I/O ops */
-       lock_t                  m_freeze_lock;  /* Lock for m_frozen */
-       uint                    m_frozen;       /* FS frozen for shutdown or
-                                                * snapshot */
-       sv_t                    m_wait_unfreeze;/* waiting to unfreeze */
        atomic_t                m_active_trans; /* number trans frozen */
 } xfs_mount_t;
 
@@ -417,16 +416,14 @@ typedef struct xfs_mount {
 #define XFS_MOUNT_NOUUID       0x00010000      /* ignore uuid during mount */
 #define XFS_MOUNT_NOLOGFLUSH   0x00020000
 #define XFS_MOUNT_IDELETE      0x00040000      /* delete empty inode clusters*/
+#define XFS_MOUNT_SWALLOC      0x00080000      /* turn on stripe width
+                                                * allocation */
 
 /*
  * Default minimum read and write sizes.
  */
 #define XFS_READIO_LOG_LARGE   16
 #define XFS_WRITEIO_LOG_LARGE  16
-/*
- * Default allocation size
- */
-#define XFS_WRITE_IO_LOG       16
 
 /*
  * Max and min values for UIO and mount-option defined I/O sizes;
@@ -554,20 +551,10 @@ extern int        xfs_readsb(xfs_mount_t *mp);
 extern void    xfs_freesb(xfs_mount_t *);
 extern void    xfs_do_force_shutdown(bhv_desc_t *, int, char *, int);
 extern int     xfs_syncsub(xfs_mount_t *, int, int, int *);
-extern void    xfs_initialize_perag(xfs_mount_t *, int);
+extern xfs_agnumber_t  xfs_initialize_perag(xfs_mount_t *, xfs_agnumber_t);
 extern void    xfs_xlatesb(void *, struct xfs_sb *, int, xfs_arch_t,
                        __int64_t);
 
-/*
- * Flags for freeze operations.
- */
-#define XFS_FREEZE_WRITE       1
-#define XFS_FREEZE_TRANS       2
-
-extern void    xfs_start_freeze(xfs_mount_t *, int);
-extern void    xfs_finish_freeze(xfs_mount_t *);
-extern void    xfs_check_frozen(xfs_mount_t *, bhv_desc_t *, int);
-
 extern struct vfsops xfs_vfsops;
 extern struct vnodeops xfs_vnodeops;
 
index 8cddc16397de2c060104f4a43a8d7586c3d8848f..703ec4efcb411574ca3c39a42f52907922922557 100644 (file)
@@ -309,23 +309,27 @@ typedef struct xfs_dqtrxops {
 } xfs_dqtrxops_t;
 
 #define XFS_DQTRXOP(mp, tp, op, args...) \
-                       ((mp)->m_qm_ops.xfs_dqtrxops ? \
-                       ((mp)->m_qm_ops.xfs_dqtrxops->op)(tp, ## args) : 0)
+               ((mp)->m_qm_ops.xfs_dqtrxops ? \
+               ((mp)->m_qm_ops.xfs_dqtrxops->op)(tp, ## args) : 0)
+
+#define XFS_DQTRXOP_VOID(mp, tp, op, args...) \
+               ((mp)->m_qm_ops.xfs_dqtrxops ? \
+               ((mp)->m_qm_ops.xfs_dqtrxops->op)(tp, ## args) : (void)0)
 
 #define XFS_TRANS_DUP_DQINFO(mp, otp, ntp) \
-       XFS_DQTRXOP(mp, otp, qo_dup_dqinfo, ntp)
+       XFS_DQTRXOP_VOID(mp, otp, qo_dup_dqinfo, ntp)
 #define XFS_TRANS_FREE_DQINFO(mp, tp) \
-       XFS_DQTRXOP(mp, tp, qo_free_dqinfo)
+       XFS_DQTRXOP_VOID(mp, tp, qo_free_dqinfo)
 #define XFS_TRANS_MOD_DQUOT_BYINO(mp, tp, ip, field, delta) \
-       XFS_DQTRXOP(mp, tp, qo_mod_dquot_byino, ip, field, delta)
+       XFS_DQTRXOP_VOID(mp, tp, qo_mod_dquot_byino, ip, field, delta)
 #define XFS_TRANS_APPLY_DQUOT_DELTAS(mp, tp) \
-       XFS_DQTRXOP(mp, tp, qo_apply_dquot_deltas)
+       XFS_DQTRXOP_VOID(mp, tp, qo_apply_dquot_deltas)
 #define XFS_TRANS_RESERVE_QUOTA_NBLKS(mp, tp, ip, nblks, ninos, fl) \
        XFS_DQTRXOP(mp, tp, qo_reserve_quota_nblks, mp, ip, nblks, ninos, fl)
 #define XFS_TRANS_RESERVE_QUOTA_BYDQUOTS(mp, tp, ud, gd, nb, ni, fl) \
        XFS_DQTRXOP(mp, tp, qo_reserve_quota_bydquots, mp, ud, gd, nb, ni, fl)
 #define XFS_TRANS_UNRESERVE_AND_MOD_DQUOTS(mp, tp) \
-       XFS_DQTRXOP(mp, tp, qo_unreserve_and_mod_dquots)
+       XFS_DQTRXOP_VOID(mp, tp, qo_unreserve_and_mod_dquots)
 
 #define XFS_TRANS_RESERVE_BLKQUOTA(mp, tp, ip, nblks) \
        XFS_TRANS_RESERVE_QUOTA_NBLKS(mp, tp, ip, nblks, 0, \
index 9e0adf4c48a767c9e0c9f2ed5ad28464d2bc6953..ad090a834ced6909dddfeca1b89608795725f083 100644 (file)
@@ -250,9 +250,9 @@ int xfs_sb_good_version(xfs_sb_t *sbp);
        ((((sbp)->sb_versionnum >= XFS_SB_VERSION_1) && \
          ((sbp)->sb_versionnum <= XFS_SB_VERSION_3)) || \
           ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \
-           !(((sbp)->sb_versionnum & ~XFS_SB_VERSION_OKREALBITS) && \
-             ((sbp)->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT) && \
-             ((sbp)->sb_features2 & ~XFS_SB_VERSION2_OKREALBITS))
+           !(((sbp)->sb_versionnum & ~XFS_SB_VERSION_OKREALBITS) || \
+             (((sbp)->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT) && \
+              ((sbp)->sb_features2 & ~XFS_SB_VERSION2_OKREALBITS)))
 
 #ifdef __KERNEL__
 #define        XFS_SB_GOOD_VERSION(sbp)        \
index b415975b85c612397e6f6ef7e12aa4d7a06019b4..86e53377e8743b9e31e7b17c7d71b10e49c827bc 100644 (file)
@@ -220,7 +220,6 @@ typedef struct xfs_log_item_desc {
 
 #define XFS_LID_DIRTY          0x1
 #define XFS_LID_PINNED         0x2
-#define XFS_LID_SYNC_UNLOCK    0x4
 #define XFS_LID_BUF_STALE      0x8
 
 /*
@@ -1001,7 +1000,6 @@ struct xfs_buf    *xfs_trans_getsb(xfs_trans_t *, struct xfs_mount *, int);
 void           xfs_trans_brelse(xfs_trans_t *, struct xfs_buf *);
 void           xfs_trans_bjoin(xfs_trans_t *, struct xfs_buf *);
 void           xfs_trans_bhold(xfs_trans_t *, struct xfs_buf *);
-void           xfs_trans_bhold_until_committed(xfs_trans_t *, struct xfs_buf *);
 void           xfs_trans_binval(xfs_trans_t *, struct xfs_buf *);
 void           xfs_trans_inode_buf(xfs_trans_t *, struct xfs_buf *);
 void           xfs_trans_inode_buf(xfs_trans_t *, struct xfs_buf *);
index 8d6aac75047cc4edba8f5ba71267a7f889870647..04609d27ea519d13676e2b99fd8f21d25d9da57e 100644 (file)
@@ -58,7 +58,7 @@ typedef enum { B_FALSE,B_TRUE }       boolean_t;
 typedef __int64_t              prid_t;         /* project ID */
 typedef __uint32_t             inst_t;         /* an instruction */
 
-typedef __u64                  xfs_off_t;
+typedef __s64                  xfs_off_t;      /* <file offset> type */
 typedef __u64                  xfs_ino_t;      /* <inode> type */
 typedef __s64                  xfs_daddr_t;    /* <disk address> type */
 typedef char *                 xfs_caddr_t;    /* <core address> type */
index 12bd0c086a53bdd595d987a6b0793f0e62dfcdd6..79f75449a852f78fb50420bcfbac62513c16f83b 100644 (file)
@@ -682,7 +682,7 @@ libxfs_mount(
                exit(1);
        }
 
-       libxfs_initialize_perag(mp, sbp->sb_agcount);
+       mp->m_maxagi = libxfs_initialize_perag(mp, sbp->sb_agcount);
 
        /*
         * mkfs calls mount before the root inode is allocated.
index c77f137c62c13589cefa89a5dd2565584f57b937..90f7e909168bb5bc3a430d5f5b2c43418b5f1d2b 100644 (file)
@@ -572,7 +572,7 @@ xfs_alloc_ag_vextent_exact(
         * Allocate/initialize a cursor for the by-number freespace btree.
         */
        bno_cur = xfs_btree_init_cursor(args->mp, args->tp, args->agbp,
-               args->agno, XFS_BTNUM_BNO, 0, 0);
+               args->agno, XFS_BTNUM_BNO, NULL, 0);
        /*
         * Lookup bno and minlen in the btree (minlen is irrelevant, really).
         * Look for the closest free block <= bno, it must contain bno
@@ -628,7 +628,7 @@ xfs_alloc_ag_vextent_exact(
         * Allocate/initialize a cursor for the by-size btree.
         */
        cnt_cur = xfs_btree_init_cursor(args->mp, args->tp, args->agbp,
-               args->agno, XFS_BTNUM_CNT, 0, 0);
+               args->agno, XFS_BTNUM_CNT, NULL, 0);
        ASSERT(args->agbno + args->len <=
                INT_GET(XFS_BUF_TO_AGF(args->agbp)->agf_length,
                        ARCH_CONVERT));
@@ -695,7 +695,7 @@ xfs_alloc_ag_vextent_near(
         * Get a cursor for the by-size btree.
         */
        cnt_cur = xfs_btree_init_cursor(args->mp, args->tp, args->agbp,
-               args->agno, XFS_BTNUM_CNT, 0, 0);
+               args->agno, XFS_BTNUM_CNT, NULL, 0);
        ltlen = 0;
        bno_cur_lt = bno_cur_gt = NULL;
        /*
@@ -823,7 +823,7 @@ xfs_alloc_ag_vextent_near(
                 * Set up a cursor for the by-bno tree.
                 */
                bno_cur_lt = xfs_btree_init_cursor(args->mp, args->tp,
-                       args->agbp, args->agno, XFS_BTNUM_BNO, 0, 0);
+                       args->agbp, args->agno, XFS_BTNUM_BNO, NULL, 0);
                /*
                 * Fix up the btree entries.
                 */
@@ -851,7 +851,7 @@ xfs_alloc_ag_vextent_near(
         * Allocate and initialize the cursor for the leftward search.
         */
        bno_cur_lt = xfs_btree_init_cursor(args->mp, args->tp, args->agbp,
-               args->agno, XFS_BTNUM_BNO, 0, 0);
+               args->agno, XFS_BTNUM_BNO, NULL, 0);
        /*
         * Lookup <= bno to find the leftward search's starting point.
         */
@@ -863,7 +863,7 @@ xfs_alloc_ag_vextent_near(
                 * search.
                 */
                bno_cur_gt = bno_cur_lt;
-               bno_cur_lt = 0;
+               bno_cur_lt = NULL;
        }
        /*
         * Found something.  Duplicate the cursor for the rightward search.
@@ -1208,7 +1208,7 @@ xfs_alloc_ag_vextent_size(
         * Allocate and initialize a cursor for the by-size btree.
         */
        cnt_cur = xfs_btree_init_cursor(args->mp, args->tp, args->agbp,
-               args->agno, XFS_BTNUM_CNT, 0, 0);
+               args->agno, XFS_BTNUM_CNT, NULL, 0);
        bno_cur = NULL;
        /*
         * Look for an entry >= maxlen+alignment-1 blocks.
@@ -1313,7 +1313,7 @@ xfs_alloc_ag_vextent_size(
         * Allocate and initialize a cursor for the by-block tree.
         */
        bno_cur = xfs_btree_init_cursor(args->mp, args->tp, args->agbp,
-               args->agno, XFS_BTNUM_BNO, 0, 0);
+               args->agno, XFS_BTNUM_BNO, NULL, 0);
        if ((error = xfs_alloc_fixup_trees(cnt_cur, bno_cur, fbno, flen,
                        rbno, rlen, XFSA_FIXUP_CNT_OK)))
                goto error0;
@@ -1460,7 +1460,7 @@ xfs_free_ag_extent(
        /*
         * Allocate and initialize a cursor for the by-block btree.
         */
-       bno_cur = xfs_btree_init_cursor(mp, tp, agbp, agno, XFS_BTNUM_BNO, 0,
+       bno_cur = xfs_btree_init_cursor(mp, tp, agbp, agno, XFS_BTNUM_BNO, NULL,
                0);
        cnt_cur = NULL;
        /*
@@ -1520,7 +1520,7 @@ xfs_free_ag_extent(
        /*
         * Now allocate and initialize a cursor for the by-size tree.
         */
-       cnt_cur = xfs_btree_init_cursor(mp, tp, agbp, agno, XFS_BTNUM_CNT, 0,
+       cnt_cur = xfs_btree_init_cursor(mp, tp, agbp, agno, XFS_BTNUM_CNT, NULL,
                0);
        /*
         * Have both left and right contiguous neighbors.
index 235db5d781ff180a2719643b01aab637a8ff0c71..c3338a27b12d9a9a80f7e69ba7e8c354a916dc3d 100644 (file)
@@ -227,7 +227,7 @@ xfs_alloc_delrec(
                        /*
                         * Update the cursor so there's one fewer level.
                         */
-                       xfs_btree_setbuf(cur, level, 0);
+                       xfs_btree_setbuf(cur, level, NULL);
                        cur->bc_nlevels--;
                } else if (level > 0 &&
                           (error = xfs_alloc_decrement(cur, level, &i)))
index 5042c45c09ea2c8907cb4cac6dd6011a02e789b6..135607ec53413d289ba1f874697b21a900414501 100644 (file)
@@ -195,7 +195,7 @@ xfs_bmap_add_extent(
                *curp = cur;
        }
 done:
-#ifdef XFSDEBUG
+#ifdef DEBUG
        if (!error)
                xfs_bmap_check_leaf_extents(*curp, ip, whichfork);
 #endif
@@ -2929,6 +2929,20 @@ xfs_bmap_do_search_extents(
        int             high;           /* high index of binary search */
        int             low;            /* low index of binary search */
 
+       /*
+        * Initialize the extent entry structure to catch access to
+        * uninitialized br_startblock field.
+        */
+       got.br_startoff = 0xffa5a5a5a5a5a5a5LL;
+       got.br_blockcount = 0xa55a5a5a5a5a5a5aLL;
+       got.br_state = XFS_EXT_INVALID;
+
+#if XFS_BIG_BLKNOS
+       got.br_startblock = 0xffffa5a5a5a5a5a5LL;
+#else
+       got.br_startblock = 0xffffa5a5;
+#endif
+
        if (lastx != NULLEXTNUM && lastx < nextents)
                ep = base + lastx;
        else
@@ -3027,6 +3041,8 @@ xfs_bmap_search_extents(
        xfs_bmbt_rec_t  *base;          /* base of extent list */
        xfs_extnum_t    lastx;          /* last extent index used */
        xfs_extnum_t    nextents;       /* extent list size */
+       xfs_bmbt_rec_t  *ep;            /* extent list entry pointer */
+       int             rt;             /* realtime flag    */
 
        XFS_STATS_INC(xs_look_exlist);
        ifp = XFS_IFORK_PTR(ip, whichfork);
@@ -3034,8 +3050,18 @@ xfs_bmap_search_extents(
        nextents = ifp->if_bytes / (uint)sizeof(xfs_bmbt_rec_t);
        base = &ifp->if_u1.if_extents[0];
 
-       return xfs_bmap_do_search_extents(base, lastx, nextents, bno, eofp,
+       ep = xfs_bmap_do_search_extents(base, lastx, nextents, bno, eofp,
                                          lastxp, gotp, prevp);
+       rt = ip->i_d.di_flags & XFS_DIFLAG_REALTIME;
+       if(!rt && !gotp->br_startblock && (*lastxp != NULLEXTNUM)) {
+                cmn_err(CE_PANIC,"Access to block zero: fs: <%s> inode: %lld "
+                       "start_block : %llx start_off : %llx blkcnt : %llx "
+                       "extent-state : %x \n",
+                       (ip->i_mount)->m_fsname,(long long)ip->i_ino,
+                       gotp->br_startblock, gotp->br_startoff,
+                       gotp->br_blockcount,gotp->br_state);
+        }
+        return ep;
 }
 
 /*
@@ -3697,8 +3723,41 @@ xfs_bmapi(
                                        }
                                        break;
                                }
+
+                               /*
+                                * Split changing sb for alen and indlen since
+                                * they could be coming from different places.
+                                */
+                               if (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) {
+                                       xfs_extlen_t    extsz;
+                                       xfs_extlen_t    ralen;
+                                       if (!(extsz = ip->i_d.di_extsize))
+                                               extsz = mp->m_sb.sb_rextsize;
+                                       ralen = roundup(alen, extsz);
+                                       ralen = ralen / mp->m_sb.sb_rextsize;
+                                       if (xfs_mod_incore_sb(mp,
+                                               XFS_SBS_FREXTENTS,
+                                               -(ralen), rsvd)) {
+                                               if (XFS_IS_QUOTA_ON(ip->i_mount))
+                                                       XFS_TRANS_UNRESERVE_BLKQUOTA(
+                                                               mp, NULL, ip,
+                                                               (long)alen);
+                                               break;
+                                       }
+                               } else {
+                                       if (xfs_mod_incore_sb(mp,
+                                                             XFS_SBS_FDBLOCKS,
+                                                             -(alen), rsvd)) {
+                                               if (XFS_IS_QUOTA_ON(ip->i_mount))
+                                                       XFS_TRANS_UNRESERVE_BLKQUOTA(
+                                                               mp, NULL, ip,
+                                                               (long)alen);
+                                               break;
+                                       }
+                               }
+
                                if (xfs_mod_incore_sb(mp, XFS_SBS_FDBLOCKS,
-                                               -(alen + indlen), rsvd)) {
+                                               -(indlen), rsvd)) {
                                        XFS_TRANS_UNRESERVE_BLKQUOTA(
                                                mp, NULL, ip, (long)alen);
                                        break;
index 233204d487f2ffdd40298b82fe24948f81844162..45754a5c64a902e56ba0d42adb22f251f2027aea 100644 (file)
@@ -1616,7 +1616,7 @@ xfs_bmbt_get_block(
                *bpp = cur->bc_bufs[level];
                rval = XFS_BUF_TO_BMBT_BLOCK(*bpp);
        } else {
-               *bpp = 0;
+               *bpp = NULL;
                ifp = XFS_IFORK_PTR(cur->bc_private.b.ip,
                        cur->bc_private.b.whichfork);
                rval = ifp->if_broot;
index 85beff01a9b73d3c746644cccc347612036bf15c..f0e9e485639bfc560accbe44ed2118806defbacf 100644 (file)
@@ -2017,7 +2017,7 @@ xfs_da_do_buf(
        int             caller,
        inst_t          *ra)
 {
-       xfs_buf_t       *bp = 0;
+       xfs_buf_t       *bp = NULL;
        xfs_buf_t       **bplist;
        int             error=0;
        int             i;
index 32035c7e03b5d8f8ea530f89add9c0ed9235c0c4..89eea4e656039c9277dce7f7d35ee82c6538dbe7 100644 (file)
@@ -228,10 +228,10 @@ xfs_xlatesb(
        }
 }
 
-void
-xfs_initialize_perag(xfs_mount_t *mp, int agcount)
+xfs_agnumber_t
+xfs_initialize_perag(xfs_mount_t *mp, xfs_agnumber_t agcount)
 {
-       int             index, max_metadata;
+       xfs_agnumber_t  index, max_metadata;
        xfs_perag_t     *pag;
        xfs_agino_t     agino;
        xfs_ino_t       ino;
@@ -287,5 +287,5 @@ xfs_initialize_perag(xfs_mount_t *mp, int agcount)
                        pag->pagi_inodeok = 1;
                }
        }
-       mp->m_maxagi = index;
+       return index;
 }
index 8864ac419e7ed3fe925d2a545dcf90f9f4f3d72c..1d4e814627e87fd1e6b0133c9e5bfa9f5f312000 100644 (file)
@@ -57,9 +57,15 @@ If suffixed with \f3b\f1 then the size is converted by multiplying it
 by the filesystems block size (defaults to 4K, see \f3\-b\f1 option below).
 If suffixed with \f3k\f1 then the size is converted by multiplying it by 1024.
 If suffixed with \f3m\f1 then the size is converted by multiplying it by
-1048576 (1024 * 1024).
+one megabyte (1024 * 1024 bytes).
 If suffixed with \f3g\f1 then the size is converted by multiplying it by
-1073741824 (1024 * 1024 * 1024).
+one gigabyte (1024 * 1024 * 1024 bytes).
+If suffixed with \f3t\f1 then the size is converted by multiplying it by
+one terabyte (1024 * 1024 * 1024 * 1024 bytes).
+If suffixed with \f3p\f1 then the size is converted by multiplying it by
+one petabyte (1024 * 1024 * 1024 * 1024 * 1024 bytes).
+If suffixed with \f3e\f1 then the size is converted by multiplying it by
+one exabyte (1024 * 1024 * 1024 * 1024 * 1024 * 1024 bytes).
 .TP
 .B \-b
 Block size options.
@@ -74,8 +80,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), the minimum is 512, and the
-maximum is 65536 (64 KB).
+The default value is 4096 bytes (4 KiB), the minimum is 512, and the
+maximum is 65536 (64 KiB).
 XFS on Linux currently only supports pagesize or smaller blocks.
 .TP
 .B \-d
@@ -103,12 +109,12 @@ The data section of the filesystem is divided into allocation groups
 to improve the performance of XFS.
 More allocation groups imply that more parallelism can be achieved
 when allocating blocks and inodes.
-The minimum allocation group size is 16 MB;
-the maximum size is just under 4 GB.
+The minimum allocation group size is 16 MiB;
+the maximum size is just under 1 TiB.
 The data section of the filesystem is divided into
 .I agcount
-allocation groups (default value 8, unless the filesystem is smaller
-than 128 MB or larger than 8 GB).
+allocation groups (default value is scaled automatically based
+on the underlying device size).
 Setting
 .I agcount
 to a very large number should be avoided, since this causes an unreasonable
@@ -123,7 +129,7 @@ The argument provided to
 is the desired size of the allocation group expressed in bytes
 (usually using the \f3m\f1 or \f3g\f1 suffixes).
 This value must be a multiple of the filesystem block size, and
-must be at least 16MB, and no more than 4GB, and may
+must be at least 16MiB, and no more than 1TiB, and may
 be automatically adjusted to properly align with the stripe geometry.
 The
 .B agcount
@@ -170,7 +176,7 @@ Use the
 suboption to specify the stripe unit size in bytes.
 This suboption ensures that data allocations will be stripe unit aligned
 when the current end of file is being extended and the file size is larger
-than 512KB.
+than 512KiB.
 Also inode allocations and the internal log will be stripe unit aligned.
 .IP
 The
@@ -271,7 +277,7 @@ in bytes with
 or as the number fitting in a filesystem block with
 .BR perblock= .
 The mininum (and default) value is 256 bytes.
-The maximum value is 2048 (2 KB) subject to the restriction that
+The maximum value is 2048 (2 KiB) subject to the restriction that
 the inode size cannot exceed one half of the filesystem block size.
 .IP
 XFS uses 64-bit inode numbers internally; however, the number of
@@ -420,7 +426,7 @@ The block size is specified either as a base two logarithm value with
 .BR log= ,
 or in bytes with
 .BR size= .
-The default size value for version 2 directories is 4096 bytes (4 KB), 
+The default size value for version 2 directories is 4096 bytes (4 KiB), 
 unless the filesystem block size is larger than 4096,
 in which case the default value is the filesystem block size.
 For version 1 directories the block size is the same as the 
@@ -607,10 +613,10 @@ suboption is used to specify the size of the blocks in the real-time
 section of the filesystem.
 This size must be a multiple of the filesystem block size.
 The minimum allowed value is the filesystem block size
-or 4 KB (whichever is larger);
-the default value is the stripe width for striped volumes or 64 KB for
+or 4 KiB (whichever is larger);
+the default value is the stripe width for striped volumes or 64 KiB for
 non-striped volumes;
-the maximum allowed value is 1 GB.
+the maximum allowed value is 1 GiB.
 The real-time extent size should be carefully chosen to match the
 parameters of the physical media used.
 .IP
@@ -635,7 +641,7 @@ The sector size is specified either as a base two logarithm value with
 or in bytes with
 .BR size= .
 The default value is 512 bytes.
-The minimum value for sector size is 512; the maximum is 32768 (32 KB).
+The minimum value for sector size is 512; the maximum is 32768 (32 KiB).
 The sector size must be a power of 2 size and cannot be made larger
 than the filesystem block size.
 .TP
index 08334537f81e93361887fa4ac749cf0f730ab6bc..87cccdc2d2542cc82eb87d41b0febc04df4e1a13 100644 (file)
@@ -746,9 +746,9 @@ Data blocks start at offset 0 in the file.
 There are two kinds of data blocks: single-block directories have
 the leaf information embedded at the end of the block, data blocks
 in multi-block directories do not.
-Node and leaf blocks start at offset 32GB (with either a single
+Node and leaf blocks start at offset 32GiB (with either a single
 leaf block or the root node block).
-Freespace blocks start at offset 64GB.
+Freespace blocks start at offset 64GiB.
 The node and leaf blocks form a Btree, with references to the data
 in the data blocks.
 The freespace blocks form an index of longest free spaces within the
@@ -834,7 +834,7 @@ The quota information is stored in files referred to by the superblock
 Each filesystem block in a quota file contains a constant number of
 quota entries.
 The quota entry size is currently 136 bytes,
-so with a 4KB filesystem block size there are 30 quota entries per block.
+so with a 4KiB filesystem block size there are 30 quota entries per block.
 The \f3dquot\f1 command is used to locate these entries in the filesystem.
 The file entries are indexed by the user or project identifier
 to determine the block and offset.
index 6d7531d908dcaf73f4d844d25f6a7518212129ce..b79a1631e93e359422ae1a7bc110e883f00dcc6f 100644 (file)
@@ -2385,6 +2385,8 @@ cvtnum(
                return 1024LL * 1024LL * 1024LL * 1024LL * i;
        if (*sp == 'p' && sp[1] == '\0')
                return 1024LL * 1024LL * 1024LL * 1024LL * 1024LL * i;
+       if (*sp == 'e' && sp[1] == '\0')
+               return 1024LL * 1024LL * 1024LL * 1024LL * 1024LL * 1024LL * i;
        return -1LL;
 }