On Sat, Dec 18, 2010 at 12:01:46AM +0000, Eduardo Horvath wrote: > Modified Files: > src/sys/ufs/lfs: lfs_vnops.c > > Log Message: > Byebye deadlock.
What lock is supposed to protect ip->i_flags? A quick survey of related code suggests that it's supposed to be lfs_lock. ...However, it looks as if that and quite a few other uses of ip->i_flags ought to be ip->i_flag instead. ip->i_flags holds the chflags() flags; the inode state flags are supposed to be in ip->i_flag. It looks as if all uses of IN_PAGING use ip->i_flags, so it's at least consistent, but it's wrong. There's also one reference to IN_CLEANING in ip->i_flags, which has no chance of ever working. Using lfs_lock to protect either of these isn't consistent with the ufs code though, AFAIK, so I don't think it's really safe regardless... (The existence of i_flag and i_flags members in the same structure seems to date to the ffsv2 import, but it's sort of been this way via macros since 4.4. Definitely brickworthy.) -- David A. Holland dholl...@netbsd.org