util/fd: drop fallback from spdk_fd_get_blocklen()

If the block size cannot be determined, just return 0 rather than
assuming 512.  This will allow the caller to tell whether the block size
was actually successfully retrieved.

Change-Id: If8a2b8ce498ba6de18238baedb62c8972cb32a74
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/373671
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Daniel Verkamp 2017-08-09 17:10:32 -07:00 committed by Jim Harris
parent 85af63a5f5
commit 98397d9ef7

View File

@ -76,8 +76,7 @@ spdk_fd_get_blocklen(int fd)
} }
#endif #endif
/* Assume 512 if none of the other methods worked */ return 0;
return 512;
} }
uint64_t uint64_t