Skip to content

Commit 0ef0b47

Browse files
mauelshaMike Snitzer
authored andcommitted
dm: add missing empty lines
Signed-off-by: Heinz Mauelshagen <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent 02f10ba commit 0ef0b47

33 files changed

+240
-27
lines changed

drivers/md/dm-bufio.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,7 @@ static void bio_complete(struct bio *bio)
628628
{
629629
struct dm_buffer *b = bio->bi_private;
630630
blk_status_t status = bio->bi_status;
631+
631632
bio_uninit(bio);
632633
kfree(bio);
633634
b->end_io(b, status);
@@ -660,6 +661,7 @@ static void use_bio(struct dm_buffer *b, enum req_op op, sector_t sector,
660661

661662
do {
662663
unsigned int this_step = min((unsigned int)(PAGE_SIZE - offset_in_page(ptr)), len);
664+
663665
if (!bio_add_page(bio, virt_to_page(ptr), this_step,
664666
offset_in_page(ptr))) {
665667
bio_put(bio);
@@ -782,6 +784,7 @@ static void __write_dirty_buffer(struct dm_buffer *b,
782784
static void __flush_write_list(struct list_head *write_list)
783785
{
784786
struct blk_plug plug;
787+
785788
blk_start_plug(&plug);
786789
while (!list_empty(write_list)) {
787790
struct dm_buffer *b =
@@ -1179,6 +1182,7 @@ void dm_bufio_prefetch(struct dm_bufio_client *c,
11791182
for (; n_blocks--; block++) {
11801183
int need_submit;
11811184
struct dm_buffer *b;
1185+
11821186
b = __bufio_new(c, block, NF_PREFETCH, &need_submit,
11831187
&write_list);
11841188
if (unlikely(!list_empty(&write_list))) {
@@ -1463,6 +1467,7 @@ void dm_bufio_release_move(struct dm_buffer *b, sector_t new_block)
14631467
__link_buffer(b, new_block, LIST_DIRTY);
14641468
} else {
14651469
sector_t old_block;
1470+
14661471
wait_on_bit_lock_io(&b->state, B_WRITING,
14671472
TASK_UNINTERRUPTIBLE);
14681473
/*
@@ -1553,6 +1558,7 @@ EXPORT_SYMBOL_GPL(dm_bufio_get_block_size);
15531558
sector_t dm_bufio_get_device_size(struct dm_bufio_client *c)
15541559
{
15551560
sector_t s = bdev_nr_sectors(c->bdev);
1561+
15561562
if (s >= c->start)
15571563
s -= c->start;
15581564
else
@@ -1668,10 +1674,12 @@ static bool __try_evict_buffer(struct dm_buffer *b, gfp_t gfp)
16681674
static unsigned long get_retain_buffers(struct dm_bufio_client *c)
16691675
{
16701676
unsigned long retain_bytes = READ_ONCE(dm_bufio_retain_bytes);
1677+
16711678
if (likely(c->sectors_per_block_bits >= 0))
16721679
retain_bytes >>= c->sectors_per_block_bits + SECTOR_SHIFT;
16731680
else
16741681
retain_bytes /= c->block_size;
1682+
16751683
return retain_bytes;
16761684
}
16771685

@@ -1806,6 +1814,7 @@ struct dm_bufio_client *dm_bufio_client_create(struct block_device *bdev, unsign
18061814
if (block_size <= KMALLOC_MAX_SIZE &&
18071815
(block_size < PAGE_SIZE || !is_power_of_2(block_size))) {
18081816
unsigned int align = min(1U << __ffs(block_size), (unsigned int)PAGE_SIZE);
1817+
18091818
snprintf(slab_name, sizeof slab_name, "dm_bufio_cache-%u", block_size);
18101819
c->slab_cache = kmem_cache_create(slab_name, block_size, align,
18111820
SLAB_RECLAIM_ACCOUNT, NULL);

drivers/md/dm-cache-metadata.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ static int __create_persistent_data_objects(struct dm_cache_metadata *cmd,
535535
bool may_format_device)
536536
{
537537
int r;
538+
538539
cmd->bm = dm_block_manager_create(cmd->bdev, DM_CACHE_METADATA_BLOCK_SIZE << SECTOR_SHIFT,
539540
CACHE_MAX_CONCURRENT_LOCKS);
540541
if (IS_ERR(cmd->bm)) {
@@ -568,6 +569,7 @@ static void update_flags(struct cache_disk_superblock *disk_super,
568569
flags_mutator mutator)
569570
{
570571
uint32_t sb_flags = mutator(le32_to_cpu(disk_super->flags));
572+
571573
disk_super->flags = cpu_to_le32(sb_flags);
572574
}
573575

@@ -732,6 +734,7 @@ static int __commit_transaction(struct dm_cache_metadata *cmd,
732734
static __le64 pack_value(dm_oblock_t block, unsigned int flags)
733735
{
734736
uint64_t value = from_oblock(block);
737+
735738
value <<= 16;
736739
value = value | (flags & FLAGS_MASK);
737740
return cpu_to_le64(value);
@@ -741,6 +744,7 @@ static void unpack_value(__le64 value_le, dm_oblock_t *block, unsigned int *flag
741744
{
742745
uint64_t value = le64_to_cpu(value_le);
743746
uint64_t b = value >> 16;
747+
744748
*block = to_oblock(b);
745749
*flags = value & FLAGS_MASK;
746750
}
@@ -1254,6 +1258,7 @@ static int __insert(struct dm_cache_metadata *cmd,
12541258
{
12551259
int r;
12561260
__le64 value = pack_value(oblock, M_VALID);
1261+
12571262
__dm_bless_for_disk(&value);
12581263

12591264
r = dm_array_set_value(&cmd->info, cmd->root, from_cblock(cblock),
@@ -1580,6 +1585,7 @@ static int __set_dirty_bits_v1(struct dm_cache_metadata *cmd, unsigned int nr_bi
15801585
{
15811586
int r;
15821587
unsigned int i;
1588+
15831589
for (i = 0; i < nr_bits; i++) {
15841590
r = __dirty(cmd, to_cblock(i), test_bit(i, bits));
15851591
if (r)

drivers/md/dm-cache-policy-internal.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ static inline int policy_emit_config_values(struct dm_cache_policy *p, char *res
8989
unsigned int maxlen, ssize_t *sz_ptr)
9090
{
9191
ssize_t sz = *sz_ptr;
92+
9293
if (p->emit_config_values)
9394
return p->emit_config_values(p, result, maxlen, sz_ptr);
9495

@@ -121,12 +122,14 @@ static inline size_t bitset_size_in_bytes(unsigned int nr_entries)
121122
static inline unsigned long *alloc_bitset(unsigned int nr_entries)
122123
{
123124
size_t s = bitset_size_in_bytes(nr_entries);
125+
124126
return vzalloc(s);
125127
}
126128

127129
static inline void clear_bitset(void *bitset, unsigned int nr_entries)
128130
{
129131
size_t s = bitset_size_in_bytes(nr_entries);
132+
130133
memset(bitset, 0, s);
131134
}
132135

drivers/md/dm-cache-policy-smq.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ static void __h_insert(struct smq_hash_table *ht, unsigned int bucket, struct en
624624
static void h_insert(struct smq_hash_table *ht, struct entry *e)
625625
{
626626
unsigned int h = hash_64(from_oblock(e->oblock), ht->hash_bits);
627+
627628
__h_insert(ht, h, e);
628629
}
629630

@@ -1633,6 +1634,7 @@ static void smq_tick(struct dm_cache_policy *p, bool can_block)
16331634
static void smq_allow_migrations(struct dm_cache_policy *p, bool allow)
16341635
{
16351636
struct smq_policy *mq = to_smq_policy(p);
1637+
16361638
mq->migrations_allowed = allow;
16371639
}
16381640

drivers/md/dm-cache-target.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@ static unsigned int lock_level(struct bio *bio)
534534
static struct per_bio_data *get_per_bio_data(struct bio *bio)
535535
{
536536
struct per_bio_data *pb = dm_per_bio_data(bio, sizeof(struct per_bio_data));
537+
537538
BUG_ON(!pb);
538539
return pb;
539540
}
@@ -690,6 +691,7 @@ static void clear_discard(struct cache *cache, dm_dblock_t b)
690691
static bool is_discarded(struct cache *cache, dm_dblock_t b)
691692
{
692693
int r;
694+
693695
spin_lock_irq(&cache->lock);
694696
r = test_bit(from_dblock(b), cache->discard_bitset);
695697
spin_unlock_irq(&cache->lock);
@@ -700,6 +702,7 @@ static bool is_discarded(struct cache *cache, dm_dblock_t b)
700702
static bool is_discarded_oblock(struct cache *cache, dm_oblock_t b)
701703
{
702704
int r;
705+
703706
spin_lock_irq(&cache->lock);
704707
r = test_bit(from_dblock(oblock_to_dblock(cache, b)),
705708
cache->discard_bitset);
@@ -814,6 +817,7 @@ static void accounted_request(struct cache *cache, struct bio *bio)
814817
static void issue_op(struct bio *bio, void *context)
815818
{
816819
struct cache *cache = context;
820+
817821
accounted_request(cache, bio);
818822
}
819823

@@ -1074,6 +1078,7 @@ static void quiesce(struct dm_cache_migration *mg,
10741078
static struct dm_cache_migration *ws_to_mg(struct work_struct *ws)
10751079
{
10761080
struct continuation *k = container_of(ws, struct continuation, ws);
1081+
10771082
return container_of(k, struct dm_cache_migration, k);
10781083
}
10791084

@@ -1225,6 +1230,7 @@ static void mg_complete(struct dm_cache_migration *mg, bool success)
12251230
static void mg_success(struct work_struct *ws)
12261231
{
12271232
struct dm_cache_migration *mg = ws_to_mg(ws);
1233+
12281234
mg_complete(mg, mg->k.input == 0);
12291235
}
12301236

@@ -1363,6 +1369,7 @@ static void mg_copy(struct work_struct *ws)
13631369
* Fallback to a real full copy after doing some tidying up.
13641370
*/
13651371
bool rb = bio_detain_shared(mg->cache, mg->op->oblock, mg->overwrite_bio);
1372+
13661373
BUG_ON(rb); /* An exclussive lock must _not_ be held for this block */
13671374
mg->overwrite_bio = NULL;
13681375
inc_io_migrations(mg->cache);
@@ -1465,12 +1472,15 @@ static void invalidate_complete(struct dm_cache_migration *mg, bool success)
14651472
static void invalidate_completed(struct work_struct *ws)
14661473
{
14671474
struct dm_cache_migration *mg = ws_to_mg(ws);
1475+
14681476
invalidate_complete(mg, !mg->k.input);
14691477
}
14701478

14711479
static int invalidate_cblock(struct cache *cache, dm_cblock_t cblock)
14721480
{
1473-
int r = policy_invalidate_mapping(cache->policy, cblock);
1481+
int r;
1482+
1483+
r = policy_invalidate_mapping(cache->policy, cblock);
14741484
if (!r) {
14751485
r = dm_cache_remove_mapping(cache->cmd, cblock);
14761486
if (r) {

drivers/md/dm-crypt.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,6 +1257,7 @@ static __le64 *org_sector_of_dmreq(struct crypt_config *cc,
12571257
struct dm_crypt_request *dmreq)
12581258
{
12591259
u8 *ptr = iv_of_dmreq(cc, dmreq) + cc->iv_size + cc->iv_size;
1260+
12601261
return (__le64 *) ptr;
12611262
}
12621263

@@ -1265,6 +1266,7 @@ static unsigned int *org_tag_of_dmreq(struct crypt_config *cc,
12651266
{
12661267
u8 *ptr = iv_of_dmreq(cc, dmreq) + cc->iv_size +
12671268
cc->iv_size + sizeof(uint64_t);
1269+
12681270
return (unsigned int *)ptr;
12691271
}
12701272

@@ -1741,6 +1743,7 @@ static void crypt_inc_pending(struct dm_crypt_io *io)
17411743
static void kcryptd_io_bio_endio(struct work_struct *work)
17421744
{
17431745
struct dm_crypt_io *io = container_of(work, struct dm_crypt_io, work);
1746+
17441747
bio_endio(io->base_bio);
17451748
}
17461749

drivers/md/dm-era-target.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,14 @@ static int writeset_marked_on_disk(struct dm_disk_bitset *info,
112112
struct writeset_metadata *m, dm_block_t block,
113113
bool *result)
114114
{
115+
int r;
115116
dm_block_t old = m->root;
116117

117118
/*
118119
* The bitset was flushed when it was archived, so we know there'll
119120
* be no change to the root.
120121
*/
121-
int r = dm_bitset_test_bit(info, m->root, block, &m->root, result);
122+
r = dm_bitset_test_bit(info, m->root, block, &m->root, result);
122123
if (r) {
123124
DMERR("%s: dm_bitset_test_bit failed", __func__);
124125
return r;
@@ -210,6 +211,7 @@ static void sb_prepare_for_write(struct dm_block_validator *v,
210211
static int check_metadata_version(struct superblock_disk *disk)
211212
{
212213
uint32_t metadata_version = le32_to_cpu(disk->version);
214+
213215
if (metadata_version < MIN_ERA_VERSION || metadata_version > MAX_ERA_VERSION) {
214216
DMERR("Era metadata version %u found, but only versions between %u and %u supported.",
215217
metadata_version, MIN_ERA_VERSION, MAX_ERA_VERSION);
@@ -409,6 +411,7 @@ static int ws_eq(void *context, const void *value1, const void *value2)
409411
static void setup_writeset_tree_info(struct era_metadata *md)
410412
{
411413
struct dm_btree_value_type *vt = &md->writeset_tree_info.value_type;
414+
412415
md->writeset_tree_info.tm = md->tm;
413416
md->writeset_tree_info.levels = 1;
414417
vt->context = md;
@@ -419,9 +422,9 @@ static void setup_writeset_tree_info(struct era_metadata *md)
419422
}
420423

421424
static void setup_era_array_info(struct era_metadata *md)
422-
423425
{
424426
struct dm_btree_value_type vt;
427+
425428
vt.context = NULL;
426429
vt.size = sizeof(__le32);
427430
vt.inc = NULL;
@@ -1391,6 +1394,7 @@ static int perform_rpc(struct era *era, struct rpc *rpc)
13911394
static int in_worker0(struct era *era, int (*fn)(struct era_metadata *md))
13921395
{
13931396
struct rpc rpc;
1397+
13941398
rpc.fn0 = fn;
13951399
rpc.fn1 = NULL;
13961400

@@ -1401,6 +1405,7 @@ static int in_worker1(struct era *era,
14011405
int (*fn)(struct era_metadata *md, void *ref), void *arg)
14021406
{
14031407
struct rpc rpc;
1408+
14041409
rpc.fn0 = NULL;
14051410
rpc.fn1 = fn;
14061411
rpc.arg = arg;
@@ -1712,6 +1717,7 @@ static int era_iterate_devices(struct dm_target *ti,
17121717
iterate_devices_callout_fn fn, void *data)
17131718
{
17141719
struct era *era = ti->private;
1720+
17151721
return fn(ti, era->origin_dev, 0, get_dev_size(era->origin_dev), data);
17161722
}
17171723

drivers/md/dm-flakey.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ static int flakey_map(struct dm_target *ti, struct bio *bio)
327327
struct flakey_c *fc = ti->private;
328328
unsigned int elapsed;
329329
struct per_bio_data *pb = dm_per_bio_data(bio, sizeof(struct per_bio_data));
330+
330331
pb->bio_submitted = false;
331332

332333
if (op_is_zone_mgmt(bio_op(bio)))

0 commit comments

Comments
 (0)