Hi,

On Thu, Jun 21, 2012 at 5:59 PM, Glauber Costa <glom...@parallels.com> 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.
>

OK, good point. But consider the following use case. I want to
duplicate a cgroup, except for its name?

Or, let's say CPU and cpuset are mounted together, and I want to just
modify the cpu parameters, and not cpuset. I duplicate the parent
using cgroup_get_cgroup, have a modified name, and modified cpu
paramenters, and then write to the child. How else do you suggest
doing that, apart from knowing how the cgroups is setup on that
system?

 How does one handle that case?

So while I am inclined to accept your solution, I do know of some real
users who are setup like that and in this form the current solution is
not acceptable. Might need a separate API.

Dhaval

------------------------------------------------------------------------------
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

Reply via email to