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__
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
/* 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__
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);
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 */
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 */
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 */
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 */