public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Benny Halevy <bhalevy@panasas.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: linux-nfs@vger.kernel.org, pnfs@linux-nfs.org
Subject: Re: [PATCH RFC 03/10] nfsd41: sunrpc: move struct rpc_buffer def into a common header file
Date: Tue, 25 Aug 2009 11:43:52 +0300	[thread overview]
Message-ID: <4A93A448.3030405@panasas.com> (raw)
In-Reply-To: <20090824233526.GF8532@fieldses.org>

On Aug. 25, 2009, 2:35 +0300, "J. Bruce Fields" <bfields@fieldses.org> wrote:
> On Thu, Aug 20, 2009 at 03:34:28AM +0300, Benny Halevy wrote:
>> struct rpc_buffer is currently defined twice, the same way, in sched.c
>> and xprtsock.c.  Move its definition into a sunrpc.h, a common, internal
>> header file.
> 
> Not a huge deal, but: ideally this move would be done before the
> previous patch, which would use it.  (Under the general principal when
> we have the chance, we we anticipate problems rather than introduce them
> and then solve them in a later patch.)

Absolutely. Will do.

Benny

> 
> --b.
> 
>> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
>> ---
>>  net/sunrpc/sched.c    |    7 ++-----
>>  net/sunrpc/sunrpc.h   |    8 ++++++++
>>  net/sunrpc/xprtsock.c |    4 ----
>>  3 files changed, 10 insertions(+), 9 deletions(-)
>>
>> diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
>> index 8f459ab..cef74ba 100644
>> --- a/net/sunrpc/sched.c
>> +++ b/net/sunrpc/sched.c
>> @@ -21,6 +21,8 @@
>>  
>>  #include <linux/sunrpc/clnt.h>
>>  
>> +#include "sunrpc.h"
>> +
>>  #ifdef RPC_DEBUG
>>  #define RPCDBG_FACILITY		RPCDBG_SCHED
>>  #define RPC_TASK_MAGIC_ID	0xf00baa
>> @@ -711,11 +713,6 @@ static void rpc_async_schedule(struct work_struct *work)
>>  	__rpc_execute(container_of(work, struct rpc_task, u.tk_work));
>>  }
>>  
>> -struct rpc_buffer {
>> -	size_t	len;
>> -	char	data[];
>> -};
>> -
>>  /**
>>   * rpc_malloc - allocate an RPC buffer
>>   * @task: RPC task that will use this buffer
>> diff --git a/net/sunrpc/sunrpc.h b/net/sunrpc/sunrpc.h
>> index b1b2e64..7b68daf 100644
>> --- a/net/sunrpc/sunrpc.h
>> +++ b/net/sunrpc/sunrpc.h
>> @@ -27,6 +27,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>>  #ifndef _NET_SUNRPC_SUNRPC_H
>>  #define _NET_SUNRPC_SUNRPC_H
>>  
>> +/*
>> + * Header for dynamically allocated rpc buffers.
>> + */
>> +struct rpc_buffer {
>> +	size_t	len;
>> +	char	data[];
>> +};
>> +
>>  static inline int rpc_reply_expected(struct rpc_task *task)
>>  {
>>  	return (task->tk_msg.rpc_proc != NULL) &&
>> diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
>> index 6e6f939..4098a92 100644
>> --- a/net/sunrpc/xprtsock.c
>> +++ b/net/sunrpc/xprtsock.c
>> @@ -2158,10 +2158,6 @@ static void xs_tcp_print_stats(struct rpc_xprt *xprt, struct seq_file *seq)
>>  			xprt->stat.bklog_u);
>>  }
>>  
>> -struct rpc_buffer {
>> -	size_t	len;
>> -	char	data[];
>> -};
>>  /*
>>   * Allocate a bunch of pages for a scratch buffer for the rpc code. The reason
>>   * we allocate pages instead doing a kmalloc like rpc_malloc is because we want
>> -- 
>> 1.6.4
>>

  reply	other threads:[~2009-08-25  8:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4A8C9992.2000505@panasas.com>
2009-08-20  0:34 ` [PATCH RFC 01/10] nfsd41: sunrpc: svc_tcp_recv_record() Benny Halevy
2009-08-24 22:52   ` J. Bruce Fields
2009-08-20  0:34 ` [PATCH RFC 02/10] nfsd41: sunrpc: Added rpc server-side backchannel handling Benny Halevy
2009-08-24 23:34   ` J. Bruce Fields
2009-08-24 23:42     ` Trond Myklebust
     [not found]       ` <1251157347.6325.364.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2009-08-24 23:50         ` Batsakis, Alexandros
2009-08-24 23:51         ` J. Bruce Fields
2009-08-25  0:05     ` [PATCH RFC 02/10] nfsd41: sunrpc: Added rpc server-sidebackchannel handling Labiaga, Ricardo
2009-08-25  8:40     ` [PATCH RFC 02/10] nfsd41: sunrpc: Added rpc server-side backchannel handling Benny Halevy
2009-08-20  0:34 ` [PATCH RFC 03/10] nfsd41: sunrpc: move struct rpc_buffer def into a common header file Benny Halevy
2009-08-24 23:35   ` J. Bruce Fields
2009-08-25  8:43     ` Benny Halevy [this message]
2009-08-20  0:34 ` [PATCH RFC 04/10] nfsd41: Backchannel: callback infrastructure Benny Halevy
2009-08-20  0:34 ` [PATCH RFC 05/10] nfsd41: Backchannel: Add sequence arguments to callback RPC arguments Benny Halevy
2009-08-20  0:34 ` [PATCH RFC 06/10] nfsd41: Backchannel: Server backchannel RPC wait queue Benny Halevy
2009-08-20  0:34 ` [PATCH RFC 07/10] nfsd41: Backchannel: Setup sequence information Benny Halevy
2009-08-20  0:34 ` [PATCH RFC 08/10] nfsd41: Backchannel: cb_sequence callback Benny Halevy
2009-08-20  0:34 ` [PATCH RFC 09/10] nfsd41: Backchannel: Implement cb_recall over NFSv4.1 Benny Halevy
2009-08-20  0:34 ` [PATCH RFC 10/10] nfsd41: Refactor create_client() Benny Halevy

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=4A93A448.3030405@panasas.com \
    --to=bhalevy@panasas.com \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=pnfs@linux-nfs.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