Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331655
b: refs/heads/master
c: c9aadfe
h: refs/heads/master
i:
  331653: 6a971c7
  331651: e9dffb7
  331647: e201068
v: v3
  • Loading branch information
Alex Elder committed Oct 1, 2012
1 parent 1943586 commit b4fa13f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 98cec111c08d8d52168e28648b4a1c2f5011cd70
refs/heads/master: c9aadfe7860f83ee17e55fe17398f3fe948a0a84
6 changes: 2 additions & 4 deletions trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ struct rbd_image_header {
__u8 crypt_type;
__u8 comp_type;
struct ceph_snap_context *snapc;
u32 total_snaps;

char *snap_names;
u64 *snap_sizes;
Expand Down Expand Up @@ -588,7 +587,6 @@ static int rbd_header_from_disk(struct rbd_image_header *header,
header->obj_order = ondisk->options.order;
header->crypt_type = ondisk->options.crypt_type;
header->comp_type = ondisk->options.comp_type;
header->total_snaps = snap_count;

/* Allocate and fill in the snapshot context */

Expand Down Expand Up @@ -624,7 +622,8 @@ static int snap_by_name(struct rbd_image_header *header, const char *snap_name,
int i;
char *p = header->snap_names;

for (i = 0; i < header->total_snaps; i++) {
rbd_assert(header->snapc != NULL);
for (i = 0; i < header->snapc->num_snaps; i++) {
if (!strcmp(snap_name, p)) {

/* Found it. Pass back its id and/or size */
Expand Down Expand Up @@ -1839,7 +1838,6 @@ static int __rbd_refresh_header(struct rbd_device *rbd_dev, u64 *hver)
*hver = h.obj_version;
rbd_dev->header.obj_version = h.obj_version;
rbd_dev->header.image_size = h.image_size;
rbd_dev->header.total_snaps = h.total_snaps;
rbd_dev->header.snapc = h.snapc;
rbd_dev->header.snap_names = h.snap_names;
rbd_dev->header.snap_sizes = h.snap_sizes;
Expand Down

0 comments on commit b4fa13f

Please sign in to comment.