diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2017-12-13 16:01:18 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2017-12-13 16:12:38 -0500 |
commit | ea83a3985d28372d56ec7cea6e73907551869f63 (patch) | |
tree | 42b8b0d3da3b1fa96eb4400455559e60a78c4294 /libbcachefs/movinggc.h | |
parent | f2feceddae6f3bd3722247f3458860b955f539bc (diff) |
Update bcachefs sources to e57b5958cf bcachefs: fix for building in userspace
Diffstat (limited to 'libbcachefs/movinggc.h')
-rw-r--r-- | libbcachefs/movinggc.h | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/libbcachefs/movinggc.h b/libbcachefs/movinggc.h index d835d138..c46fa1f1 100644 --- a/libbcachefs/movinggc.h +++ b/libbcachefs/movinggc.h @@ -1,30 +1,8 @@ #ifndef _BCACHEFS_MOVINGGC_H #define _BCACHEFS_MOVINGGC_H -/* - * We can't use the entire copygc reserve in one iteration of copygc: we may - * need the buckets we're freeing up to go back into the copygc reserve to make - * forward progress, but if the copygc reserve is full they'll be available for - * any allocation - and it's possible that in a given iteration, we free up most - * of the buckets we're going to free before we allocate most of the buckets - * we're going to allocate. - * - * If we only use half of the reserve per iteration, then in steady state we'll - * always have room in the reserve for the buckets we're going to need in the - * next iteration: - */ -#define COPYGC_BUCKETS_PER_ITER(ca) \ - ((ca)->free[RESERVE_MOVINGGC].size / 2) - -/* - * Max sectors to move per iteration: Have to take into account internal - * fragmentation from the multiple write points for each generation: - */ -#define COPYGC_SECTORS_PER_ITER(ca) \ - ((ca)->mi.bucket_size * COPYGC_BUCKETS_PER_ITER(ca)) - -void bch2_moving_gc_stop(struct bch_dev *); -int bch2_moving_gc_start(struct bch_dev *); -void bch2_dev_moving_gc_init(struct bch_dev *); +void bch2_copygc_stop(struct bch_dev *); +int bch2_copygc_start(struct bch_fs *, struct bch_dev *); +void bch2_dev_copygc_init(struct bch_dev *); #endif /* _BCACHEFS_MOVINGGC_H */ |