Patent ID: 7222119

Claim:
A method for performing operations within a file system in which directories and files are organized as nodes in a namespace tree, the method comprising: associating a read-write lock with each of the nodes in the namespace tree; acquiring a first lock on a name of one or more directories involved in a first operation; acquiring a second lock on an entire pathname involved in the first operation; determining whether the first lock or the second lock conflicts with third locks acquired by a second operation; performing the first operation when the first lock or the second lock does not conflict with the third locks, where the first, second, and third locks are read-write locks; and serializing performance of the first and second operations when the first lock or the second lock conflicts with the third locks, where serializing performance includes: determining an order for the first, second, and third locks based on levels of the namespace tree involved in the first, second, and third locks and within one of the levels of the namespace tree involved in the first, second, and third locks.