On Thu, Jun 21, 2012 at 6:32 PM, Glauber Costa <glom...@parallels.com> wrote: > On 06/21/2012 04:29 PM, Glauber Costa wrote: >> Around one year ago, the following was reported: >> http://comments.gmane.org/gmane.comp.lib.libcg.devel/3116 >> (Error when calling cgroup_modify_cgroup()) >> >> Today, I ran into the very same error. Inspecting the code >> in libcg, it seemed to me that the best thing to avoid that >> is to never attempt to write something the user never wrote to. >> >> That is because if the user actually tries to write to a read-only >> file, we should yield an error, making skipping read-only a bad >> solution. >> >> My solution is to add a field to the value structure indicating >> whether or not it is dirty. cgroup_modify_cgroup then becomes a >> flusher, and the problem goes away. >> >> Signed-off-by: Glauber Costa <glom...@parallels.com> > > Ok, sorry: >. > Still one small issue with this patch. I need to make the value dirty > again after the upcoming set_values, or just the first one will work. > > Please you guys let me know if the approach is sensible, then I can send > a new version.
Hi, Glauber Based on the file permissions, may be we can do a check upfront.. Today we rely on fwrite failure (I need to go hide somewhere :) ). Is dirty your way of caching the same information instead of reading it again? Balbir ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel