diff options
Diffstat (limited to 'fs/ocfs2/cluster')
| -rw-r--r-- | fs/ocfs2/cluster/masklog.h | 9 | 
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/ocfs2/cluster/masklog.h b/fs/ocfs2/cluster/masklog.h index 308ea0eb35fd..a396096a5099 100644 --- a/fs/ocfs2/cluster/masklog.h +++ b/fs/ocfs2/cluster/masklog.h @@ -178,6 +178,15 @@ do {									\  			      ##__VA_ARGS__);				\  } while (0) +#define mlog_ratelimited(mask, fmt, ...)				\ +do {									\ +	static DEFINE_RATELIMIT_STATE(_rs,				\ +				      DEFAULT_RATELIMIT_INTERVAL,	\ +				      DEFAULT_RATELIMIT_BURST);		\ +	if (__ratelimit(&_rs))						\ +		mlog(mask, fmt, ##__VA_ARGS__);				\ +} while (0) +  #define mlog_errno(st) ({						\  	int _st = (st);							\  	if (_st != -ERESTARTSYS && _st != -EINTR &&			\  | 
