Skip to content

Commit

Permalink
Use ULL suffix in constants
Browse files Browse the repository at this point in the history
The lack of the ULL suffix causes warnings such as the following on
32-bit systems:

  In function 'zfsctl_is_snapdir':
  zfs-0.6.0//module/zfs/zfs_ctldir.c:151: warning: integer constant
  is too large for 'long' type

We add the ULL suffix to fix that.

Signed-off-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #813
  • Loading branch information
ryao authored and behlendorf committed Jul 10, 2012
1 parent 42d3b99 commit a387358
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/sys/zfs_ctldir.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ extern void zfsctl_fini(void);
* However, they should be as large as possible to avoid conflicts
* with the objects which are assigned monotonically by the dmu.
*/
#define ZFSCTL_INO_ROOT 0x0000FFFFFFFFFFFF
#define ZFSCTL_INO_SHARES 0x0000FFFFFFFFFFFE
#define ZFSCTL_INO_SNAPDIR 0x0000FFFFFFFFFFFD
#define ZFSCTL_INO_SNAPDIRS 0x0000FFFFFFFFFFFC
#define ZFSCTL_INO_ROOT 0x0000FFFFFFFFFFFFULL
#define ZFSCTL_INO_SHARES 0x0000FFFFFFFFFFFEULL
#define ZFSCTL_INO_SNAPDIR 0x0000FFFFFFFFFFFDULL
#define ZFSCTL_INO_SNAPDIRS 0x0000FFFFFFFFFFFCULL

#define ZFSCTL_EXPIRE_SNAPSHOT 300

Expand Down

1 comment on commit a387358

@ryao
Copy link
Contributor Author

@ryao ryao commented on a387358 Oct 20, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This differs from Illumos and cannot be directly ported. We should look into porting it.

Please sign in to comment.