Commit 98397d9e authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Jim Harris
Browse files

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: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/373671


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 85af63a5
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -76,8 +76,7 @@ spdk_fd_get_blocklen(int fd)
	}
#endif

	/* Assume 512 if none of the other methods worked */
	return 512;
	return 0;
}

uint64_t