Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117012
b: refs/heads/master
c: 7acedc5
h: refs/heads/master
v: v3
  • Loading branch information
Mikulas Patocka authored and Alasdair G Kergon committed Oct 21, 2008
1 parent 0475213 commit de8cb6d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 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: 7c9e6c17325fab380fbe9c9787680ff7d4a51abd
refs/heads/master: 7acedc5b98a2fcff64f00c21110aae7d3ac2f7df
11 changes: 8 additions & 3 deletions trunk/drivers/md/dm-exception-store.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,18 +610,23 @@ static void persistent_commit(struct exception_store *store,
(ps->current_committed != ps->exceptions_per_area))
return;

/*
* If we completely filled the current area, then wipe the next one.
*/
if ((ps->current_committed == ps->exceptions_per_area) &&
zero_disk_area(ps, ps->current_area + 1))
ps->valid = 0;

/*
* Commit exceptions to disk.
*/
if (area_io(ps, WRITE))
if (ps->valid && area_io(ps, WRITE))
ps->valid = 0;

/*
* Advance to the next area if this one is full.
*/
if (ps->current_committed == ps->exceptions_per_area) {
if (zero_disk_area(ps, ps->current_area + 1))
ps->valid = 0;
ps->current_committed = 0;
ps->current_area++;
zero_memory_area(ps);
Expand Down

0 comments on commit de8cb6d

Please sign in to comment.