Project

General

Profile

Actions

Bug #13104

closed

zfs: offset_t is signed and can not be > MAXOFFSET_T

Added by Toomas Soome over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

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

Actions

Also available in: Atom PDF