On Sun, 2008-08-17 at 17:10 +0100, David Woodhouse wrote: > On Sun, 2008-08-17 at 15:17 +0100, David Woodhouse wrote: > > Subject: [PATCH] Remove special cases for "." and ".." > > > > We never get asked by the VFS to lookup either of them, and we can > > handle the readdir() case a lot more simply, too. > > And a few other minor cleanups... some cosmetic, but note the > WARN_ON(). > + > + /* If there's more than one directory entry in each > + item, then the offset isn't unique. Seeking in > + directories will be broken. Can this ever actually > + happen? */ > + WARN_ON(di_cur != di_total); > } It can happen today for the tree of tree roots (directory of subvolumes and named snapshots). It happens when the name hashes collide. For real directories we use the sequence number index instead of the name hash index, so it normally won't happen. Longer term the directory of subvolumes is going to be a real directory and this special case will go away. -chris -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
