On Mon, Aug 12, 2019 at 10:41:48AM -0700, harshad shirwadkar wrote: > I see, so you mean each fsync() call will result in exactly one inode > to be committed (the inode on which fsync was called), right? I agree > this doesn't need to go through JBD2 but we need a mechanism to inform > JBD2 about this fast commit since JBD2 maintains sub-transaction ID. > JBD2 will in turn need to make sure that a subtid was allocated for > such a fast commit and it was incremented once the fast commit was > successful as well. Why does JBD2 need to maintain the sub-transaction ID? We can only have a single fast commit happening at a time, and while a fast commit is happening we can't allow a full commit from happening (or vice versa). So we need a mutex which enforces this, the transaction id can just be a field in the transaction structure. Cheers, - Ted