Andrew, This patch contains several changes against the ext3 reservation code in 265-mm6 tree: Lazy Discard Reservation Window: This patch is trying to do lazy discard: keep the old reservation window temporally until we find the new reservation window, only do remove/add if the new reservation window locate different than the old one. (The reservation code in mm6 tree will discard the old one first, then search the new one). Two reasons: - If the ext3_find_goal() does a good job, the reservation windows on the list should not very close to each other. So a inode's new reservation window is likely located just next to it's old one, it's position in the whole list is unchanged, no need to do remove and then add the new one to the list in the same location. Just update the start block and end block. - If we failed to find a new reservation in the goal group and move on the search to the next group, having the old reservation around temporally could allow us to search the list directly after the old window. Otherwise we lost where we were and has to start from the beginning of the list. Eventually the old window will be discard when we found a new one. Other changes: - Add check to force maximum when dynamically increase window size. - ext3_discard_reservation() should not be called on every iput(). Now it is moved to ext3_delete_inode(), so it is only called on the last iput() if i_nlink is 0 - remove #ifdef EXT3_RESERVATION since we made reservation an mount option - Only allow application to modify the file's reservation window size when fs is mounted with reservation and the operation is performed on regular files. This patch should apply to 2.6.5-mm6. Have tested it through many dd test, untar test,dbench and tiobench. Thanks! Mingming