On Mon, Mar 10, 2014 at 09:36:45AM -0400, Jeff Layton wrote: > This patchset fixes the problems that Trond pointed out last week, > namely that you can end up deadlocking yourself if you set a > file-private lock on a file and then do some I/O on the same. > > With this set, mandatory locking should work more or less as you'd > expect with file-private locks. If you set a lock on an open file > and then do some I/O on it, it won't block. If you try to lock and > do I/O on different open files, then the I/O may end up blocked. > > Note that this approach is just as racy as the existing mandatory > lock implementation, but I don't think it makes anything worse there. As another alternative, could we declare file-private locks to never be mandatory? The mandatory bit has only ever applied to traditional posix locks, so I don't think there's necessarily a presumption they'd apply to this new lock type as well. That doesn't necessarily simplify the locks_mandatory_area case as it then needs __posix_lock_file to be able to ignore traditional posix locks. --b. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html