]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/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)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 9 Feb 2018 18:15:53 +0000 (10:15 -0800)
commitcc63068e95ee725cce03b1b7ce50179825a6cda5
treea9f4def7be1a9f9f49f299c858113fef982b0145
parenteb9c4532dda34bcf0612c2c797cb3fcab9a21b4f
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]