raw-posix: handle > 512 byte alignment correctly
commit581b9e29f36eec5de0779c3dbade980e4405d92e
authorChristoph Hellwig <hch@lst.de>
Sun, 12 Sep 2010 21:43:21 +0000 (12 23:43 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 21 Sep 2010 13:39:42 +0000 (21 15:39 +0200)
tree8573c8af1a264501851c7d05ed86634375a5e612
parent72aef7318f54f0ec8c84c2bf2bb8edc5702d7dd0
raw-posix: handle > 512 byte alignment correctly

Replace the hardcoded handling of 512 byte alignment with bs->buffer_alignment
to handle larger sector size devices correctly.

Note that we can not rely on it to be initialize in bdrv_open, so deal
with the worst case there.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/raw-posix.c