Linux Container Development
 help / color / mirror / Atom feed
From: Li Zefan <lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
To: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	Nathan Lynch <ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>,
	Paul Menage <menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Balbir Singh
	<balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
	Pavel Emelyanov <xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH 1/2] [RFC] Add file f_flags to cgroup write_string ops
Date: Wed, 28 Oct 2009 09:04:10 +0800	[thread overview]
Message-ID: <4AE7988A.6080601@cn.fujitsu.com> (raw)
In-Reply-To: <1256570129-13107-1-git-send-email-matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

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-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> Cc: Nathan Lynch <ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
> Cc: Paul Menage <menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
> Cc: Li Zefan <lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
> 
> (Cc'ing mem controller maintainers in case they find this useful..)
> Cc: Balbir Singh <balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
> Cc: Pavel Emelyanov <xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
> ---
>  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

  parent reply	other threads:[~2009-10-28  1:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-26 15:15 [PATCH 1/2] [RFC] Add file f_flags to cgroup write_string ops Matt Helsley
     [not found] ` <1256570129-13107-1-git-send-email-matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-27  0:03   ` KAMEZAWA Hiroyuki
     [not found]     ` <20091027090311.e7b18307.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2009-10-27  3:40       ` Balbir Singh
2009-10-28  1:04   ` Li Zefan [this message]
     [not found]     ` <4AE7988A.6080601-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-10-28  6:04       ` Paul Menage
     [not found]         ` <6599ad830910272304j495c99a2t4265d501765937b5-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-10-28  6:06           ` Paul Menage
     [not found]             ` <6599ad830910272306t66994e12iec6d293f74fc4dc7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-10-28  7:20               ` Balbir Singh
     [not found]                 ` <20091028072014.GM16378-SINUvgVNF2CyUtPGxGje5AC/G2K4zDHf@public.gmane.org>
2009-10-28 10:09                   ` Matt Helsley
2009-10-28  7:24               ` Matt Helsley
     [not found]                 ` <20091028072448.GM31446-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2009-10-28  7:29                   ` Li Zefan
2009-10-28  8:14                   ` Paul Menage

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AE7988A.6080601@cn.fujitsu.com \
    --to=lizf-bthxqxjhjhxqfuhtdcdx3a@public.gmane.org \
    --cc=balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
    --cc=menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org \
    --cc=xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox