#undef HI_KOFF
#undef KOFF
-#define ROFF(f) bitize(offsetof(struct xfs_rmap_rec, rm_ ## f))
-
#define RMAPBT_STARTBLOCK_BITOFF 0
#define RMAPBT_BLOCKCOUNT_BITOFF (RMAPBT_STARTBLOCK_BITOFF + RMAPBT_STARTBLOCK_BITLEN)
#define RMAPBT_OWNER_BITOFF (RMAPBT_BLOCKCOUNT_BITOFF + RMAPBT_BLOCKCOUNT_BITLEN)
TYP_NONE },
{ NULL }
};
-#undef ROFF
/* refcount btree blocks */
const field_t refcbt_crc_hfld[] = {
#define REFCNTBT_COWFLAG_BITOFF 0
#define REFCNTBT_STARTBLOCK_BITOFF (REFCNTBT_COWFLAG_BITOFF + REFCNTBT_COWFLAG_BITLEN)
-#define KOFF(f) bitize(offsetof(struct xfs_refcount_key, rc_ ## f))
const field_t refcbt_key_flds[] = {
{ "startblock", FLDT_CAGBLOCK, OI(REFCNTBT_STARTBLOCK_BITOFF), C1, 0, TYP_DATA },
{ "cowflag", FLDT_CCOWFLG, OI(REFCNTBT_COWFLAG_BITOFF), C1, 0, TYP_DATA },
{ NULL }
};
-#undef KOFF
#define ROFF(f) bitize(offsetof(struct xfs_refcount_rec, rc_ ## f))
const field_t refcbt_rec_flds[] = {
#define DEFAULT_MAX_EXT_SIZE MAXEXTLEN
-/*
- * It's possible that multiple files in a directory (or attributes
- * in a file) produce the same obfuscated name. If that happens, we
- * try to create another one. After several rounds of this though,
- * we just give up and leave the original name as-is.
- */
-#define DUP_MAX 5 /* Max duplicates before we give up */
-
/* copy all metadata structures to/from a file */
static int metadump_f(int argc, char **argv);
};
#define OFF(f) bitize(offsetof(struct xfs_dsymlink_hdr, sl_ ## f))
-#define SZOF(f) bitize(sizeof(struct xfs_dsymlink_hdr))
const struct field symlink_crc_flds[] = {
{ "magic", FLDT_UINT32X, OI(OFF(magic)), C1, 0, TYP_NONE },
{ "offset", FLDT_UINT32D, OI(OFF(offset)), C1, 0, TYP_NONE },
#define LOGSIZE 1000
#define FBLOCKS(n) ((n)/blocksize)
-#define RFBYTES(n) ((n) - (FBLOCKS(n) * blocksize))
unsigned long long dirsize=0; /* bytes */
unsigned long long logsize=LOGSIZE*BLOCKSIZE; /* bytes */
#define NULLFD -1
#define GRABSZ 64
#define TARGETRANGE 10
-#define V_NONE 0
-#define V_OVERVIEW 1
-#define V_ALL 2
-#define BUFFER_SIZE (1<<16)
#define BUFFER_MAX (1<<24)
static time_t howlong = 7200; /* default seconds of reorganizing */
#define trace_xfs_alloc_exact_done(a) ((void) 0)
#define trace_xfs_alloc_exact_notfound(a) ((void) 0)
#define trace_xfs_alloc_exact_error(a) ((void) 0)
-#define trace_xfs_alloc_near_nominleft(a) ((void) 0)
#define trace_xfs_alloc_near_first(a) ((void) 0)
#define trace_xfs_alloc_near_greater(a) ((void) 0)
#define trace_xfs_alloc_near_lesser(a) ((void) 0)
#define trace_xfs_alloc_vextent_loopfailed(a) ((void) 0)
#define trace_xfs_alloc_vextent_allfailed(a) ((void) 0)
-#define trace_xfs_log_recover_item_reorder_head(a,b,c,d) ((void) 0)
-#define trace_xfs_log_recover_item_reorder_tail(a,b,c,d) ((void) 0)
#define trace_xfs_log_recover_item_add_cont(a,b,c,d) ((void) 0)
#define trace_xfs_log_recover_item_add(a,b,c,d) ((void) 0)
#define trace_xfs_refcount_find_shared_error(...) ((void) 0)
#define trace_xfs_bmap_remap_alloc(...) ((void) 0)
-#define trace_xfs_bmap_remap_alloc_error(...) ((void) 0)
#define trace_xfs_bmap_deferred(...) ((void) 0)
#define trace_xfs_bmap_defer(...) ((void) 0)
#define xfs_trans_iget libxfs_trans_iget
#define xfs_trans_ichgtime libxfs_trans_ichgtime
#define xfs_trans_ijoin libxfs_trans_ijoin
-#define xfs_trans_ijoin_ref libxfs_trans_ijoin_ref
#define xfs_trans_init libxfs_trans_init
#define xfs_trans_inode_alloc_buf libxfs_trans_inode_alloc_buf
#define xfs_trans_dirty_buf libxfs_trans_dirty_buf
#define xfs_alloc_min_freelist libxfs_alloc_min_freelist
#define xfs_alloc_read_agf libxfs_alloc_read_agf
#define xfs_bmap_last_offset libxfs_bmap_last_offset
-#define xfs_bmap_search_extents libxfs_bmap_search_extents
#define xfs_iext_lookup_extent libxfs_iext_lookup_extent
#define xfs_bmapi_write libxfs_bmapi_write
#define xfs_bmapi_read libxfs_bmapi_read
list_add_tail(&item->ri_list, head);
}
-#define BLK_AVG(blk1, blk2) ((blk1+blk2) >> 1)
-
STATIC int
xlog_recover_add_to_cont_trans(
struct xlog *log,
* dir v1 code, but that format is no longer supported yb the userspace
* utilities and hence is now specific to the attribute tree implementation.
*/
-#define XR_DA_LEAF_MAPSIZE XFS_ATTR_LEAF_MAPSIZE
typedef unsigned char da_freemap_t;
/* separate state bit, OR'ed into high (4th) bit of ex_state field */
#define XR_E_WRITTEN 0x8 /* extent has been written out, can't reclaim */
-#define good_state(state) (((state) & (~XR_E_WRITTEN)) >= XR_E_UNKNOWN && \
- ((state) & (~XR_E_WRITTEN) < XF_E_BAD_STATE))
#define written(state) ((state) & XR_E_WRITTEN)
#define set_written(state) (state) &= XR_E_WRITTEN
return;
}
-/*
- * normalizing constant for bcnt size -> address conversion (see avl ops)
- * used by the AVL tree code to convert sizes and must be used when
- * doing an AVL search in the tree (e.g. avl_findrange(s))
- */
-#define MAXBCNT 0xFFFFFFFF
-#define BCNT_ADDR(cnt) ((unsigned int) MAXBCNT - (cnt))
-
/*
* the next 4 routines manage the trees of free extents -- 2 trees
* per AG. The first tree is sorted by block number. The second
do_error(_("can't get %s for ag %d\n"), objname, agno);
}
-#define SCAN_THREADS 32
-
void
scan_ags(
struct xfs_mount *mp,
size_t bg_inuse; /* number of slots in use */
void **bg_ptrs; /* pointers */
};
-#define BAG_SIZE(nr) (sizeof(struct xfs_bag) + ((nr) * sizeof(void *)))
#define BAG_END(bag) (&(bag)->bg_ptrs[(bag)->bg_nr])
/*
#include "slab.h"
#include "rmap.h"
-#define rounddown(x, y) (((x)/(y))*(y))
-
-#define XR_MAX_SECT_SIZE (64 * 1024)
-
/*
* option tables for getsubopt calls
*/