From: Eric Sandeen Date: Wed, 10 Jul 2002 17:20:55 +0000 (+0000) Subject: userspace sync-up X-Git-Tag: v2.2.0~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=85a875e9c4edbbb2d0aec1c5ef973785908d6c1d;p=thirdparty%2Fxfsprogs-dev.git userspace sync-up --- diff --git a/include/xfs_bmap.h b/include/xfs_bmap.h index fa1a9e45c..ba61de6ed 100644 --- a/include/xfs_bmap.h +++ b/include/xfs_bmap.h @@ -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 diff --git a/include/xfs_cap.h b/include/xfs_cap.h index fb6455cff..7b53ddd41 100644 --- a/include/xfs_cap.h +++ b/include/xfs_cap.h @@ -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__ diff --git a/libxfs/xfs.h b/libxfs/xfs.h index bf11cf5b3..bf6ad9037 100644 --- a/libxfs/xfs.h +++ b/libxfs/xfs.h @@ -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); diff --git a/libxfs/xfs_bmap.c b/libxfs/xfs_bmap.c index c142598d6..fec46cee4 100644 --- a/libxfs/xfs_bmap.c +++ b/libxfs/xfs_bmap.c @@ -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 */ diff --git a/libxlog/xfs_log_recover.c b/libxlog/xfs_log_recover.c index 0e62c45a1..bc10081c2 100644 --- a/libxlog/xfs_log_recover.c +++ b/libxlog/xfs_log_recover.c @@ -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 */