Sascha, Am Mittwoch, 23. Januar 2019, 10:55:35 CET schrieb Sascha Hauer: > > > S_SYNC won't help us. We need to make sure that a change of an inode and > > > the corresponding update to the quota file is done atomically. Otherwise > > > it may happen that we only change the size of an inode, but miss the > > > corresponding quota updates, or depending on the implementation, maybe > > > the other way round. > > > > This is why I said yesterday you need to touch the UBIFS journal replay code too. > > So, S_SYNC is not to keep the quota file consistent with UBIFS' state, it is > > to make sure we don't lose quota updates. > > But how we handle a power cut between the update to the quota file and > the actual inode change then? During replay we'll find quota updates and > inode updates, but we do not have any information which quota update > belongs to which inode change. In worst case we need to store more info in the journal to get this infos. That's why I asked Jan for more info. I don't know what exactly quota expects from the filesystem in terms of consistency. Maybe there are already some helpers, etc... Thanks, //richard