rbd-nbd: check /sys/block/nbdX/size to ensure kernel mapped correctly
Fixes: http://tracker.ceph.com/issues/18335
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit
596e5ea8a5df72002672eef0a6d20572ca6f60f0)
Conflicts:
qa/workunits/rbd/rbd-nbd.sh: the original commit removes
TOO_LARGE_IMAGE test, do the same thing
src/tools/rbd_nbd/rbd-nbd.cc: help git to add
"include/stringify.h"
Other changes:
src/tools/rbd_nbd/rbd-nbd.cc: #include <fstream> so
the code compiles
Signed-off-by: Alexey Sheplyakov <asheplyakov@mirantis.com>