HomeFreeBSD

Handling negative dentries in a CI file system.

Description

Handling negative dentries in a CI file system.

For a Case Insensitive file system we must avoid creating negative
entries in the dentry cache. We must also pass the FIGNORECASE into
zfs_lookup so that special files are handled correctly.

We must also prevent negative dentries from being created when files are
unlinked.

Tested by running fsstress from LTP (10 loops, 10 processes, 10,000 ops.)

Also tested with printks (now removed) to ensure that lookups come to
zpl_lookup when negative should not exist.

Tests:

  1. ls Some-file.txt; touch some-file.txt; ls Some-file.txt and ensure no errors.
  1. touch Some-file.txt; rm some-file.txt; ls Some-file.txt and ensure that the last ls shows log messages showing the lookup went all the way to zpl_lookup.

Thanks to tuxoko for helping me get this correct.

Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4243

Details

Provenance
Richard Sharpe <rsharpe@samba.org>Authored on Jan 24 2016, 7:36 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Feb 2 2016, 9:59 PM
Parents
rG4b9ed698b483: Illumos 6527 - Possible access beyond end of string in zpool comment
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG9d36cdb65089: Handling negative dentries in a CI file system. (authored by Richard Sharpe <rsharpe@samba.org>).Feb 2 2016, 9:59 PM