From 82ec9d41d85b1643402493bf72a7e7d2896b7310 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 28 Oct 2016 23:53:24 +0000 Subject: Fix 32-bit maximum volume size A limit of 1TB exists for zvols on 32-bit systems. Update the code to correctly reflect this limitation in a similar manor as the OpenZFS implementation. Reviewed-by: Tom Caputi Reviewed-by: Tim Chase Signed-off-by: Brian Behlendorf Issue #5347 --- module/zfs/zvol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/zfs') diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c index b5169baf4..ea6997b5b 100644 --- a/module/zfs/zvol.c +++ b/module/zfs/zvol.c @@ -281,7 +281,7 @@ zvol_check_volsize(uint64_t volsize, uint64_t blocksize) return (SET_ERROR(EINVAL)); #ifdef _ILP32 - if (volsize - 1 > MAXOFFSET_T) + if (volsize - 1 > SPEC_MAXOFFSET_T) return (SET_ERROR(EOVERFLOW)); #endif return (0); -- cgit v1.2.3