diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-04-03 20:38:37 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2019-04-03 20:50:51 -0400 |
commit | 0dd9056d547ad7a67a552658d054fa189a78a30f (patch) | |
tree | 711646025fcf29305494e9e82b476281a307b24e | |
parent | fc68e94eb080aa03c977d11f3f853030f46af971 (diff) |
bcachefs: ratelimit copygc warning
-rw-r--r-- | fs/bcachefs/bcachefs.h | 2 | ||||
-rw-r--r-- | fs/bcachefs/movinggc.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/fs/bcachefs/bcachefs.h b/fs/bcachefs/bcachefs.h index effebcb729f5..bb60bf8517b0 100644 --- a/fs/bcachefs/bcachefs.h +++ b/fs/bcachefs/bcachefs.h @@ -220,6 +220,8 @@ printk(KERN_NOTICE bch2_fmt(c, fmt), ##__VA_ARGS__) #define bch_warn(c, fmt, ...) \ printk(KERN_WARNING bch2_fmt(c, fmt), ##__VA_ARGS__) +#define bch_warn_ratelimited(c, fmt, ...) \ + printk_ratelimited(KERN_WARNING bch2_fmt(c, fmt), ##__VA_ARGS__) #define bch_err(c, fmt, ...) \ printk(KERN_ERR bch2_fmt(c, fmt), ##__VA_ARGS__) #define bch_err_ratelimited(c, fmt, ...) \ diff --git a/fs/bcachefs/movinggc.c b/fs/bcachefs/movinggc.c index d6890824912d..12d33119149b 100644 --- a/fs/bcachefs/movinggc.c +++ b/fs/bcachefs/movinggc.c @@ -208,7 +208,8 @@ static void bch2_copygc(struct bch_fs *c, struct bch_dev *ca) up_read(&ca->bucket_lock); if (sectors_not_moved && !ret) - bch_warn(c, "copygc finished but %llu/%llu sectors, %llu/%llu buckets not moved", + bch_warn_ratelimited(c, + "copygc finished but %llu/%llu sectors, %llu/%llu buckets not moved", sectors_not_moved, sectors_to_move, buckets_not_moved, buckets_to_move); |