Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24388
b: refs/heads/master
c: 930d332
h: refs/heads/master
v: v3
  • Loading branch information
Jun'ichi Nomura authored and Linus Torvalds committed Mar 27, 2006
1 parent 07e50a7 commit fa59988
Show file tree
Hide file tree
Showing 2 changed files with 14 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: 76df1c651b66bdf07d60b3d60789feb5f58d73e3
refs/heads/master: 930d332a23682202c07df0276dd665a57755b37d
14 changes: 13 additions & 1 deletion trunk/drivers/md/dm-raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,21 @@ static void rh_dec(struct region_hash *rh, region_t region)

spin_lock_irqsave(&rh->region_lock, flags);
if (atomic_dec_and_test(&reg->pending)) {
/*
* There is no pending I/O for this region.
* We can move the region to corresponding list for next action.
* At this point, the region is not yet connected to any list.
*
* If the state is RH_NOSYNC, the region should be kept off
* from clean list.
* The hash entry for RH_NOSYNC will remain in memory
* until the region is recovered or the map is reloaded.
*/

/* do nothing for RH_NOSYNC */
if (reg->state == RH_RECOVERING) {
list_add_tail(&reg->list, &rh->quiesced_regions);
} else {
} else if (reg->state == RH_DIRTY) {
reg->state = RH_CLEAN;
list_add(&reg->list, &rh->clean_regions);
}
Expand Down

0 comments on commit fa59988

Please sign in to comment.