Skip to content

When a ZFS File system is set to CASE INSENSITIVE we should be calling d_add_ci on the dentry #4136

@RichardSharpe

Description

@RichardSharpe

Hi folks,

We just ran into an issue that caused a rename deadlock in Linux.

Kernel 3.10.0, but the same will happen, I believe with the latest kernel.

We use the casesensitivity=insensitive attribute.

Because ZoL does not call d_add_ci with the canonical case (at least, I cannot find any such calls) Linux ends up with two dentries pointing to the same inode if you present two paths with different case.

This happened to us and causes a self-deadlock in lock_rename because it is passed two different dentries that point to the same inode.

I think the fix has to be in zpl_inode.c:zpl_lookup where we check if the file system is case insensitive and if so call d_add_ci(dentry, ip, realpnp) and add a realpnp parameter to the zfs_lookup call we make, or something like that.

For now, we can work around the issue in Samba, I believe, however, it would be good to have a real solution to this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions