Whamcloud - gitweb
LU-11535 ldiskfs: allocate extra ldiskfs_ext_path for root 88/33388/2
authorArtem Blagodarenko <artem.blagodarenko@seagate.com>
Wed, 17 Oct 2018 12:17:47 +0000 (15:17 +0300)
committerOleg Drokin <green@whamcloud.com>
Mon, 29 Oct 2018 15:57:58 +0000 (15:57 +0000)
commit7231a4d0d2661ddd81a2296064404529cb87605a
tree751f7a6275c78e114930daa1ca4b1a9afc1b55de
parentfaf6f514c172d6949e474c17f95ac45634b063fb
LU-11535 ldiskfs: allocate extra ldiskfs_ext_path for root

Patch ext4_s_max_ext_tree_depth changes path array allocation.
Maximum extent depth is counted in ext4_ext_init(), but
extent's root stored in i_data is not counted. This leads to
out of array writting in ldiskfs_ext_remove_space() and following
fault during transaction commit:

BUG: unable to handle kernel NULL pointer dereference at (null)
[<ffffffffa0f25acb>] osd_trans_commit_cb+0xcb/0x2b0 [osd_ldiskfs]
[<ffffffffa0ecc8e1>] ldiskfs_journal_commit_callback+0x61/0x80
[<ffffffffa03eb8ef>] jbd2_journal_commit_transaction+0x116f/0x15a0

This patch adds one extra element for root in path array.

Cray-bug-id: LUS-6488
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@gmail.com>
Change-Id: I950e223f6ad68c88c1e78fc62448542fd4e78329
Reviewed-on: https://review.whamcloud.com/33388
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
ldiskfs/kernel_patches/patches/rhel6.6/ext4_s_max_ext_tree_depth.patch
ldiskfs/kernel_patches/patches/rhel7/ext4_s_max_ext_tree_depth.patch
ldiskfs/kernel_patches/patches/sles11sp3/ext4_s_max_ext_tree_depth.patch
ldiskfs/kernel_patches/patches/sles12sp2/ext4_s_max_ext_tree_depth.patch