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
#define ZVOL_OBJ 1ULL
#define ZVOL_ZAP_OBJ 2ULL
+#define SPEC_MAXOFFSET_T ((1LL << ((NBBY * sizeof (daddr32_t)) + \
+ DEV_BSHIFT - 1)) - 1)
+
extern void *zvol_tag;
extern void zvol_create_minors(spa_t *spa, const char *name, boolean_t async);
return (SET_ERROR(EINVAL));
#ifdef _ILP32
- if (volsize - 1 > MAXOFFSET_T)
+ if (volsize - 1 > SPEC_MAXOFFSET_T)
return (SET_ERROR(EOVERFLOW));
#endif
return (0);