Matt Helsley wrote: > cgroup subsystems may find the O_APPEND and O_NONBLOCK flags useful > in determining the way they handle writes. For now only pass these > flags through the write_string op. > > A subsequent patch will make use of the O_NONBLOCK flag in the > cgroup freezer write_string op. > > Signed-off-by: Matt Helsley <matthltc@xxxxxxxxxx> > Cc: Nathan Lynch <ntl@xxxxxxxxx> > Cc: Paul Menage <menage@xxxxxxxxxx> > Cc: Li Zefan <lizf@xxxxxxxxxxxxxx> > > (Cc'ing mem controller maintainers in case they find this useful..) > Cc: Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> > Cc: Pavel Emelyanov <xemul@xxxxxxxxxx> > Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> > --- > include/linux/cgroup.h | 3 ++- > kernel/cgroup.c | 5 +++-- > kernel/cgroup_freezer.c | 5 ++--- > kernel/cpuset.c | 2 +- > mm/memcontrol.c | 2 +- > security/device_cgroup.c | 2 +- > 6 files changed, 10 insertions(+), 9 deletions(-) > > diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h > index 90bba9e..627da35 100644 > --- a/include/linux/cgroup.h > +++ b/include/linux/cgroup.h > @@ -315,8 +315,9 @@ struct cftype { > * buffer of maximum length determined by max_write_len. > * Returns 0 or -ve error code. > */ > +#define CFTYPE_F_FLAGS (O_APPEND|O_NONBLOCK) > int (*write_string)(struct cgroup *cgrp, struct cftype *cft, > - const char *buffer); > + unsigned int f_flags, const char *buffer); I think maybe it's better to store struct file *file to struct cftype, so we don't need to change write_string(), write(), write_u64() and write_s64(). > /* > * trigger() callback can be used to get some kick from the > * userspace, when the actual string written is not important _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers