From: Andrew Morton <akpm@linux-foundation.org>
To: Boaz Harrosh <bharrosh@panasas.com>
Cc: James.Bottomley@HansenPartnership.com, michaelc@cs.wisc.edu,
fujita.tomonori@lab.ntt.co.jp, jeff@garzik.org,
osd-dev@open-osd.org, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, Sami.Iren@seagate.com, pw@padd.com
Subject: Re: [PATCH 03/18] libosd: OSDv1 Headers
Date: Tue, 4 Nov 2008 11:10:37 -0800 [thread overview]
Message-ID: <20081104111037.bcae04e5.akpm@linux-foundation.org> (raw)
In-Reply-To: <1225817046-5946-1-git-send-email-bharrosh@panasas.com>
On Tue, 4 Nov 2008 18:44:06 +0200
Boaz Harrosh <bharrosh@panasas.com> wrote:
> Headers only patch.
>
> osd_protocol.h
> Contains a C-fied definition of the T10 OSD standard
> osd_types.h
> Contains CPU order common used types
> osd_initiator.h
> API definition of the osd_initiator library
> osd_sec.h
> Contains High level API for the security manager.
>
> [Note that checkpatch spews errors on things that are valid in this context
> and will not be fixed]
>
> --- /dev/null
> +++ b/include/scsi/osd_initiator.h
This header uses quite a few things without including the header files
which define them. That's a bit risky - it causes compile breakage
across architectures, across config changes and across time.
> @@ -0,0 +1,332 @@
> +/*
> + * osd_initiator.h - OSD initiator API definition
> + *
> + * Copyright (C) 2008 Panasas Inc. All rights reserved.
> + *
> + * Authors:
> + * Boaz Harrosh <bharrosh@panasas.com>
> + * 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
> + *
> + */
> +#ifndef __OSD_INITIATOR_H__
> +#define __OSD_INITIATOR_H__
> +
> +#include <linux/blkdev.h>
> +
> +#include "osd_protocol.h"
> +#include "osd_types.h"
> +
> +/* Note: "NI" in comments below means "Not Implemented yet" */
> +
> +/*
> + * Object-based Storage Device.
> + * This object represents an OSD device.
> + * It is not a full linux device in any way. It is only
> + * a place to hang resources associated with a Linux
> + * request Q and some default properties.
> + */
> +struct osd_dev {
> + struct scsi_device *scsi_dev;
scsi_device
> + unsigned def_timeout;
> +};
> +
> +void osd_dev_init(struct osd_dev *, struct scsi_device *scsi_dev);
> +void osd_dev_fini(struct osd_dev *);
> +
> +struct osd_request;
> +typedef void (osd_req_done_fn)(struct osd_request *, void *);
> +
> +struct osd_request {
> + struct osd_cdb cdb;
> + struct osd_data_out_integrity_info out_data_integ;
> + struct osd_data_in_integrity_info in_data_integ;
> +
> + struct osd_dev *osd_dev;
> + struct request *request;
> +
> + struct _osd_req_data_segment {
> + void *buff;
> + unsigned alloc_size; /* 0 here means not allocated by us */
> + unsigned total_bytes;
> + } set_attr, enc_get_attr, get_attr;
> +
> + struct _osd_io_info {
> + struct bio *bio;
> + u64 total_bytes;
u64(!)
> + struct request *req;
> + struct _osd_req_data_segment *last_seg;
> + u8 *pad_buff;
> + } out, in;
> +
> + gfp_t alloc_flags;
gfp_t
> + unsigned timeout;
> + unsigned retries;
> + u8 sense[OSD_MAX_SENSE_LEN];
> + enum osd_attributes_mode attributes_mode;
> +
> + osd_req_done_fn *async_done;
> + void *async_private;
> + int async_error;
> +};
etc, etc, etc. Please review all that.
> +struct osd_request *osd_start_request(struct osd_dev *, gfp_t gfp);
> +int osd_finalize_request(struct osd_request *or,
> + u8 options, const void *cap, const u8 *cap_key);
> +void osd_req_set_master_seed_xchg(struct osd_request *, ...);/* NI */
> +void osd_req_set_master_key(struct osd_request *, ...);/* NI */
> +void osd_req_format(struct osd_request *, u64 tot_capacity);
> +int osd_req_list_dev_partitions(struct osd_request *,
> + osd_id initial_id, struct osd_obj_id_list *list, unsigned nelem);
hm. It appears that someone made the decision to omit the name from
the `struct osd_request *' parameter in the prototypes and to include
the argument names for all other arguments.
Not a bad idea, really.
next prev parent reply other threads:[~2008-11-04 19:12 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <48876009.8010701@panasas.com>
2008-11-04 16:09 ` [PATCHSET 00/18] open-osd: OSD Initiator library for Linux Boaz Harrosh
2008-11-04 16:17 ` [PATCH 01/18] major.h: char-major number for OSD device driver Boaz Harrosh
2008-11-26 17:33 ` [osd-dev] " Boaz Harrosh
2008-11-26 18:07 ` Randy Dunlap
2008-11-04 16:42 ` [PATCH 02/18] scsi: OSD_TYPE Boaz Harrosh
2008-11-04 16:44 ` [PATCH 03/18] libosd: OSDv1 Headers Boaz Harrosh
2008-11-04 19:10 ` Andrew Morton [this message]
2008-11-04 19:42 ` Jörn Engel
2008-11-04 20:29 ` Jörn Engel
2008-11-05 13:00 ` Boaz Harrosh
2008-11-05 12:54 ` Boaz Harrosh
2008-11-05 13:09 ` James Bottomley
2008-11-05 13:29 ` Boaz Harrosh
2008-11-09 14:52 ` [PATCH 03/18 ver2] " Boaz Harrosh
2008-11-09 17:45 ` Jörn Engel
2008-11-10 8:47 ` Boaz Harrosh
2008-11-10 15:17 ` Jörn Engel
2008-11-10 17:29 ` Randy Dunlap
2008-11-12 13:10 ` Boaz Harrosh
2008-11-12 16:48 ` Randy Dunlap
2008-11-12 17:09 ` Boaz Harrosh
2008-11-12 17:15 ` Johannes Berg
2008-11-12 13:13 ` [PATCH 03/18 ver3] " Boaz Harrosh
2008-11-12 18:59 ` Randy Dunlap
2008-11-13 9:38 ` Boaz Harrosh
2008-11-13 12:25 ` [PATCH 03/18 ver4] " Boaz Harrosh
2008-11-13 18:16 ` Randy Dunlap
2008-11-13 15:41 ` [osd-dev] " Benny Halevy
2008-11-04 16:44 ` [PATCH 04/18] libosd: OSDv1 preliminary implementation Boaz Harrosh
2008-11-04 18:03 ` Sam Ravnborg
2008-11-05 13:12 ` Boaz Harrosh
2008-11-09 14:55 ` [osd-dev] " Boaz Harrosh
2008-11-10 5:37 ` Randy Dunlap
2008-11-10 9:00 ` Boaz Harrosh
2008-11-05 16:39 ` [Patch] Always include <linux/types.h> Jörn Engel
2008-11-05 17:23 ` Alexey Dobriyan
2008-11-05 19:16 ` Jörn Engel
2008-11-05 19:48 ` Andreas Schwab
2008-11-05 20:02 ` Jörn Engel
2008-11-05 20:32 ` Alexey Dobriyan
2008-11-07 8:02 ` Jörn Engel
2008-11-05 20:20 ` Alexey Dobriyan
2008-11-05 17:48 ` Boaz Harrosh
2008-11-04 19:16 ` [PATCH 04/18] libosd: OSDv1 preliminary implementation Andrew Morton
2008-11-05 13:44 ` Boaz Harrosh
2008-11-09 14:50 ` [PATCH 04/18 ver2] " Boaz Harrosh
2008-11-04 16:44 ` [PATCH 05/18] osd_uld: OSD scsi ULD Boaz Harrosh
2008-11-04 16:44 ` [PATCH 06/18] osd_uld: API for retrieving osd devices from Kernel Boaz Harrosh
2008-11-04 16:44 ` [PATCH 07/18] osd_test: User-mode application to run the OSD tests Boaz Harrosh
2008-11-04 16:44 ` [PATCH 08/18] osd_ktests: Add basic " Boaz Harrosh
2008-11-04 16:44 ` [PATCH 09/18] libosd: attributes Support Boaz Harrosh
2008-11-04 16:44 ` [PATCH 10/18] osd_ktests: Test Attribute lists Boaz Harrosh
2008-11-04 16:44 ` [PATCH 11/18] libosd: OSD Security processing stubs Boaz Harrosh
2008-11-04 16:44 ` [PATCH 12/18] libosd: Add Flush and List-objects support Boaz Harrosh
2008-11-04 16:44 ` [PATCH 13/18] libosd: Not implemented commands Boaz Harrosh
2008-11-04 16:44 ` [PATCH 14/18] libosd: OSD version 2 Support Boaz Harrosh
2008-11-04 16:44 ` [PATCH 15/18] libosd: OSDv2 auto detection Boaz Harrosh
2008-11-04 16:44 ` [PATCH 16/18] osd: Documentation for OSD library Boaz Harrosh
2008-11-04 16:44 ` [PATCH 17/18] osd: Kconfig file for in-tree builds Boaz Harrosh
2008-11-04 16:44 ` [PATCH 18/18] scsi: Add osd library to build system Boaz Harrosh
2008-11-04 19:19 ` [PATCHSET 00/18] open-osd: OSD Initiator library for Linux Andrew Morton
2008-11-05 13:56 ` Boaz Harrosh
2008-11-09 14:58 ` Boaz Harrosh
2008-11-09 23:26 ` Stephen Rothwell
2008-11-10 12:52 ` Boaz Harrosh
2008-11-10 13:04 ` Stephen Rothwell
2008-12-22 12:32 ` Boaz Harrosh
2008-12-22 12:37 ` [PATCH 01/18] major.h: char-major number for OSD device driver Boaz Harrosh
2008-12-22 12:39 ` [PATCH 02/18] scsi: OSD_TYPE Boaz Harrosh
2008-12-22 12:41 ` [PATCH 03/18] libosd: OSDv1 Headers Boaz Harrosh
2008-12-22 12:43 ` [PATCH 04/18] libosd: OSDv1 preliminary implementation Boaz Harrosh
2008-12-22 12:46 ` [PATCH 05/18] osd_uld: OSD scsi ULD Boaz Harrosh
2008-12-22 12:49 ` [PATCH 06/18] osd_uld: API for retrieving osd devices from Kernel Boaz Harrosh
2008-12-22 12:51 ` [PATCH 07/18] osd_ktests: Add basic OSD tests Boaz Harrosh
2008-12-22 12:55 ` [PATCH 08/18] libosd: attributes Support Boaz Harrosh
2008-12-22 12:57 ` [PATCH 09/18] osd_ktests: Test Attribute lists Boaz Harrosh
2008-12-22 13:00 ` [PATCH 10/18] libosd: OSD Security processing stubs Boaz Harrosh
2008-12-22 13:02 ` [PATCH 11/18] libosd: Add Flush and List-objects support Boaz Harrosh
2008-12-22 13:04 ` [PATCH 12/18] libosd: Not implemented commands Boaz Harrosh
2008-12-22 13:07 ` [PATCH 13/18] libosd: OSD version 2 Support Boaz Harrosh
2008-12-22 13:09 ` [PATCH 14/18] libosd: OSDv2 auto detection Boaz Harrosh
2008-12-22 13:13 ` [PATCH 15/18] libosd: SCSI/OSD Sense decoding support Boaz Harrosh
2008-12-22 13:16 ` [PATCH 16/18] osd: Documentation for OSD library Boaz Harrosh
2008-12-22 13:18 ` [PATCH 17/18] osd: Kconfig file for in-tree builds Boaz Harrosh
2008-12-22 13:20 ` [PATCH 18/18] scsi: Add osd library to build system Boaz Harrosh
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=20081104111037.bcae04e5.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=Sami.Iren@seagate.com \
--cc=bharrosh@panasas.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=osd-dev@open-osd.org \
--cc=pw@padd.com \
/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