diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-06-02 21:45:28 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-06-02 21:45:28 +0100 |
commit | 2018227e9344edb9da15fc6a4a8298086cc2aa77 (patch) | |
tree | c18e1c09e605e94e2a1e93345ad25746cc9e14b9 /sys-fs/zfs-kmod/files | |
parent | 6f8038813c460b4f0572d5ef595cdfa94af3a94d (diff) |
gentoo resync : 02.06.2019
Diffstat (limited to 'sys-fs/zfs-kmod/files')
-rw-r--r-- | sys-fs/zfs-kmod/files/0.8.0_Fix_integer_overflow_in_get_next_chunk.patch | 32 | ||||
-rw-r--r-- | sys-fs/zfs-kmod/files/0.8.0_revert_Report_holes.patch | 53 |
2 files changed, 85 insertions, 0 deletions
diff --git a/sys-fs/zfs-kmod/files/0.8.0_Fix_integer_overflow_in_get_next_chunk.patch b/sys-fs/zfs-kmod/files/0.8.0_Fix_integer_overflow_in_get_next_chunk.patch new file mode 100644 index 000000000000..0042bfdc99c4 --- /dev/null +++ b/sys-fs/zfs-kmod/files/0.8.0_Fix_integer_overflow_in_get_next_chunk.patch @@ -0,0 +1,32 @@ +From ec4afd27f198d93a7bd32a05cb288708ba754ada Mon Sep 17 00:00:00 2001 +From: madz <olivier.mazouffre@ims-bordeaux.fr> +Date: Wed, 29 May 2019 19:17:25 +0200 +Subject: [PATCH] Fix integer overflow in get_next_chunk() + +dn->dn_datablksz type is uint32_t and need to be casted to uint64_t +to avoid an overflow when the record size is greater than 4 MiB. + +Reviewed-by: Tom Caputi <tcaputi@datto.com> +Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> +Signed-off-by: Olivier Mazouffre <olivier.mazouffre@ims-bordeaux.fr> +Closes #8778 +Closes #8797 +--- + module/zfs/dmu.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/module/zfs/dmu.c b/module/zfs/dmu.c +index 1697a632078..a283b062238 100644 +--- a/module/zfs/dmu.c ++++ b/module/zfs/dmu.c +@@ -719,8 +719,8 @@ get_next_chunk(dnode_t *dn, uint64_t *start, uint64_t minimum, uint64_t *l1blks) + uint64_t blks; + uint64_t maxblks = DMU_MAX_ACCESS >> (dn->dn_indblkshift + 1); + /* bytes of data covered by a level-1 indirect block */ +- uint64_t iblkrange = +- dn->dn_datablksz * EPB(dn->dn_indblkshift, SPA_BLKPTRSHIFT); ++ uint64_t iblkrange = (uint64_t)dn->dn_datablksz * ++ EPB(dn->dn_indblkshift, SPA_BLKPTRSHIFT); + + ASSERT3U(minimum, <=, *start); + diff --git a/sys-fs/zfs-kmod/files/0.8.0_revert_Report_holes.patch b/sys-fs/zfs-kmod/files/0.8.0_revert_Report_holes.patch new file mode 100644 index 000000000000..f8d67ccc7cef --- /dev/null +++ b/sys-fs/zfs-kmod/files/0.8.0_revert_Report_holes.patch @@ -0,0 +1,53 @@ +From: Georgy Yakovlev <gyakovlev@gentoo.org> +Date: Wed, 29 May 2019 14:38:15 -0700 +Subject: Revert [PATCH] Report holes when there are only metadata changes + +This reverts ec4f9b8f30391a3fb46c8d4a31c2dc9250dca1bb +Issue: https://github.com/zfsonlinux/zfs/issues/8816 +Bug: https://bugs.gentoo.org/635002 +--- +--- b/module/zfs/dmu.c ++++ a/module/zfs/dmu.c +@@ -2366,39 +2366,14 @@ + return (err); + + /* ++ * Check if dnode is dirty +- * Check if there are dirty data blocks or frees which have not been +- * synced. Dirty spill and bonus blocks which are external to the +- * object can ignored when reporting holes. + */ +- mutex_enter(&dn->dn_mtx); + for (i = 0; i < TXG_SIZE; i++) { + if (multilist_link_active(&dn->dn_dirty_link[i])) { ++ clean = B_FALSE; ++ break; +- +- if (dn->dn_free_ranges[i] != NULL) { +- clean = B_FALSE; +- break; +- } +- +- list_t *list = &dn->dn_dirty_records[i]; +- dbuf_dirty_record_t *dr; +- +- for (dr = list_head(list); dr != NULL; +- dr = list_next(list, dr)) { +- dmu_buf_impl_t *db = dr->dr_dbuf; +- +- if (db->db_blkid == DMU_SPILL_BLKID || +- db->db_blkid == DMU_BONUS_BLKID) +- continue; +- +- clean = B_FALSE; +- break; +- } + } +- +- if (clean == B_FALSE) +- break; + } +- mutex_exit(&dn->dn_mtx); + + /* + * If compatibility option is on, sync any current changes before |