Skip to content

Commit

Permalink
Fix the block maps for data ranges
Browse files Browse the repository at this point in the history
The existing code uses the underlying data blocks as keys, and the
origin blocks as values, which is backwards. This is done correctly
above for the single mapping case, so this bug only affects range
mappings.
  • Loading branch information
Steven McDonald authored and mpalmer committed Sep 3, 2014
1 parent 35ad91f commit ab59bcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/lvm/thin_snapshot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def vg_block_dump
len = r.attribute('length').value.to_i
ori = r.attribute('origin_begin').value.to_i
dat = r.attribute('data_begin').value.to_i
h2[(dat..dat+len-1)] = (ori..ori+len-1)
h2[(ori..ori+len-1)] = (dat..dat+len-1)
end

h2
Expand Down

0 comments on commit ab59bcd

Please sign in to comment.