On 8/21/19 1:11 PM, Florian Westphal wrote: > Fernando Fernandez Mancera <ffmancera@xxxxxxxxxx> wrote: >> How is that argument going to be used? If 'commit' is false we should >> just check that values are fine but not update them? > > Yes, thats the idea. > >> Yes, I agree on updating the object in the commit phase. But I am not >> sure about how I should place it on 'trans'. Any hints? Thanks :-) > > Can you place a pointer to the tb array on the trans object? > I prefer this option. So we can place a pointer to the tb array on the trans object and also the pointer to the existing object. This way it should be easy to do ->update in the commit phase. Thanks! > Another possibility is to have ->update return a kmalloced blob > that contains ready-to-use binary data, so depending on the 'bool > commit' the update hook would expect either tb[] (for validation) > or a backend-maintained struct with the to-update values. > > In the quota case it would be a struct containing the u64 values. > >> I am also writing some userspace shell tests. > > Thats good, thanks Fernando! >