public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Linux Containers <containers@lists.osdl.org>
Subject: Re: [PATCH 1/2] mqueue ns: move mqueue_mnt into struct ipc_namespace
Date: Wed, 17 Dec 2008 12:52:41 -0600	[thread overview]
Message-ID: <20081217185241.GA25250@us.ibm.com> (raw)
In-Reply-To: <1229538964.17206.421.camel@nimitz>

Quoting Dave Hansen (dave@linux.vnet.ibm.com):
> On Wed, 2008-12-17 at 11:55 -0600, Serge E. Hallyn wrote:

Thanks for taking look.

...
> > -#if defined(CONFIG_SYSVIPC) && defined(CONFIG_IPC_NS)
> > +#ifdef CONFIG_POSIX_MQUEUE
> > +extern void mq_init_ns(struct ipc_namespace *ns);
> > +/* default values */
> > +#define DFLT_QUEUESMAX 256     /* max number of message queues */
> > +#define DFLT_MSGMAX    10      /* max number of messages in each queue */
> > +#define HARD_MSGMAX    (131072/sizeof(void *))
> > +#define DFLT_MSGSIZEMAX 8192   /* max message size */
> > +#else
> > +#define mq_init_ns(ns)
> > +#endif
> 
> Do all these empty suckers need do{}while(0)'s?

Couldn't hurt for future-proofing.  Will do, thanks.

> > @@ -109,11 +98,25 @@ static inline struct mqueue_inode_info *MQUEUE_I(struct inode *inode)
> >  	return container_of(inode, struct mqueue_inode_info, vfs_inode);
> >  }
> > 
> > +void mq_init_ns(struct ipc_namespace *ns) {
> > +	ns->mq_queues_count  = 0;
> > +	ns->mq_queues_max    = DFLT_QUEUESMAX;
> > +	ns->mq_msg_max       = DFLT_MSGMAX;
> > +	ns->mq_msgsize_max   = DFLT_MSGSIZEMAX;
> > +	ns->mq_mnt           = mntget(init_ipc_ns.mq_mnt);
> > +}
> 
> Heh, I read that as a structure definition at first!  Could you put that
> bracket on a new line.

That's actually taken care of in the followup patch - same with
mq_exit_ns.  Sorry about that.  (Still I'd rather not bother with
the patch flux to change it just in this patch, since whenever
I do that I inevitably mess up something else)

> This part of the patch is nice.  The -'s are next to the +'s and it is
> easy to audit.
> 
> The rest of the patch looks good.  Mostly simple substitutions, and it
> is pretty obvious what is going on.

Thanks.  I'm hoping that Pavel and Eric will give their input and
maybe we can put this thing to bed  :)

-serge

  reply	other threads:[~2008-12-17 18:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-17 17:55 [RFC patch 0/2] posix mqueue namespace (v12) Serge E. Hallyn
2008-12-17 17:55 ` [PATCH 1/2] mqueue ns: move mqueue_mnt into struct ipc_namespace Serge E. Hallyn
2008-12-17 18:36   ` Dave Hansen
2008-12-17 18:52     ` Serge E. Hallyn [this message]
2008-12-17 18:55       ` Dave Hansen
2008-12-17 17:55 ` [PATCH 2/2] ipc namespaces: implement support for posix msqueues Serge E. Hallyn
2008-12-17 18:54   ` Dave Hansen
2008-12-17 19:08     ` Serge E. Hallyn
2008-12-17 21:25   ` Sukadev Bhattiprolu
2008-12-18 21:36     ` Serge E. Hallyn
2008-12-17 17:57 ` [LTP PATCH 1/4] posix message queue namespaces: first test Serge E. Hallyn
2008-12-17 17:57 ` [LTP PATCH 2/4] posix mqns: test parent to child mq access Serge E. Hallyn
2008-12-17 17:58 ` [LTP PATCH 3/4] posix mqns: test vfs and mq interaction Serge E. Hallyn
2008-12-17 17:58 ` [LTP PATCH 4/4] posix mqns: test that user mount of posixmq survivies the ipcns Serge E. Hallyn

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=20081217185241.GA25250@us.ibm.com \
    --to=serue@us.ibm.com \
    --cc=containers@lists.osdl.org \
    --cc=dave@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.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