]> granicus.if.org Git - zfs/commit
Handle zap_add() failures in mixed case mode
authorsanjeevbagewadi <sanjeev.bagewadi@gmail.com>
Fri, 9 Feb 2018 18:15:53 +0000 (23:45 +0530)
committerTony Hutter <hutter2@llnl.gov>
Wed, 14 Mar 2018 23:10:37 +0000 (16:10 -0700)
commitb3da003ebfad673bb4ada35f87a18a1ef175e95d
treeb471ecd775b6e6842916bfc9652bc22c2136ef1c
parent478754a8f5ff0f3b9f6dfe4ce272efc1681d243e
Handle zap_add() failures in mixed case mode

With "casesensitivity=mixed", zap_add() could fail when the number of
files/directories with the same name (varying in case) exceed the
capacity of the leaf node of a Fatzap. This results in a ASSERT()
failure as zfs_link_create() does not expect zap_add() to fail. The fix
is to handle these failures and rollback the transactions.

Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: Chunwei Chen <david.chen@nutanix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Sanjeev Bagewadi <sanjeev.bagewadi@gmail.com>
Closes #7011
Closes #7054
include/sys/zap_leaf.h
module/zfs/zap.c
module/zfs/zap_leaf.c
module/zfs/zap_micro.c
module/zfs/zfs_dir.c
module/zfs/zfs_vnops.c
tests/runfiles/linux.run
tests/zfs-tests/tests/functional/casenorm/Makefile.am
tests/zfs-tests/tests/functional/casenorm/mixed_create_failure.ksh [new file with mode: 0755]