]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
userspace sync-up
authorEric Sandeen <sandeen@sgi.com>
Wed, 10 Jul 2002 17:20:55 +0000 (17:20 +0000)
committerEric Sandeen <sandeen@sgi.com>
Wed, 10 Jul 2002 17:20:55 +0000 (17:20 +0000)
include/xfs_bmap.h
include/xfs_cap.h
libxfs/xfs.h
libxfs/xfs_bmap.c
libxlog/xfs_log_recover.c

index fa1a9e45c5468050d1e50bc5e2d00d2f0fb90c35..ba61de6ed5cdabff0876d66898a77e19d269769e 100644 (file)
@@ -138,11 +138,11 @@ typedef struct xfs_bmalloca {
        xfs_extlen_t            total;  /* total blocks needed for xaction */
        xfs_extlen_t            minlen; /* mininum allocation size (blocks) */
        xfs_extlen_t            minleft; /* amount must be left after alloc */
-       int                     eof;    /* set if allocating past last extent */
-       int                     wasdel; /* replacing a delayed allocation */
-       int                     userdata;/* set if is user data */
-       int                     low;    /* low on space, using seq'l ags */
-       int                     aeof;   /* allocated space at eof */
+       char                    eof;    /* set if allocating past last extent */
+       char                    wasdel; /* replacing a delayed allocation */
+       char                    userdata;/* set if is user data */
+       char                    low;    /* low on space, using seq'l ags */
+       char                    aeof;   /* allocated space at eof */
 } xfs_bmalloca_t;
 
 #ifdef __KERNEL__
@@ -360,7 +360,7 @@ xfs_bmap_isaeof(
         struct xfs_inode       *ip,
         xfs_fileoff_t          off,
         int                    whichfork,
-        int                    *aeof);
+        char                   *aeof);
 
 /*
  * Check if the endoff is outside the last extent. If so the caller will grow 
index fb6455cffa93c6d3a4199f344f2cf517467b6ac7..7b53ddd41e2e0dc885908d09f9a2e989ca29ed39 100644 (file)
@@ -46,53 +46,16 @@ typedef struct xfs_cap_set {
 /* On-disk XFS extended attribute names */
 #define SGI_CAP_FILE   "SGI_CAP_FILE"
 #define SGI_CAP_FILE_SIZE      (sizeof(SGI_CAP_FILE)-1)
+#define SGI_CAP_LINUX  "SGI_CAP_LINUX"
+#define SGI_CAP_LINUX_SIZE     (sizeof(SGI_CAP_LINUX)-1)
 
-/* On-disk bitfield positions, as defined for us by IRIX */
-#define        XFS_CAP_CHOWN                   1
-#define        XFS_CAP_DAC_WRITE               2
-#define        XFS_CAP_DAC_READ_SEARCH         3
-#define        XFS_CAP_FOWNER                  4
-#define        XFS_CAP_FSETID                  5
-#define        XFS_CAP_KILL                    6
-#define        XFS_CAP_LINK_DIR                7
-#define        XFS_CAP_SETFPRIV                8
-#define        XFS_CAP_SETPPRIV                9
-#define        XFS_CAP_SETGID                  10
-#define        XFS_CAP_SETUID                  11
-#define        XFS_CAP_MAC_DOWNGRADE           12
-#define        XFS_CAP_MAC_READ                13
-#define        XFS_CAP_MAC_RELABEL_SUBJ        14
-#define        XFS_CAP_MAC_WRITE               15
-#define        XFS_CAP_MAC_UPGRADE             16
-#define        XFS_CAP_INF_NOFLOAT_OBJ         17      /* Currently unused */
-#define        XFS_CAP_INF_NOFLOAT_SUBJ        18      /* Currently unused */
-#define        XFS_CAP_INF_DOWNGRADE           19      /* Currently unused */
-#define        XFS_CAP_INF_UPGRADE             20      /* Currently unused */
-#define        XFS_CAP_INF_RELABEL_SUBJ        21      /* Currently unused */
-#define        XFS_CAP_AUDIT_CONTROL           22
-#define        XFS_CAP_AUDIT_WRITE             23
-#define        XFS_CAP_MAC_MLD                 24
-#define        XFS_CAP_MEMORY_MGT              25
-#define        XFS_CAP_SWAP_MGT                26
-#define        XFS_CAP_TIME_MGT                27
-#define        XFS_CAP_SYSINFO_MGT             28
-#define        XFS_CAP_MOUNT_MGT               29
-#define        XFS_CAP_QUOTA_MGT               30
-#define        XFS_CAP_PRIV_PORT               31
-#define        XFS_CAP_STREAMS_MGT             32
-#define        XFS_CAP_SCHED_MGT               33
-#define        XFS_CAP_PROC_MGT                34
-#define        XFS_CAP_SVIPC_MGT               35
-#define        XFS_CAP_NETWORK_MGT             36
-#define        XFS_CAP_DEVICE_MGT              37
-#define        XFS_CAP_ACCT_MGT                38
-#define        XFS_CAP_SHUTDOWN                39
-#define        XFS_CAP_CHROOT                  40
-#define        XFS_CAP_DAC_EXECUTE             41
-#define        XFS_CAP_MAC_RELABEL_OPEN        42
-#define        XFS_CAP_SIGMASK                 43      /* Not implemented */
-#define        XFS_CAP_XTCB                    44      /* X11 Trusted Client */
-
+/*
+ * For Linux, we take the bitfields directly from capability.h
+ * and no longer attempt to keep this attribute ondisk compatible
+ * with IRIX.  Since this attribute is only set on exectuables,
+ * it just doesn't make much sense to try.  We do use a different
+ * named attribute though, to avoid confusion.
+ */
 
 #ifdef __KERNEL__
 
