>Number: 158376
>Category: kern
>Synopsis: [patch] The UDF file system under counts the number of entries
>in directories by one.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Jun 28 07:10:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Will DeVries
>Release: 9.0-current
>Organization:
>Environment:
9.0-current
>Description:
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.
>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.)
>Fix:
Patch attached with submission follows:
--- sys/fs/udf/udf_vnops.c.old 2011-06-27 15:56:54.000000000 -0700
+++ sys/fs/udf/udf_vnops.c 2011-06-27 16:05:51.000000000 -0700
@@ -316,6 +316,9 @@
vap->va_ctime = vap->va_mtime; /* XXX Stored as an Extended Attribute */
vap->va_rdev = NODEV;
if (vp->v_type & VDIR) {
+ /* UDF doesn't include '.' as entry in directories. */
+ vap->va_nlink++;
+
/*
* Directories that are recorded within their ICB will show
* as having 0 blocks recorded. Since tradition dictates
>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"