diff options
Diffstat (limited to 'fs/xfs/xfs_inode.h')
-rw-r--r-- | fs/xfs/xfs_inode.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index ddac1b806c0b..558253e6fb43 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h | |||
@@ -536,6 +536,51 @@ void xfs_lock_two_inodes(xfs_inode_t *, xfs_inode_t *, uint); | |||
536 | void xfs_synchronize_atime(xfs_inode_t *); | 536 | void xfs_synchronize_atime(xfs_inode_t *); |
537 | void xfs_mark_inode_dirty_sync(xfs_inode_t *); | 537 | void xfs_mark_inode_dirty_sync(xfs_inode_t *); |
538 | 538 | ||
539 | #if defined(XFS_INODE_TRACE) | ||
540 | |||
541 | #define INODE_TRACE_SIZE 16 /* number of trace entries */ | ||
542 | #define INODE_KTRACE_ENTRY 1 | ||
543 | #define INODE_KTRACE_EXIT 2 | ||
544 | #define INODE_KTRACE_HOLD 3 | ||
545 | #define INODE_KTRACE_REF 4 | ||
546 | #define INODE_KTRACE_RELE 5 | ||
547 | |||
548 | extern void _xfs_itrace_entry(struct xfs_inode *, const char *, inst_t *); | ||
549 | extern void _xfs_itrace_exit(struct xfs_inode *, const char *, inst_t *); | ||
550 | extern void xfs_itrace_hold(struct xfs_inode *, char *, int, inst_t *); | ||
551 | extern void _xfs_itrace_ref(struct xfs_inode *, char *, int, inst_t *); | ||
552 | extern void xfs_itrace_rele(struct xfs_inode *, char *, int, inst_t *); | ||
553 | #define xfs_itrace_entry(ip) \ | ||
554 | _xfs_itrace_entry(ip, __func__, (inst_t *)__return_address) | ||
555 | #define xfs_itrace_exit(ip) \ | ||
556 | _xfs_itrace_exit(ip, __func__, (inst_t *)__return_address) | ||
557 | #define xfs_itrace_exit_tag(ip, tag) \ | ||
558 | _xfs_itrace_exit(ip, tag, (inst_t *)__return_address) | ||
559 | #define xfs_itrace_ref(ip) \ | ||
560 | _xfs_itrace_ref(ip, __FILE__, __LINE__, (inst_t *)__return_address) | ||
561 | |||
562 | #else | ||
563 | #define xfs_itrace_entry(a) | ||
564 | #define xfs_itrace_exit(a) | ||
565 | #define xfs_itrace_exit_tag(a, b) | ||
566 | #define xfs_itrace_hold(a, b, c, d) | ||
567 | #define xfs_itrace_ref(a) | ||
568 | #define xfs_itrace_rele(a, b, c, d) | ||
569 | #endif | ||
570 | |||
571 | #define IHOLD(ip) \ | ||
572 | do { \ | ||
573 | ASSERT(atomic_read(&VFS_I(ip)->i_count) > 0) ; \ | ||
574 | atomic_inc(&(VFS_I(ip)->i_count)); \ | ||
575 | xfs_itrace_hold((ip), __FILE__, __LINE__, (inst_t *)__return_address); \ | ||
576 | } while (0) | ||
577 | |||
578 | #define IRELE(ip) \ | ||
579 | do { \ | ||
580 | xfs_itrace_rele((ip), __FILE__, __LINE__, (inst_t *)__return_address); \ | ||
581 | iput(VFS_I(ip)); \ | ||
582 | } while (0) | ||
583 | |||
539 | #endif /* __KERNEL__ */ | 584 | #endif /* __KERNEL__ */ |
540 | 585 | ||
541 | int xfs_inotobp(struct xfs_mount *, struct xfs_trans *, | 586 | int xfs_inotobp(struct xfs_mount *, struct xfs_trans *, |