index bf11cf5b31a5f9df902b528b68b6b50363cac1b0..bf6ad9037f2e401591d8ab1cdccb99075a3983b5 100644 (file)
@@ -420,7 +420,7 @@ int  xfs_bmap_extents_to_btree (xfs_trans_t *, xfs_inode_t *, xfs_fsblock_t *,
                        xfs_bmap_free_t *, xfs_btree_cur_t **, int, int *, int);
 void xfs_bmap_delete_exlist (xfs_inode_t *, xfs_extnum_t, xfs_extnum_t, int);
 xfs_filblks_t xfs_bmap_worst_indlen (xfs_inode_t *, xfs_filblks_t);
-int  xfs_bmap_isaeof (xfs_inode_t *, xfs_fileoff_t, int, int *);
+int  xfs_bmap_isaeof (xfs_inode_t *, xfs_fileoff_t, int, char *);
 void xfs_bmap_insert_exlist (xfs_inode_t *, xfs_extnum_t, xfs_extnum_t,
                        xfs_bmbt_irec_t *, int);
 
index c142598d6b3192be15fa1fb77d07e526ac7fed61..fec46cee46b19189d7c4a4ed9b43b65dfce2dd19 100644 (file)
@@ -3578,7 +3578,7 @@ xfs_bmapi(
        xfs_extlen_t    alen;           /* allocated extent length */
        xfs_fileoff_t   aoff;           /* allocated file offset */
        xfs_bmalloca_t  bma;            /* args for xfs_bmap_alloc */
-       int             contig;         /* allocation must be one extent */
+       char            contig;         /* allocation must be one extent */
        xfs_btree_cur_t *cur;           /* bmap btree cursor */
        char            delay;          /* this request is for delayed alloc */
        xfs_fileoff_t   end;            /* end of mapped file region */
@@ -3600,14 +3600,14 @@ xfs_bmapi(
        xfs_extnum_t    nextents;       /* number of extents in file */
        xfs_fileoff_t   obno;           /* old block number (offset) */
        xfs_bmbt_irec_t prev;           /* previous extent list record */
-       int             stateless;      /* ignore state flag set */
+       char            stateless;      /* ignore state flag set */
        int             tmp_logflags;   /* temp flags holder */
        char            trim;           /* output trimmed to match range */
        char            userdata;       /* allocating non-metadata */
        char            wasdelay;       /* old extent was delayed */
        int             whichfork;      /* data or attr fork */
        char            wr;             /* this is a write request */
-       int             rsvd;           /* OK to allocate reserved blocks */
+       char            rsvd;           /* OK to allocate reserved blocks */
 #ifdef DEBUG
        xfs_fileoff_t   orig_bno;       /* original block number value */
        int             orig_flags;     /* original flags arg value */
@@ -4539,7 +4539,7 @@ xfs_bmap_isaeof(
        xfs_inode_t     *ip,            /* incore inode pointer */
        xfs_fileoff_t   off,            /* file offset in fsblocks */
        int             whichfork,      /* data or attribute fork */
-       int             *aeof)          /* return value */
+       char            *aeof)          /* return value */
 {
        int             error;          /* error return value */
        xfs_ifork_t     *ifp;           /* inode fork pointer */
index 0e62c45a12db39d428d1654435e1802e0931a5e6..bc10081c29390c74a51a1ae824f90fc19f7d8ed3 100644 (file)
@@ -93,7 +93,9 @@ xlog_find_verify_cycle( xlog_t                *log,
        xfs_buf_t               *bp;
        char                    *buf        = NULL;
        int                     error       = 0;
-       xfs_daddr_t             bufblks     = nbblks;
+       xfs_daddr_t             bufblks;
+
+       bufblks = 1 << ffs(nbblks);
 
        while (!(bp = xlog_get_bp(bufblks, log->l_mp))) {
                 /* can't get enough memory to do everything in one big buffer */