Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30347
b: refs/heads/master
c: 8a835f1
h: refs/heads/master
i:
  30345: c7d7bdf
  30343: ec55092
v: v3
  • Loading branch information
Alasdair G Kergon authored and Linus Torvalds committed Jun 26, 2006
1 parent df582c7 commit f998633
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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: 29121bd0b00ebb9524971a583fea4a2f7afe8041
refs/heads/master: 8a835f11bce68ed990533e49b5dedb00bee46d71
6 changes: 5 additions & 1 deletion trunk/drivers/md/dm-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ static int disk_resume(struct dirty_log *log)
if (r)
return r;

/* set or clear any new bits */
/* set or clear any new bits -- device has grown */
if (lc->sync == NOSYNC)
for (i = lc->header.nr_regions; i < lc->region_count; i++)
/* FIXME: amazingly inefficient */
Expand All @@ -457,6 +457,10 @@ static int disk_resume(struct dirty_log *log)
/* FIXME: amazingly inefficient */
log_clear_bit(lc, lc->clean_bits, i);

/* clear any old bits -- device has shrunk */
for (i = lc->region_count; i % (sizeof(*lc->clean_bits) << BYTE_SHIFT); i++)
log_clear_bit(lc, lc->clean_bits, i);

/* copy clean across to sync */
memcpy(lc->sync_bits, lc->clean_bits, size);
lc->sync_count = count_bits32(lc->clean_bits, lc->bitset_uint32_count);
Expand Down

0 comments on commit f998633

Please sign in to comment.