]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen/blkfront: split per device io_lock
authorBob Liu <bob.liu@oracle.com>
Sat, 14 Nov 2015 03:12:13 +0000 (11:12 +0800)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 10 May 2016 20:24:38 +0000 (22:24 +0200)
commit27af7856cbc0df280d3c6952e1fccedb75e34a59
tree60586772495695a84decd60cc60c0b7574fc77ec
parent087e4b764782c74dc4475b3efb818e5dd909c062
xen/blkfront: split per device io_lock

After patch "xen/blkfront: separate per ring information out of device
info", per-ring data is protected by a per-device lock ('io_lock').

This is not a good way and will effect the scalability, so introduce a
per-ring lock ('ring_lock').

The old 'io_lock' is renamed to 'dev_lock' which protects the ->grants list and
->persistent_gnts_c which are shared by all rings.

Note that in 'blkfront_probe' the 'blkfront_info' is setup via kzalloc
so setting ->persistent_gnts_c to zero is not needed.

Signed-off-by: Bob Liu <bob.liu@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
(cherry picked from commit 11659569f7202d0cb6553e81f9b8aa04dfeb94ce)
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
drivers/block/xen-blkfront.c