block: use BDS ref for block jobs
commitfa510ebffa1fd509323e2e0888e369e23adbb508
authorFam Zheng <famz@redhat.com>
Fri, 23 Aug 2013 01:14:51 +0000 (23 09:14 +0800)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 6 Sep 2013 13:25:08 +0000 (6 15:25 +0200)
tree62bb139b70cfe5d10f692e0c96104cf910e0221c
parent38b54b6dc18ae7e2a32e5ae38b312fb13f0584c8
block: use BDS ref for block jobs

Block jobs used drive_get_ref(drive_get_by_blockdev(bs)) to avoid BDS
being deleted. Now we have BDS reference count, and block jobs don't
care about dinfo, so replace them to get cleaner code. It is also the
safe way when BDS has no drive info.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
blockdev.c
blockjob.c