agrover/targetcli-fb — pull request #37 by cvubrugier (2013-12-02 19:48:13+00:00)
Title: Fix issue #23: use fallocate() to create fileio backstores

Python 3.3 provides the fallocate() system call which is better for
allocating disk space than ftruncate(). ftruncate() sets the file size
to the requested size but does not reserve the blocks in the file
system. Unlike ftruncate(), fallocate() fails if there is not enough
free space.

Moreover, this patch improves error handling when the file cannot be
opened or when the requested size is too large to be converted to a
long int.

Signed-off-by: Christophe Vu-Brugier