Bug 158376

Summary: [udf] [patch] The UDF file system under counts the number of entries in directories by one.
Product: Base System Reporter: Will DeVries <william.devries>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me Keywords: patch
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

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
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:40:16 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>