Tom Caputi 3ce85b5e60 Fix integer overflow of ZTOI(zp)->i_generation
The ZFS on-disk format stores each inode's generation ID as a 64
bit number on disk and in-core. However, the Linux kernel's inode
is only a 32 bit number. In most places, the code handles this
correctly, but the cast is missing in zfs_rezget(). For many pools,
this isn't an issue since the generation ID is computed as the
current txg when the inode is created and many pools don't have
more than 2^32 txgs.

For the pools that have more txgs, this issue causes any inode with
a high enough generation number to report IO errors after a call to
"zfs rollback" while holding the file or directory open. This patch
simply adds the missing cast.

Reviewed-by: Alek Pinchuk <apinchuk@datto.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8858
2019-06-06 12:59:39 -07:00
..
2019-05-04 16:40:48 -07:00
2015-01-16 14:41:26 -08:00
2017-08-14 10:36:48 -07:00
2019-05-07 15:18:44 -07:00
2018-05-29 16:00:33 -07:00
2019-01-17 15:25:00 -08:00
2018-05-01 11:24:20 -07:00
2019-05-07 15:18:44 -07:00
2019-05-07 15:18:44 -07:00
2019-05-07 15:18:44 -07:00
2018-08-15 09:53:44 -07:00
2019-05-23 13:46:33 -07:00
2018-05-29 16:00:33 -07:00
2019-04-12 11:30:59 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2017-10-11 16:54:48 -04:00
2019-05-02 16:46:04 -07:00
2015-01-16 14:41:26 -08:00
2019-03-29 09:13:20 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2018-10-01 10:42:05 -07:00
2018-03-15 10:53:58 -07:00
2018-05-29 16:00:33 -07:00
2019-05-23 19:17:00 -07:00
2019-05-09 10:08:05 -07:00
2018-05-29 16:00:33 -07:00
2019-03-29 09:13:20 -07:00
2019-03-29 09:13:20 -07:00
2019-04-14 11:03:06 -07:00
2019-03-29 09:13:20 -07:00
2016-11-29 14:34:33 -08:00
2019-03-29 09:13:20 -07:00
2019-03-29 09:13:20 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2018-02-13 14:54:54 -08:00
2019-05-25 14:29:10 -07:00
2019-04-16 10:01:45 -07:00
2019-03-15 14:14:31 -07:00
2019-04-04 18:57:06 -07:00
2018-02-09 10:08:05 -08:00
2018-05-29 16:00:33 -07:00
2019-05-08 10:04:04 -07:00