Commit b0d30981 authored by Coly Li's avatar Coly Li Committed by Jens Axboe
Browse files

bcache: style fixes for lines over 80 characters



This patch fixes the lines over 80 characters into more lines, to minimize
warnings by checkpatch.pl. There are still some lines exceed 80 characters,
but it is better to be a single line and I don't change them.

Signed-off-by: default avatarColy Li <colyli@suse.de>
Reviewed-by: default avatarShenghui Wang <shhuiw@foxmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent fc2d5988
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -614,8 +614,8 @@ struct cache_set {
	uint16_t		min_prio;

	/*
	 * max(gen - last_gc) for all buckets. When it gets too big we have to gc
	 * to keep gens from wrapping around.
	 * max(gen - last_gc) for all buckets. When it gets too big we have to
	 * gc to keep gens from wrapping around.
	 */
	uint8_t			need_gc;
	struct gc_stat		gc_stats;
+7 −3
Original line number Diff line number Diff line
@@ -311,7 +311,9 @@ void bch_btree_keys_free(struct btree_keys *b)
}
EXPORT_SYMBOL(bch_btree_keys_free);

int bch_btree_keys_alloc(struct btree_keys *b, unsigned int page_order, gfp_t gfp)
int bch_btree_keys_alloc(struct btree_keys *b,
			 unsigned int page_order,
			 gfp_t gfp)
{
	struct bset_tree *t = b->set;

@@ -475,7 +477,8 @@ void inorder_test(void)
	for (unsigned int size = 2;
	     size < 65536000;
	     size++) {
		unsigned int extra = (size - rounddown_pow_of_two(size - 1)) << 1;
		unsigned int extra =
			(size - rounddown_pow_of_two(size - 1)) << 1;
		unsigned int i = 1, j = rounddown_pow_of_two(size - 1);

		if (!(size % 4096))
@@ -825,7 +828,8 @@ static void bch_bset_fix_lookup_table(struct btree_keys *b,
	     k != bset_bkey_last(t->data);
	     k = bkey_next(k))
		if (t->size == bkey_to_cacheline(t, k)) {
			t->prev[t->size] = bkey_to_cacheline_offset(t, t->size, k);
			t->prev[t->size] =
				bkey_to_cacheline_offset(t, t->size, k);
			t->size++;
		}
}
+4 −2
Original line number Diff line number Diff line
@@ -246,12 +246,14 @@ static inline bool bkey_written(struct btree_keys *b, struct bkey *k)
	return !b->last_set_unwritten || k < b->set[b->nsets].data->start;
}

static inline unsigned int bset_byte_offset(struct btree_keys *b, struct bset *i)
static inline unsigned int bset_byte_offset(struct btree_keys *b,
					    struct bset *i)
{
	return ((size_t) i) - ((size_t) b->set->data);
}

static inline unsigned int bset_sector_offset(struct btree_keys *b, struct bset *i)
static inline unsigned int bset_sector_offset(struct btree_keys *b,
					      struct bset *i)
{
	return bset_byte_offset(b, i) >> 9;
}
+4 −1
Original line number Diff line number Diff line
@@ -436,7 +436,10 @@ static void do_btree_node_write(struct btree *b)

		continue_at(cl, btree_node_write_done, NULL);
	} else {
		/* No problem for multipage bvec since the bio is just allocated */
		/*
		 * No problem for multipage bvec since the bio is
		 * just allocated
		 */
		b->bio->bi_vcnt = 0;
		bch_bio_map(b->bio, i);

+4 −2
Original line number Diff line number Diff line
@@ -306,7 +306,9 @@ bool bch_keybuf_check_overlapping(struct keybuf *buf, struct bkey *start,
				  struct bkey *end);
void bch_keybuf_del(struct keybuf *buf, struct keybuf_key *w);
struct keybuf_key *bch_keybuf_next(struct keybuf *buf);
struct keybuf_key *bch_keybuf_next_rescan(struct cache_set *c, struct keybuf *buf,
					  struct bkey *end, keybuf_pred_fn *pred);
struct keybuf_key *bch_keybuf_next_rescan(struct cache_set *c,
					  struct keybuf *buf,
					  struct bkey *end,
					  keybuf_pred_fn *pred);
void bch_update_bucket_in_use(struct cache_set *c, struct gc_stat *stats);
#endif
Loading