aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2010-07-27 11:56:40 -0400
committerTheodore Ts'o <tytso@mit.edu>2010-07-27 11:56:40 -0400
commitc398eda0e43a791be0fca6f197a1e2bbb9f16070 (patch)
treed7b2b95490f96a75e116a3aa13c17767aa630342 /fs/ext4/ext4.h
parent60fd4da34d55a9cc0d857fc76dc12cf8cab4ed02 (diff)
ext4: Pass line numbers to ext4_error() and friends
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r--fs/ext4/ext4.h44
1 files changed, 27 insertions, 17 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 73465b26976d..088938148f5c 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -57,10 +57,13 @@
57#endif 57#endif
58 58
59#define EXT4_ERROR_INODE(inode, fmt, a...) \ 59#define EXT4_ERROR_INODE(inode, fmt, a...) \
60 ext4_error_inode(__func__, (inode), (fmt), ## a) 60 ext4_error_inode((inode), __func__, __LINE__, 0, (fmt), ## a)
61
62#define EXT4_ERROR_INODE_BLOCK(inode, block, fmt, a...) \
63 ext4_error_inode((inode), __func__, __LINE__, (block), (fmt), ## a)
61 64
62#define EXT4_ERROR_FILE(file, fmt, a...) \ 65#define EXT4_ERROR_FILE(file, fmt, a...) \
63 ext4_error_file(__func__, (file), (fmt), ## a) 66 ext4_error_file(__func__, __LINE__, (file), (fmt), ## a)
64 67
65/* data type for block offset of block group */ 68/* data type for block offset of block group */
66typedef int ext4_grpblk_t; 69typedef int ext4_grpblk_t;
@@ -1623,22 +1626,29 @@ extern int ext4_group_extend(struct super_block *sb,
1623 ext4_fsblk_t n_blocks_count); 1626 ext4_fsblk_t n_blocks_count);
1624 1627
1625/* super.c */ 1628/* super.c */
1626extern void __ext4_error(struct super_block *, const char *, const char *, ...) 1629extern void __ext4_error(struct super_block *, const char *, unsigned int,
1627 __attribute__ ((format (printf, 3, 4))); 1630 const char *, ...)
1628#define ext4_error(sb, message...) __ext4_error(sb, __func__, ## message) 1631 __attribute__ ((format (printf, 4, 5)));
1629extern void ext4_error_inode(const char *, struct inode *, const char *, ...) 1632#define ext4_error(sb, message...) __ext4_error(sb, __func__, \
1630 __attribute__ ((format (printf, 3, 4))); 1633 __LINE__, ## message)
1631extern void ext4_error_file(const char *, struct file *, const char *, ...) 1634extern void ext4_error_inode(struct inode *, const char *, unsigned int,
1632 __attribute__ ((format (printf, 3, 4))); 1635 ext4_fsblk_t, const char *, ...)
1633extern void __ext4_std_error(struct super_block *, const char *, int); 1636 __attribute__ ((format (printf, 5, 6)));
1634extern void __ext4_abort(struct super_block *, const char *, const char *, ...) 1637extern void ext4_error_file(struct file *, const char *, unsigned int,
1635 __attribute__ ((format (printf, 3, 4))); 1638 const char *, ...)
1639 __attribute__ ((format (printf, 4, 5)));
1640extern void __ext4_std_error(struct super_block *, const char *,
1641 unsigned int, int);
1642extern void __ext4_abort(struct super_block *, const char *, unsigned int,
1643 const char *, ...)
1644 __attribute__ ((format (printf, 4, 5)));
1636#define ext4_abort(sb, message...) __ext4_abort(sb, __func__, \ 1645#define ext4_abort(sb, message...) __ext4_abort(sb, __func__, \
1637 ## message) 1646 __LINE__, ## message)
1638extern void __ext4_warning(struct super_block *, const char *, 1647extern void __ext4_warning(struct super_block *, const char *, unsigned int,
1639 const char *, ...) 1648 const char *, ...)
1640 __attribute__ ((format (printf, 3, 4))); 1649 __attribute__ ((format (printf, 4, 5)));
1641#define ext4_warning(sb, message...) __ext4_warning(sb, __func__, ## message) 1650#define ext4_warning(sb, message...) __ext4_warning(sb, __func__, \
1651 __LINE__, ## message)
1642extern void ext4_msg(struct super_block *, const char *, const char *, ...) 1652extern void ext4_msg(struct super_block *, const char *, const char *, ...)
1643 __attribute__ ((format (printf, 3, 4))); 1653 __attribute__ ((format (printf, 3, 4)));
1644extern void __ext4_grp_locked_error(const char *, unsigned int, \ 1654extern void __ext4_grp_locked_error(const char *, unsigned int, \
@@ -1781,7 +1791,7 @@ static inline unsigned int ext4_flex_bg_size(struct ext4_sb_info *sbi)
1781#define ext4_std_error(sb, errno) \ 1791#define ext4_std_error(sb, errno) \
1782do { \ 1792do { \
1783 if ((errno)) \ 1793 if ((errno)) \
1784 __ext4_std_error((sb), __func__, (errno)); \ 1794 __ext4_std_error((sb), __func__, __LINE__, (errno)); \
1785} while (0) 1795} while (0)
1786 1796
1787#ifdef CONFIG_SMP 1797#ifdef CONFIG_SMP