zfs: offset_t is signed and can not be > MAXOFFSET_T
Build error with smatch:
/code/illumos-gate/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/i386/smatch: ../../common/fs/zfs/zfs_vnops.c:4844 zfs_seek() warn: impossible condition '(*noffp > 9223372036854775807) => (s64min - s64max > s64max)'
offset_t is signed type, therefore '*noffp' can be < 0, but not larger than MAXOFFSET_T, which is maximum positive value for offset_t.
Testing done: disasm does show identical assembler code before and after the patch.
Testing done: build/install/boot
Updated by Electric Monk over 1 year ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
commit e4af2f17fac5babc25d094f1bf22dd06515f66c7 Author: Toomas Soome <firstname.lastname@example.org> Date: 2020-09-08T05:46:27.000Z 13104 zfs: offset_t is signed and can not be > MAXOFFSET_T Reviewed by: Robert Mustacchi <email@example.com> Reviewed by: Igor Kozhukhov <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>