diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-25 19:00:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-25 19:00:17 -0400 |
commit | e4bc13adfd016fc1036838170288b5680d1a98b0 (patch) | |
tree | 8d2cb749397749439732f3a827cb7f2336408337 /drivers/block | |
parent | ad90fb97515b732bc27a0109baa10af636c3c8cd (diff) | |
parent | 3e1534cf4a2a8278e811e7c84a79da1a02347b8b (diff) |
Merge branch 'for-4.2/writeback' of git://git.kernel.dk/linux-block
Pull cgroup writeback support from Jens Axboe:
"This is the big pull request for adding cgroup writeback support.
This code has been in development for a long time, and it has been
simmering in for-next for a good chunk of this cycle too. This is one
of those problems that has been talked about for at least half a
decade, finally there's a solution and code to go with it.
Also see last weeks writeup on LWN:
http://lwn.net/Articles/648292/"
* 'for-4.2/writeback' of git://git.kernel.dk/linux-block: (85 commits)
writeback, blkio: add documentation for cgroup writeback support
vfs, writeback: replace FS_CGROUP_WRITEBACK with SB_I_CGROUPWB
writeback: do foreign inode detection iff cgroup writeback is enabled
v9fs: fix error handling in v9fs_session_init()
bdi: fix wrong error return value in cgwb_create()
buffer: remove unusued 'ret' variable
writeback: disassociate inodes from dying bdi_writebacks
writeback: implement foreign cgroup inode bdi_writeback switching
writeback: add lockdep annotation to inode_to_wb()
writeback: use unlocked_inode_to_wb transaction in inode_congested()
writeback: implement unlocked_inode_to_wb transaction and use it for stat updates
writeback: implement [locked_]inode_to_wb_and_lock_list()
writeback: implement foreign cgroup inode detection
writeback: make writeback_control track the inode being written back
writeback: relocate wb[_try]_get(), wb_put(), inode_{attach|detach}_wb()
mm: vmscan: disable memcg direct reclaim stalling if cgroup writeback support is in use
writeback: implement memcg writeback domain based throttling
writeback: reset wb_domain->dirty_limit[_tstmp] when memcg domain size changes
writeback: implement memcg wb_domain
writeback: update wb_over_bg_thresh() to use wb_domain aware operations
...
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/drbd/drbd_int.h | 1 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 10 | ||||
-rw-r--r-- | drivers/block/pktcdvd.c | 1 |
3 files changed, 7 insertions, 5 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index b905e9888b88..efd19c2da9c2 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/mutex.h> | 38 | #include <linux/mutex.h> |
39 | #include <linux/major.h> | 39 | #include <linux/major.h> |
40 | #include <linux/blkdev.h> | 40 | #include <linux/blkdev.h> |
41 | #include <linux/backing-dev.h> | ||
41 | #include <linux/genhd.h> | 42 | #include <linux/genhd.h> |
42 | #include <linux/idr.h> | 43 | #include <linux/idr.h> |
43 | #include <net/tcp.h> | 44 | #include <net/tcp.h> |
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 81fde9ef7f8e..a1518539b858 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -2359,7 +2359,7 @@ static void drbd_cleanup(void) | |||
2359 | * @congested_data: User data | 2359 | * @congested_data: User data |
2360 | * @bdi_bits: Bits the BDI flusher thread is currently interested in | 2360 | * @bdi_bits: Bits the BDI flusher thread is currently interested in |
2361 | * | 2361 | * |
2362 | * Returns 1<<BDI_async_congested and/or 1<<BDI_sync_congested if we are congested. | 2362 | * Returns 1<<WB_async_congested and/or 1<<WB_sync_congested if we are congested. |
2363 | */ | 2363 | */ |
2364 | static int drbd_congested(void *congested_data, int bdi_bits) | 2364 | static int drbd_congested(void *congested_data, int bdi_bits) |
2365 | { | 2365 | { |
@@ -2376,14 +2376,14 @@ static int drbd_congested(void *congested_data, int bdi_bits) | |||
2376 | } | 2376 | } |
2377 | 2377 | ||
2378 | if (test_bit(CALLBACK_PENDING, &first_peer_device(device)->connection->flags)) { | 2378 | if (test_bit(CALLBACK_PENDING, &first_peer_device(device)->connection->flags)) { |
2379 | r |= (1 << BDI_async_congested); | 2379 | r |= (1 << WB_async_congested); |
2380 | /* Without good local data, we would need to read from remote, | 2380 | /* Without good local data, we would need to read from remote, |
2381 | * and that would need the worker thread as well, which is | 2381 | * and that would need the worker thread as well, which is |
2382 | * currently blocked waiting for that usermode helper to | 2382 | * currently blocked waiting for that usermode helper to |
2383 | * finish. | 2383 | * finish. |
2384 | */ | 2384 | */ |
2385 | if (!get_ldev_if_state(device, D_UP_TO_DATE)) | 2385 | if (!get_ldev_if_state(device, D_UP_TO_DATE)) |
2386 | r |= (1 << BDI_sync_congested); | 2386 | r |= (1 << WB_sync_congested); |
2387 | else | 2387 | else |
2388 | put_ldev(device); | 2388 | put_ldev(device); |
2389 | r &= bdi_bits; | 2389 | r &= bdi_bits; |
@@ -2399,9 +2399,9 @@ static int drbd_congested(void *congested_data, int bdi_bits) | |||
2399 | reason = 'b'; | 2399 | reason = 'b'; |
2400 | } | 2400 | } |
2401 | 2401 | ||
2402 | if (bdi_bits & (1 << BDI_async_congested) && | 2402 | if (bdi_bits & (1 << WB_async_congested) && |
2403 | test_bit(NET_CONGESTED, &first_peer_device(device)->connection->flags)) { | 2403 | test_bit(NET_CONGESTED, &first_peer_device(device)->connection->flags)) { |
2404 | r |= (1 << BDI_async_congested); | 2404 | r |= (1 << WB_async_congested); |
2405 | reason = reason == 'b' ? 'a' : 'n'; | 2405 | reason = reason == 'b' ? 'a' : 'n'; |
2406 | } | 2406 | } |
2407 | 2407 | ||
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 09e628dafd9d..4c20c228184c 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #include <linux/freezer.h> | 61 | #include <linux/freezer.h> |
62 | #include <linux/mutex.h> | 62 | #include <linux/mutex.h> |
63 | #include <linux/slab.h> | 63 | #include <linux/slab.h> |
64 | #include <linux/backing-dev.h> | ||
64 | #include <scsi/scsi_cmnd.h> | 65 | #include <scsi/scsi_cmnd.h> |
65 | #include <scsi/scsi_ioctl.h> | 66 | #include <scsi/scsi_ioctl.h> |
66 | #include <scsi/scsi.h> | 67 | #include <scsi/scsi.h> |