diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-20 16:05:25 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-20 16:05:25 -0500 |
| commit | 6d6e352c80f22c446d933ca8103e02bac1f09129 (patch) | |
| tree | 248a6a7ebc5ea95986da5bccdd6d75b255cf28e4 /include/linux | |
| parent | b4789b8e6be3151a955ade74872822f30e8cd914 (diff) | |
| parent | 60aaf933854511630e16be4efe0f96485e132de4 (diff) | |
Merge tag 'md/3.13' of git://neil.brown.name/md
Pull md update from Neil Brown:
"Mostly optimisations and obscure bug fixes.
- raid5 gets less lock contention
- raid1 gets less contention between normal-io and resync-io during
resync"
* tag 'md/3.13' of git://neil.brown.name/md:
md/raid5: Use conf->device_lock protect changing of multi-thread resources.
md/raid5: Before freeing old multi-thread worker, it should flush them.
md/raid5: For stripe with R5_ReadNoMerge, we replace REQ_FLUSH with REQ_NOMERGE.
UAPI: include <asm/byteorder.h> in linux/raid/md_p.h
raid1: Rewrite the implementation of iobarrier.
raid1: Add some macros to make code clearly.
raid1: Replace raise_barrier/lower_barrier with freeze_array/unfreeze_array when reconfiguring the array.
raid1: Add a field array_frozen to indicate whether raid in freeze state.
md: Convert use of typedef ctl_table to struct ctl_table
md/raid5: avoid deadlock when raid5 array has unack badblocks during md_stop_writes.
md: use MD_RECOVERY_INTR instead of kthread_should_stop in resync thread.
md: fix some places where mddev_lock return value is not checked.
raid5: Retry R5_ReadNoMerge flag when hit a read error.
raid5: relieve lock contention in get_active_stripe()
raid5: relieve lock contention in get_active_stripe()
wait: add wait_event_cmd()
md/raid5.c: add proper locking to error path of raid5_start_reshape.
md: fix calculation of stacking limits on level change.
raid5: Use slow_path to release stripe when mddev->thread is null
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/wait.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/wait.h b/include/linux/wait.h index 61939ba30aa0..eaa00b10abaa 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
| @@ -278,6 +278,31 @@ do { \ | |||
| 278 | __ret; \ | 278 | __ret; \ |
| 279 | }) | 279 | }) |
| 280 | 280 | ||
| 281 | #define __wait_event_cmd(wq, condition, cmd1, cmd2) \ | ||
| 282 | (void)___wait_event(wq, condition, TASK_UNINTERRUPTIBLE, 0, 0, \ | ||
| 283 | cmd1; schedule(); cmd2) | ||
| 284 | |||
| 285 | /** | ||
| 286 | * wait_event_cmd - sleep until a condition gets true | ||
| 287 | * @wq: the waitqueue to wait on | ||
| 288 | * @condition: a C expression for the event to wait for | ||
| 289 | * cmd1: the command will be executed before sleep | ||
| 290 | * cmd2: the command will be executed after sleep | ||
| 291 | * | ||
| 292 | * The process is put to sleep (TASK_UNINTERRUPTIBLE) until the | ||
| 293 | * @condition evaluates to true. The @condition is checked each time | ||
| 294 | * the waitqueue @wq is woken up. | ||
| 295 | * | ||
| 296 | * wake_up() has to be called after changing any variable that could | ||
| 297 | * change the result of the wait condition. | ||
| 298 | */ | ||
| 299 | #define wait_event_cmd(wq, condition, cmd1, cmd2) \ | ||
| 300 | do { \ | ||
| 301 | if (condition) \ | ||
| 302 | break; \ | ||
| 303 | __wait_event_cmd(wq, condition, cmd1, cmd2); \ | ||
| 304 | } while (0) | ||
| 305 | |||
| 281 | #define __wait_event_interruptible(wq, condition) \ | 306 | #define __wait_event_interruptible(wq, condition) \ |
| 282 | ___wait_event(wq, condition, TASK_INTERRUPTIBLE, 0, 0, \ | 307 | ___wait_event(wq, condition, TASK_INTERRUPTIBLE, 0, 0, \ |
| 283 | schedule()) | 308 | schedule()) |
