|
|
| version 1.186, 2007/05/22 15:50:48 | version 1.187, 2007/07/09 15:43:09 |
|---|---|
| Line 55 xfs_alloc_search_busy(xfs_trans_t *tp, | Line 55 xfs_alloc_search_busy(xfs_trans_t *tp, |
| ktrace_t *xfs_alloc_trace_buf; | ktrace_t *xfs_alloc_trace_buf; |
| #define TRACE_ALLOC(s,a) \ | #define TRACE_ALLOC(s,a) \ |
| xfs_alloc_trace_alloc(fname, s, a, __LINE__) | xfs_alloc_trace_alloc(__FUNCTION__, s, a, __LINE__) |
| #define TRACE_FREE(s,a,b,x,f) \ | #define TRACE_FREE(s,a,b,x,f) \ |
| xfs_alloc_trace_free(fname, s, mp, a, b, x, f, __LINE__) | xfs_alloc_trace_free(__FUNCTION__, s, mp, a, b, x, f, __LINE__) |
| #define TRACE_MODAGF(s,a,f) \ | #define TRACE_MODAGF(s,a,f) \ |
| xfs_alloc_trace_modagf(fname, s, mp, a, f, __LINE__) | xfs_alloc_trace_modagf(__FUNCTION__, s, mp, a, f, __LINE__) |
| #define TRACE_BUSY(fname,s,ag,agb,l,sl,tp) \ | #define TRACE_BUSY(__FUNCTION__,s,ag,agb,l,sl,tp) \ |
| xfs_alloc_trace_busy(fname, s, mp, ag, agb, l, sl, tp, XFS_ALLOC_KTRACE_BUSY, __LINE__) | xfs_alloc_trace_busy(__FUNCTION__, s, mp, ag, agb, l, sl, tp, XFS_ALLOC_KTRACE_BUSY, __LINE__) |
| #define TRACE_UNBUSY(fname,s,ag,sl,tp) \ | #define TRACE_UNBUSY(__FUNCTION__,s,ag,sl,tp) \ |
| xfs_alloc_trace_busy(fname, s, mp, ag, -1, -1, sl, tp, XFS_ALLOC_KTRACE_UNBUSY, __LINE__) | xfs_alloc_trace_busy(__FUNCTION__, s, mp, ag, -1, -1, sl, tp, XFS_ALLOC_KTRACE_UNBUSY, __LINE__) |
| #define TRACE_BUSYSEARCH(fname,s,ag,agb,l,sl,tp) \ | #define TRACE_BUSYSEARCH(__FUNCTION__,s,ag,agb,l,sl,tp) \ |
| xfs_alloc_trace_busy(fname, s, mp, ag, agb, l, sl, tp, XFS_ALLOC_KTRACE_BUSYSEARCH, __LINE__) | xfs_alloc_trace_busy(__FUNCTION__, s, mp, ag, agb, l, sl, tp, XFS_ALLOC_KTRACE_BUSYSEARCH, __LINE__) |
| #else | #else |
| #define TRACE_ALLOC(s,a) | #define TRACE_ALLOC(s,a) |
| #define TRACE_FREE(s,a,b,x,f) | #define TRACE_FREE(s,a,b,x,f) |
| Line 420 xfs_alloc_read_agfl( | Line 420 xfs_alloc_read_agfl( |
| */ | */ |
| STATIC void | STATIC void |
| xfs_alloc_trace_alloc( | xfs_alloc_trace_alloc( |
| char *name, /* function tag string */ | const char *name, /* function tag string */ |
| char *str, /* additional string */ | char *str, /* additional string */ |
| xfs_alloc_arg_t *args, /* allocation argument structure */ | xfs_alloc_arg_t *args, /* allocation argument structure */ |
| int line) /* source line number */ | int line) /* source line number */ |
| Line 453 xfs_alloc_trace_alloc( | Line 453 xfs_alloc_trace_alloc( |
| */ | */ |
| STATIC void | STATIC void |
| xfs_alloc_trace_free( | xfs_alloc_trace_free( |
| char *name, /* function tag string */ | const char *name, /* function tag string */ |
| char *str, /* additional string */ | char *str, /* additional string */ |
| xfs_mount_t *mp, /* file system mount point */ | xfs_mount_t *mp, /* file system mount point */ |
| xfs_agnumber_t agno, /* allocation group number */ | xfs_agnumber_t agno, /* allocation group number */ |
| Line 479 xfs_alloc_trace_free( | Line 479 xfs_alloc_trace_free( |
| */ | */ |
| STATIC void | STATIC void |
| xfs_alloc_trace_modagf( | xfs_alloc_trace_modagf( |
| char *name, /* function tag string */ | const char *name, /* function tag string */ |
| char *str, /* additional string */ | char *str, /* additional string */ |
| xfs_mount_t *mp, /* file system mount point */ | xfs_mount_t *mp, /* file system mount point */ |
| xfs_agf_t *agf, /* new agf value */ | xfs_agf_t *agf, /* new agf value */ |
| Line 507 xfs_alloc_trace_modagf( | Line 507 xfs_alloc_trace_modagf( |
| STATIC void | STATIC void |
| xfs_alloc_trace_busy( | xfs_alloc_trace_busy( |
| char *name, /* function tag string */ | const char *name, /* function tag string */ |
| char *str, /* additional string */ | char *str, /* additional string */ |
| xfs_mount_t *mp, /* file system mount point */ | xfs_mount_t *mp, /* file system mount point */ |
| xfs_agnumber_t agno, /* allocation group number */ | xfs_agnumber_t agno, /* allocation group number */ |
| Line 549 xfs_alloc_ag_vextent( | Line 549 xfs_alloc_ag_vextent( |
| xfs_alloc_arg_t *args) /* argument structure for allocation */ | xfs_alloc_arg_t *args) /* argument structure for allocation */ |
| { | { |
| int error=0; | int error=0; |
| #ifdef XFS_ALLOC_TRACE | |
| static char fname[] = "xfs_alloc_ag_vextent"; | |
| #endif | |
| ASSERT(args->minlen > 0); | ASSERT(args->minlen > 0); |
| ASSERT(args->maxlen > 0); | ASSERT(args->maxlen > 0); |
| Line 635 xfs_alloc_ag_vextent_exact( | Line 632 xfs_alloc_ag_vextent_exact( |
| xfs_agblock_t fbno; /* start block of found extent */ | xfs_agblock_t fbno; /* start block of found extent */ |
| xfs_agblock_t fend; /* end block of found extent */ | xfs_agblock_t fend; /* end block of found extent */ |
| xfs_extlen_t flen; /* length of found extent */ | xfs_extlen_t flen; /* length of found extent */ |
| #ifdef XFS_ALLOC_TRACE | |
| static char fname[] = "xfs_alloc_ag_vextent_exact"; | |
| #endif | |
| int i; /* success/failure of operation */ | int i; /* success/failure of operation */ |
| xfs_agblock_t maxend; /* end of maximal extent */ | xfs_agblock_t maxend; /* end of maximal extent */ |
| xfs_agblock_t minend; /* end of minimal extent */ | xfs_agblock_t minend; /* end of minimal extent */ |
| Line 737 xfs_alloc_ag_vextent_near( | Line 731 xfs_alloc_ag_vextent_near( |
| xfs_btree_cur_t *bno_cur_gt; /* cursor for bno btree, right side */ | xfs_btree_cur_t *bno_cur_gt; /* cursor for bno btree, right side */ |
| xfs_btree_cur_t *bno_cur_lt; /* cursor for bno btree, left side */ | xfs_btree_cur_t *bno_cur_lt; /* cursor for bno btree, left side */ |
| xfs_btree_cur_t *cnt_cur; /* cursor for count btree */ | xfs_btree_cur_t *cnt_cur; /* cursor for count btree */ |
| #ifdef XFS_ALLOC_TRACE | |
| static char fname[] = "xfs_alloc_ag_vextent_near"; | |
| #endif | |
| xfs_agblock_t gtbno; /* start bno of right side entry */ | xfs_agblock_t gtbno; /* start bno of right side entry */ |
| xfs_agblock_t gtbnoa; /* aligned ... */ | xfs_agblock_t gtbnoa; /* aligned ... */ |
| xfs_extlen_t gtdiff; /* difference to right side entry */ | xfs_extlen_t gtdiff; /* difference to right side entry */ |
| Line 1270 xfs_alloc_ag_vextent_size( | Line 1261 xfs_alloc_ag_vextent_size( |
| int error; /* error result */ | int error; /* error result */ |
| xfs_agblock_t fbno; /* start of found freespace */ | xfs_agblock_t fbno; /* start of found freespace */ |
| xfs_extlen_t flen; /* length of found freespace */ | xfs_extlen_t flen; /* length of found freespace */ |
| #ifdef XFS_ALLOC_TRACE | |
| static char fname[] = "xfs_alloc_ag_vextent_size"; | |
| #endif | |
| int i; /* temp status variable */ | int i; /* temp status variable */ |
| xfs_agblock_t rbno; /* returned block number */ | xfs_agblock_t rbno; /* returned block number */ |
| xfs_extlen_t rlen; /* length of returned extent */ | xfs_extlen_t rlen; /* length of returned extent */ |
| Line 1427 xfs_alloc_ag_vextent_small( | Line 1415 xfs_alloc_ag_vextent_small( |
| int error; | int error; |
| xfs_agblock_t fbno; | xfs_agblock_t fbno; |
| xfs_extlen_t flen; | xfs_extlen_t flen; |
| #ifdef XFS_ALLOC_TRACE | |
| static char fname[] = "xfs_alloc_ag_vextent_small"; | |
| #endif | |
| int i; | int i; |
| if ((error = xfs_alloc_decrement(ccur, 0, &i))) | if ((error = xfs_alloc_decrement(ccur, 0, &i))) |
| Line 1516 xfs_free_ag_extent( | Line 1501 xfs_free_ag_extent( |
| xfs_btree_cur_t *bno_cur; /* cursor for by-block btree */ | xfs_btree_cur_t *bno_cur; /* cursor for by-block btree */ |
| xfs_btree_cur_t *cnt_cur; /* cursor for by-size btree */ | xfs_btree_cur_t *cnt_cur; /* cursor for by-size btree */ |
| int error; /* error return value */ | int error; /* error return value */ |
| #ifdef XFS_ALLOC_TRACE | |
| static char fname[] = "xfs_free_ag_extent"; | |
| #endif | |
| xfs_agblock_t gtbno; /* start of right neighbor block */ | xfs_agblock_t gtbno; /* start of right neighbor block */ |
| xfs_extlen_t gtlen; /* length of right neighbor block */ | xfs_extlen_t gtlen; /* length of right neighbor block */ |
| int haveleft; /* have a left neighbor block */ | int haveleft; /* have a left neighbor block */ |
| Line 2003 xfs_alloc_get_freelist( | Line 1985 xfs_alloc_get_freelist( |
| xfs_agblock_t bno; /* block number returned */ | xfs_agblock_t bno; /* block number returned */ |
| int error; | int error; |
| int logflags; | int logflags; |
| #ifdef XFS_ALLOC_TRACE | |
| static char fname[] = "xfs_alloc_get_freelist"; | |
| #endif | |
| xfs_mount_t *mp; /* mount structure */ | xfs_mount_t *mp; /* mount structure */ |
| xfs_perag_t *pag; /* per allocation group data */ | xfs_perag_t *pag; /* per allocation group data */ |
| Line 2128 xfs_alloc_put_freelist( | Line 2107 xfs_alloc_put_freelist( |
| __be32 *blockp;/* pointer to array entry */ | __be32 *blockp;/* pointer to array entry */ |
| int error; | int error; |
| int logflags; | int logflags; |
| #ifdef XFS_ALLOC_TRACE | |
| static char fname[] = "xfs_alloc_put_freelist"; | |
| #endif | |
| xfs_mount_t *mp; /* mount structure */ | xfs_mount_t *mp; /* mount structure */ |
| xfs_perag_t *pag; /* per allocation group data */ | xfs_perag_t *pag; /* per allocation group data */ |
| Line 2263 xfs_alloc_vextent( | Line 2239 xfs_alloc_vextent( |
| xfs_agblock_t agsize; /* allocation group size */ | xfs_agblock_t agsize; /* allocation group size */ |
| int error; | int error; |
| int flags; /* XFS_ALLOC_FLAG_... locking flags */ | int flags; /* XFS_ALLOC_FLAG_... locking flags */ |
| #ifdef XFS_ALLOC_TRACE | |
| static char fname[] = "xfs_alloc_vextent"; | |
| #endif | |
| xfs_extlen_t minleft;/* minimum left value, temp copy */ | xfs_extlen_t minleft;/* minimum left value, temp copy */ |
| xfs_mount_t *mp; /* mount structure pointer */ | xfs_mount_t *mp; /* mount structure pointer */ |
| xfs_agnumber_t sagno; /* starting allocation group number */ | xfs_agnumber_t sagno; /* starting allocation group number */ |