--- - branch: MAIN date: Mon Jun 4 19:37:37 UTC 2012 files: - new: '1.3' old: '1.2' path: src/sys/ufs/ufs/ufs_rename.c pathrev: src/sys/ufs/ufs/ufs_rename.c@1.3 type: modified id: 20120604T193737Z.1661143bfd36acec7abec0b491e06b3de1ffd344 log: | Kill scary message about cross-block directories and fix its cause. Add a bunch of kasserts to check more stringently that ufs_direnter did not compact across directory blocks. Don't bother fetching subsequent I/O blocks from the directory: ufs_lookup guarantees that it's not necessary, and the kasserts check this to be sure. The message fired when we were looking at the start of an I/O block, not when we crossed from the end of one to the start of another. I believe it fired only when tulr->ulr_offset was a multiple of the I/O block size (fs_bsize), which can happen if ufs_lookup either finds an entry or finds free space at the start of an I/O block. If ufs_lookup found an entry, none of this ulr recalculation logic should kick in -- if tvp != NULL, then tulr->ulr_count is garbage, so it's not merely unnecessary but wrong (although I suspect harmless in the end) to read it in ufs_rename_overlap_p in consideration of whether to recalculate fulr. Discussed with chuq and dholland. ok dholland module: src subject: 'CVS commit: src/sys/ufs/ufs' unixtime: '1338838657' user: riastradh