laptop-mode: Make flushes per-device
commit31373d09da5b7fe21fe6f781e92bd534a3495f00
authorMatthew Garrett <mjg@redhat.com>
Tue, 6 Apr 2010 12:25:14 +0000 (6 14:25 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 6 Apr 2010 12:25:14 +0000 (6 14:25 +0200)
tree38cd9896cfc6ce106a03431658a9b98a09129034
parent9195291e5f05e01d67f9a09c756b8aca8f009089
laptop-mode: Make flushes per-device

One of the features of laptop-mode is that it forces a writeout of dirty
pages if something else triggers a physical read or write from a device.
The current implementation flushes pages on all devices, rather than only
the one that triggered the flush. This patch alters the behaviour so that
only the recently accessed block device is flushed, preventing other
disks being spun up for no terribly good reason.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/blk-core.c
include/linux/backing-dev.h
include/linux/writeback.h
mm/page-writeback.c