mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
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 <tcaputi@datto.com> Reviewed-by: Tim Chase <tim@chase2k.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #5347
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user