Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156582212
D51593.id159280.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D51593.id159280.diff
View Options
diff --git a/usr.sbin/makefs/zfs/fs.c b/usr.sbin/makefs/zfs/fs.c
--- a/usr.sbin/makefs/zfs/fs.c
+++ b/usr.sbin/makefs/zfs/fs.c
@@ -384,22 +384,34 @@
links = 1; /* .. */
objsize = 1; /* .. */
- /*
- * The size of a ZPL directory is the number of entries
- * (including "." and ".."), and the link count is the number of
- * entries which are directories (including "." and "..").
- */
- for (fsnode *c = fsnode_isroot(cur) ? cur->next : cur->child;
- c != NULL; c = c->next) {
- switch (c->type) {
- case S_IFDIR:
- links++;
- /* FALLTHROUGH */
- case S_IFREG:
- case S_IFLNK:
- objsize++;
- break;
+ if ((cur->inode->flags & FI_ROOT) == 0 ) {
+ /*
+ * The size of a ZPL directory is the number of entries
+ * (including "." and ".."), and the link count is the
+ * number of entries which are directories
+ * (including "." and "..").
+ */
+ for (fsnode *c =
+ fsnode_isroot(cur) ? cur->next : cur->child;
+ c != NULL; c = c->next) {
+ switch (c->type) {
+ case S_IFDIR:
+ links++;
+ /* FALLTHROUGH */
+ case S_IFREG:
+ case S_IFLNK:
+ objsize++;
+ break;
+ }
}
+ } else {
+ /*
+ * Root directory children do belong to
+ * different dataset and this directory is
+ * empty in the current objset.
+ */
+ links++; /* . */
+ objsize++; /* . */
}
/* The root directory is its own parent. */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, May 15, 8:38 PM (20 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33098174
Default Alt Text
D51593.id159280.diff (1 KB)
Attached To
Mode
D51593: makefs: zfs dataset mountpoints are considered non-empty
Attached
Detach File
Event Timeline
Log In to Comment