diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/md/dm-snap.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index 5e553c50c215..288994ee7142 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c | |||
| @@ -234,6 +234,16 @@ static int __chunk_is_tracked(struct dm_snapshot *s, chunk_t chunk) | |||
| 234 | } | 234 | } |
| 235 | 235 | ||
| 236 | /* | 236 | /* |
| 237 | * This conflicting I/O is extremely improbable in the caller, | ||
| 238 | * so msleep(1) is sufficient and there is no need for a wait queue. | ||
| 239 | */ | ||
| 240 | static void __check_for_conflicting_io(struct dm_snapshot *s, chunk_t chunk) | ||
| 241 | { | ||
| 242 | while (__chunk_is_tracked(s, chunk)) | ||
| 243 | msleep(1); | ||
| 244 | } | ||
| 245 | |||
| 246 | /* | ||
| 237 | * One of these per registered origin, held in the snapshot_origins hash | 247 | * One of these per registered origin, held in the snapshot_origins hash |
| 238 | */ | 248 | */ |
| 239 | struct origin { | 249 | struct origin { |
| @@ -1102,12 +1112,8 @@ static void pending_complete(struct dm_snap_pending_exception *pe, int success) | |||
| 1102 | goto out; | 1112 | goto out; |
| 1103 | } | 1113 | } |
| 1104 | 1114 | ||
| 1105 | /* | 1115 | /* Check for conflicting reads */ |
| 1106 | * Check for conflicting reads. This is extremely improbable, | 1116 | __check_for_conflicting_io(s, pe->e.old_chunk); |
| 1107 | * so msleep(1) is sufficient and there is no need for a wait queue. | ||
| 1108 | */ | ||
| 1109 | while (__chunk_is_tracked(s, pe->e.old_chunk)) | ||
| 1110 | msleep(1); | ||
| 1111 | 1117 | ||
| 1112 | /* | 1118 | /* |
| 1113 | * Add a proper exception, and remove the | 1119 | * Add a proper exception, and remove the |
