nbd: use g_slice_new() instead of a freelist
commite1adb27a83f19799c454cead7bf930a0b3f2bb28
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 2 May 2013 12:23:07 +0000 (2 14:23 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 3 May 2013 11:05:49 +0000 (3 13:05 +0200)
tree524de3ca51172f83e0a80e69035618f65ccc9d54
parent50522d969be315457e3296d8a32990b58a203902
nbd: use g_slice_new() instead of a freelist

Use GLib's efficient slice allocator instead of open-coding the request
freelist.  This patch simplifies the NBDRequest code.

Now we qemu_blockalign() the req->data buffer each time but the next
patch switches from a fixed size buffer to a dynamic size anyway.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
nbd.c