Bug 158376 - [udf] [patch] The UDF file system under counts the number of entries in directories by one.
Summary: [udf] [patch] The UDF file system under counts the number of entries in direc...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-28 08:10 UTC by Will DeVries
Modified: 2017-12-31 22:32 UTC (History)
0 users

See Also:


Attachments
file.diff (485 bytes, patch)
2011-06-28 08:10 UTC, Will DeVries
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Will DeVries 2011-06-28 08:10:09 UTC
The UDF file system does not include '.' in the count of items in a directory.  This was not accounted for in the code for vop_getattr.

Fix: Patch attached with submission follows:
How-To-Repeat: This issue can been seen by mounting a UDF file system and comparing the count given by ls -l for the number of entries in the mount point to the actual number of entries.  (The count will be one less then the actual number of entries.  '.' is excluded from the count.)
Comment 1 Will DeVries 2011-06-28 08:39:03 UTC
Err, I have this all wrong.  I don't know where I came up with
directories entry counts.  The UDF file system under counts the number
of links to directories by one.  It does not count for '.', which
doesn't actually exist in the file system but presented in the by
system.  A directory in the udf filesystem with one subdirectory and
no other links to the directory would have a link count of 2.  This
arrangement under udf would have a link count of 3.
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:14 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped