diff options
author | Jonathan Brassow <jbrassow@redhat.com> | 2011-08-02 07:32:03 -0400 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2011-08-02 07:32:03 -0400 |
commit | a2d2b0345a0f30c169b7d08b8cebdd4853fcb0f8 (patch) | |
tree | baa54cd731f8c191eb8574ae34bc4f8638a6ed79 /drivers/md | |
parent | aa3f0794d279cd154ac100f92ff3904ea1f56de2 (diff) |
dm snapshot: style cleanups
Coding style cleanups.
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-snap-persistent.c | 4 | ||||
-rw-r--r-- | drivers/md/dm-snap.c | 14 |
2 files changed, 8 insertions, 10 deletions
diff --git a/drivers/md/dm-snap-persistent.c b/drivers/md/dm-snap-persistent.c index 1a0acb8abdf..d1f1d701710 100644 --- a/drivers/md/dm-snap-persistent.c +++ b/drivers/md/dm-snap-persistent.c | |||
@@ -567,7 +567,7 @@ static int persistent_read_metadata(struct dm_exception_store *store, | |||
567 | ps->exceptions_per_area = (ps->store->chunk_size << SECTOR_SHIFT) / | 567 | ps->exceptions_per_area = (ps->store->chunk_size << SECTOR_SHIFT) / |
568 | sizeof(struct disk_exception); | 568 | sizeof(struct disk_exception); |
569 | ps->callbacks = dm_vcalloc(ps->exceptions_per_area, | 569 | ps->callbacks = dm_vcalloc(ps->exceptions_per_area, |
570 | sizeof(*ps->callbacks)); | 570 | sizeof(*ps->callbacks)); |
571 | if (!ps->callbacks) | 571 | if (!ps->callbacks) |
572 | return -ENOMEM; | 572 | return -ENOMEM; |
573 | 573 | ||
@@ -674,7 +674,7 @@ static void persistent_commit_exception(struct dm_exception_store *store, | |||
674 | * If we completely filled the current area, then wipe the next one. | 674 | * If we completely filled the current area, then wipe the next one. |
675 | */ | 675 | */ |
676 | if ((ps->current_committed == ps->exceptions_per_area) && | 676 | if ((ps->current_committed == ps->exceptions_per_area) && |
677 | zero_disk_area(ps, ps->current_area + 1)) | 677 | zero_disk_area(ps, ps->current_area + 1)) |
678 | ps->valid = 0; | 678 | ps->valid = 0; |
679 | 679 | ||
680 | /* | 680 | /* |
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index 9d6daa0eaff..94dee05dd28 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c | |||
@@ -1045,8 +1045,7 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
1045 | 1045 | ||
1046 | s = kmalloc(sizeof(*s), GFP_KERNEL); | 1046 | s = kmalloc(sizeof(*s), GFP_KERNEL); |
1047 | if (!s) { | 1047 | if (!s) { |
1048 | ti->error = "Cannot allocate snapshot context private " | 1048 | ti->error = "Cannot allocate private snapshot structure"; |
1049 | "structure"; | ||
1050 | r = -ENOMEM; | 1049 | r = -ENOMEM; |
1051 | goto bad; | 1050 | goto bad; |
1052 | } | 1051 | } |
@@ -1405,7 +1404,7 @@ static void pending_complete(struct dm_snap_pending_exception *pe, int success) | |||
1405 | */ | 1404 | */ |
1406 | dm_insert_exception(&s->complete, e); | 1405 | dm_insert_exception(&s->complete, e); |
1407 | 1406 | ||
1408 | out: | 1407 | out: |
1409 | dm_remove_exception(&pe->e); | 1408 | dm_remove_exception(&pe->e); |
1410 | snapshot_bios = bio_list_get(&pe->snapshot_bios); | 1409 | snapshot_bios = bio_list_get(&pe->snapshot_bios); |
1411 | origin_bios = bio_list_get(&pe->origin_bios); | 1410 | origin_bios = bio_list_get(&pe->origin_bios); |
@@ -1470,8 +1469,7 @@ static void start_copy(struct dm_snap_pending_exception *pe) | |||
1470 | dest.count = src.count; | 1469 | dest.count = src.count; |
1471 | 1470 | ||
1472 | /* Hand over to kcopyd */ | 1471 | /* Hand over to kcopyd */ |
1473 | dm_kcopyd_copy(s->kcopyd_client, | 1472 | dm_kcopyd_copy(s->kcopyd_client, &src, 1, &dest, 0, copy_callback, pe); |
1474 | &src, 1, &dest, 0, copy_callback, pe); | ||
1475 | } | 1473 | } |
1476 | 1474 | ||
1477 | static struct dm_snap_pending_exception * | 1475 | static struct dm_snap_pending_exception * |
@@ -1618,9 +1616,9 @@ static int snapshot_map(struct dm_target *ti, struct bio *bio, | |||
1618 | map_context->ptr = track_chunk(s, chunk); | 1616 | map_context->ptr = track_chunk(s, chunk); |
1619 | } | 1617 | } |
1620 | 1618 | ||
1621 | out_unlock: | 1619 | out_unlock: |
1622 | up_write(&s->lock); | 1620 | up_write(&s->lock); |
1623 | out: | 1621 | out: |
1624 | return r; | 1622 | return r; |
1625 | } | 1623 | } |
1626 | 1624 | ||
@@ -1964,7 +1962,7 @@ static int __origin_write(struct list_head *snapshots, sector_t sector, | |||
1964 | pe_to_start_now = pe; | 1962 | pe_to_start_now = pe; |
1965 | } | 1963 | } |
1966 | 1964 | ||
1967 | next_snapshot: | 1965 | next_snapshot: |
1968 | up_write(&snap->lock); | 1966 | up_write(&snap->lock); |
1969 | 1967 | ||
1970 | if (pe_to_start_now) { | 1968 | if (pe_to_start_now) { |