Linux NFS development
 help / color / mirror / Atom feed
From: Benny Halevy <bhalevy@panasas.com>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [RFC 15/27] pnfs-obj: pnfs_osd XDR definitions
Date: Fri, 22 Apr 2011 12:11:01 +0300	[thread overview]
Message-ID: <4DB14625.3060403@panasas.com> (raw)
In-Reply-To: <1303332561.23206.52.camel@lade.trondhjem.org>

On 2011-04-20 23:49, Trond Myklebust wrote:
> On Wed, 2011-04-20 at 20:28 +0300, Benny Halevy wrote:
>> * Add the pnfs_osd_xdr.h header
>>
>> * defintions the pnfs_osd_layout structure including all it's
>>   sub-types and constants.
>> * Declare the pnfs_osd_xdr_encode/decode_layout API + all needed
>>   inline helpers.
>>
>> * Define the pnfs_osd_deviceaddr structure and all its subtypes and
>>   constants.
>> * Declare API for encoding/decoding of a pnfs_osd_deviceaddr to/from
>>   XDR stream.
>>
>> * Define the pnfs_osd_ioerr structure, its substructures and constants.
>> * Declare API for encoding/decoding of a pnfs_osd_ioerr to/from
>>   XDR stream.
>>
>> * Define the pnfs_osd_layoutupdate structure and its substructures.
>> * Declare API for encoding/decoding of a pnfs_osd_layoutupdate to/from
>>   XDR stream.
>>
>> [Some extra debug-prints]
>> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
>> [objlayout driver skeleton]
>> [use __be32]
>> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
>> ---
>>  include/linux/pnfs_osd_xdr.h |  439 ++++++++++++++++++++++++++++++++++++++++++
>>  1 files changed, 439 insertions(+), 0 deletions(-)
>>  create mode 100644 include/linux/pnfs_osd_xdr.h
>>
>> diff --git a/include/linux/pnfs_osd_xdr.h b/include/linux/pnfs_osd_xdr.h
>> new file mode 100644
>> index 0000000..6f2cedf
>> --- /dev/null
>> +++ b/include/linux/pnfs_osd_xdr.h
>> @@ -0,0 +1,439 @@
>> +/*
>> + *  pnfs_osd_xdr.h
>> + *
>> + *  pNFS-osd on-the-wire data structures
>> + *
>> + *  Copyright (C) 2007-2009 Panasas Inc.
>> + *  All rights reserved.
>> + *
>> + *  Benny Halevy <bhalevy@panasas.com>
>> + *
>> + *  This program is free software; you can redistribute it and/or modify
>> + *  it under the terms of the GNU General Public License version 2
>> + *  See the file COPYING included with this distribution for more details.
>> + *
>> + *  Redistribution and use in source and binary forms, with or without
>> + *  modification, are permitted provided that the following conditions
>> + *  are met:
>> + *
>> + *  1. Redistributions of source code must retain the above copyright
>> + *     notice, this list of conditions and the following disclaimer.
>> + *  2. Redistributions in binary form must reproduce the above copyright
>> + *     notice, this list of conditions and the following disclaimer in the
>> + *     documentation and/or other materials provided with the distribution.
>> + *  3. Neither the name of the Panasas company nor the names of its
>> + *     contributors may be used to endorse or promote products derived
>> + *     from this software without specific prior written permission.
>> + *
>> + *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
>> + *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
>> + *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
>> + *  DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
>> + *  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
>> + *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
>> + *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
>> + *  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
>> + *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
>> + *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
>> + *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>> + */
>> +#ifndef __PNFS_OSD_XDR_H__
>> +#define __PNFS_OSD_XDR_H__
>> +
>> +#include <linux/nfs_fs.h>
>> +#include <linux/nfs_page.h>
>> +#include <linux/exp_xdr.h>
>> +#include <scsi/osd_protocol.h>
>> +
>> +#define PNFS_OSD_OSDNAME_MAXSIZE 256
>> +
>> +/*
>> + * START OF "GENERIC" DECODE ROUTINES.
>> + *   These may look a little ugly since they are imported from a "generic"
>> + * set of XDR encode/decode routines which are intended to be shared by
>> + * all of our NFSv4 implementations (OpenBSD, MacOS X...).
>> + *
>> + * If the pain of reading these is too great, it should be a straightforward
>> + * task to translate them into Linux-specific versions which are more
>> + * consistent with the style used in NFSv2/v3...
> 
> Please do... We just got rid of these in the NFS code. The last thing we
> want to do is reintroduce them in new code.
> 

Yeah, this is on our queue already
(as mentioned in [RFC 0/27] :)

Benny

  reply	other threads:[~2011-04-22  9:11 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-20 16:46 [RFC 0/27] pnfs-submit for 2.6.40 Benny Halevy
2011-04-20 17:26 ` [RFC 01/27] pnfs: CB_NOTIFY_DEVICEID Benny Halevy
2011-04-20 19:41   ` Trond Myklebust
2011-04-22  6:22     ` Benny Halevy
2011-04-20 17:26 ` [RFC 02/27] pnfs: direct i/o Benny Halevy
2011-04-20 17:26 ` [RFC 03/27] pnfs: layoutreturn Benny Halevy
2011-04-20 19:53   ` Trond Myklebust
2011-04-22  6:52     ` Benny Halevy
2011-04-22  8:04       ` [PATCH 1/6] SQUASHME: call pnfs_return_layout right before pnfs_destroy_layout Benny Halevy
2011-04-22  8:04       ` [PATCH 2/6] SQUASHME: remove assert_spin_locked from pnfs_clear_lseg_list Benny Halevy
2011-04-22  8:04       ` [PATCH 3/6] SQUASHME: remove wait parameter from the layoutreturn path Benny Halevy
2011-04-22  8:31         ` Benny Halevy
2011-04-22  8:05       ` [PATCH 4/6] SQUASHME: remove return_type field from nfs4_layoutreturn_args Benny Halevy
2011-04-22  8:05       ` [PATCH 5/6] SQUASHME: remove range " Benny Halevy
2011-04-22  8:05       ` [PATCH 6/6] SQUASHME: no need to send layoutcommit from _pnfs_return_layout Benny Halevy
2011-04-20 17:26 ` [RFC 04/27] pnfs: layoutret_on_setattr Benny Halevy
2011-04-20 20:03   ` Trond Myklebust
2011-04-22  8:23     ` Benny Halevy
2011-04-20 17:26 ` [RFC 05/27] pnfs: Use byte-range layout segments Benny Halevy
2011-04-20 17:26 ` [RFC 06/27] pnfs: encode_layoutreturn Benny Halevy
2011-04-20 20:16   ` Trond Myklebust
2011-04-22  8:26     ` Benny Halevy
2011-04-20 17:27 ` [RFC 07/27] pnfs: encode_layoutcommit Benny Halevy
2011-04-20 20:18   ` Trond Myklebust
2011-04-22  8:48     ` Benny Halevy
2011-04-20 17:27 ` [RFC 08/27] pnfs: {setup,cleanup}_layoutcommit Benny Halevy
2011-04-20 20:22   ` Trond Myklebust
2011-04-20 17:27 ` [RFC 09/27] pnfs: support for non-rpc layout drivers Benny Halevy
2011-04-20 20:34   ` Trond Myklebust
2011-04-22  9:03     ` Benny Halevy
2011-04-20 17:27 ` [RFC 10/27] pnfs: {,un}set_layoutdriver methods Benny Halevy
2011-04-20 17:27 ` [RFC 11/27] pnfs: per mount layout driver private data Benny Halevy
2011-04-20 20:36   ` Trond Myklebust
2011-04-22  9:05     ` Benny Halevy
2011-04-20 17:27 ` [RFC 12/27] pnfs: alloc and free layout_hdr layoutdriver methods Benny Halevy
2011-04-20 20:43   ` Trond Myklebust
2011-04-22  9:09     ` Benny Halevy
2011-04-20 17:27 ` [RFC 13/27] pnfs: client stats Benny Halevy
2011-04-20 17:28 ` [RFC 14/27] pnfsd: introduce exp_xdr.h Benny Halevy
2011-04-20 17:28 ` [RFC 15/27] pnfs-obj: pnfs_osd XDR definitions Benny Halevy
2011-04-20 20:49   ` Trond Myklebust
2011-04-22  9:11     ` Benny Halevy [this message]
2011-04-20 17:28 ` [RFC 16/27] pnfs-obj: pnfs_osd XDR client implementations Benny Halevy
2011-04-20 17:28 ` [RFC 17/27] exofs: pnfs-tree: Remove pnfs-osd private definitions Benny Halevy
2011-04-20 17:28 ` [RFC 18/27] pnfs-obj: Define PNFS_OBJLAYOUT Kconfig option Benny Halevy
2011-04-20 17:28 ` [RFC 19/27] pnfs-obj: objlayout driver skeleton Benny Halevy
2011-04-20 17:28 ` [RFC 20/27] pnfs-obj: objio_osd device information retrieval and caching Benny Halevy
2011-04-20 17:28 ` [RFC 21/27] pnfs-obj: objio_osd real IO implementation Benny Halevy
2011-04-20 17:29 ` [RFC 22/27] sunrpc: New xdr_rewind_stream() Benny Halevy
2011-04-20 17:29 ` [RFC 23/27] pnfs-obj: objlayout_encode_layoutreturn Implementation Benny Halevy
2011-04-20 17:29 ` [RFC 24/27] pnfs-obj: objio_osd report osd_errors for layoutreturn Benny Halevy
2011-04-20 17:29 ` [RFC 25/27] pnfs-obj: objlayout_encode_layoutcommit implementation Benny Halevy
2011-04-20 17:29 ` [RFC 26/27] pnfs-obj: objio_osd: RAID0 support Benny Halevy
2011-04-20 17:29 ` [RFC 27/27] pnfs-obj: objio_osd: groups support 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=4DB14625.3060403@panasas.com \
    --to=bhalevy@panasas.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=linux-nfs@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