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 15:29:27 +0800 [thread overview]
Message-ID: <4AE7F2D7.8030609@cn.fujitsu.com> (raw)
In-Reply-To: <20091028072448.GM31446-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
>>>> 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().
>>> We can't do that - multiple open files could be using the same cftype
>>> at the same time. I'd be inclined if necessary to just pass the struct
>>> file* in, rather than risk needing to change it to pass more
>>> parameters later.
>> And I imagine that the number of handlers that actually make use of
>> the cftype* is rather small. If we pass the file* to the handler
>> instead of passing the cftype*, and provide an inline function to get
>> from the file* to the cftype*, then we can avoid adding an extra
>> parameter to the handlers.
>
> OK, I've done this for write_string(). I named the inline function
> cgroup_file_cftype(). It seems that, if we do this for one, then
> we should do it for all of the cgroup file io ops. Agreed?
>
I think so, to make interfaces consistent.
next prev parent reply other threads:[~2009-10-28 7:29 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
[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 [this message]
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=4AE7F2D7.8030609@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