[RFC-v3 2/9] iscsi-target: Add iscsit_transport API template

2013-04-04 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Add basic struct iscsit_transport API template to allow iscsi-target for running with external transport modules using existing iscsi_target_core.h code. For all external modules, this calls try_module_get() and module_put() to obtain + release an external iscsit_transpo

[RFC-v3 5/9] iscsi-target: Add per transport iscsi_cmd alloc/free

2013-04-04 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts struct iscsi_cmd memory allocation + free to use ->iscsit_alloc_cmd() iscsit_transport API caller, and export iscsit_allocate_cmd() symbols Also add iscsi_cmd->release_cmd() to be used seperately from iscsit_transport for connection/session shutdown.

[RFC-v3 7/9] iscsi-target: Refactor TX queue logic + export response PDU creation

2013-04-04 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch refactors TX immediate + response queue handling to use the new iscsit_transport API callers, and exports the necessary traditional iscsi PDU response creation functions for iser-target to utilize. This includes: - Add iscsit_build_datain_pdu() for DATAIN PDU

[RFC-v3 8/9] iscsi-target: Add iser network portal attribute

2013-04-04 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds a new network portal attribute for iser, that lives under existing iscsi-target configfs layout at: /sys/kernel/config/target/iscsi/$TARGETNAME/$TPGT/np/$PORTAL/iser When lio_target_np_store_iser() is enabled, iscsit_tpg_add_network_portal() will atte

[RFC-v3 0/9] Add support for iSCSI Extensions for RDMA (ISER) target mode

2013-04-04 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This series is the third RFC for iSCSI Extensions for RDMA (ISER) target mode support planned for an future v3.10 merge. This series refactors existing traditional iscsi-target mode logic in order for external ib_isert.ko module code to function with areas common to trad

[RFC-v3 6/9] iscsi-target: Refactor RX PDU logic + export request PDU handling

2013-04-04 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch refactors existing traditional iscsi RX side PDU handling to use iscsit_transport, and exports the necessary logic for external transport modules. This includes: - Refactor iscsit_handle_scsi_cmd() into PDU setup / processing - Add updated iscsit_handle_scsi_

[RFC-v3 4/9] iscsi-target: Add iser-target parameter keys + setup during login

2013-04-04 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds RDMAExtensions, InitiatorRecvDataSegmentLength and TargetRecvDataSegmentLength parameters keys necessary for iser-target login to occur. This includes setting the necessary parameters during login path code within iscsi_login_zero_tsih_s2(), and currently

[RFC-v3 3/9] iscsi-target: Initial traditional TCP conversion to iscsit_transport

2013-04-04 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch performs the initial conversion of existing traditional iscsi to use iscsit_transport API callers. This includes: - iscsi-np cleanups for iscsit_transport_type - Add iscsi-np transport calls w/ ->iscsit_setup_up() and ->iscsit_free_np() - Convert login thread

[RFC-v3 1/9] target: Add export of target_get_sess_cmd symbol

2013-04-04 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Export target_get_sess_cmd() symbol so that it can be used by iscsi-target. Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_transport.c |4 ++-- include/target/target_core_fabric.h|2 +- 2 files changed, 3 insertions(+), 3 deletions(-) dif

RE: [PATCH] isci: add CONFIG_PM_SLEEP to suspend/resume functions

2013-04-04 Thread Dorau, Lukasz
On Tue, 26 Mar 2013 00:01:38 -0700 Jingoo Han wrote: > Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following > build warning when CONFIG_PM_SLEEP is not selected. This is because > sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when > the CONFIG_PM_SLEEP is enabled. >

Re: [RFC-v3 9/9] iser-target: Add iSCSI Extensions for RDMA (iSER) target driver

2013-04-04 Thread Or Gerlitz
On 04/04/2013 10:24, Nicholas A. Bellinger wrote: + +void isert_cq_tx_callback(struct ib_cq *, void *); +void isert_cq_rx_callback(struct ib_cq *, void *); +void isert_free_rx_descriptors(struct isert_conn *); any reason not to have these as static functions (same for isert_cq_rx_work) -- To uns

Re: [RFC-v3 9/9] iser-target: Add iSCSI Extensions for RDMA (iSER) target driver

2013-04-04 Thread Or Gerlitz
On 04/04/2013 10:24, Nicholas A. Bellinger wrote: +#define ISER_RECV_DATA_SEG_LEN 8192 +#define ISER_RX_PAYLOAD_SIZE(ISER_HEADERS_LEN + ISER_RECV_DATA_SEG_LEN) [...] +#define ISER_RX_PAD_SIZE (16384 - (ISER_RX_PAYLOAD_SIZE + \ + sizeof(u64) + size

Re: [RFC-v3 9/9] iser-target: Add iSCSI Extensions for RDMA (iSER) target driver

2013-04-04 Thread Or Gerlitz
On 04/04/2013 10:24, Nicholas A. Bellinger wrote: +static int +isert_put_response(struct iscsi_conn *conn, struct iscsi_cmd *cmd) +{ + struct isert_cmd *isert_cmd = container_of(cmd, + struct isert_cmd, iscsi_cmd); + struct isert_conn *isert_conn

Re: [PATCH 0/4] scsi: 64-bit LUN support

2013-04-04 Thread Hannes Reinecke
On 03/31/2013 07:44 PM, Tomas Henzl wrote: > On 03/30/2013 05:53 PM, Hannes Reinecke wrote: >> On 03/29/2013 05:32 PM, Tomas Henzl wrote: [ .. ] >>> >>> in scsi_report_lun_scan is max_lun compared with the result of >>> scsilun_to_int, >>> but in that value is also stored the address method. This

scanning for LUNs

2013-04-04 Thread K. Y. Srinivasan
Here is the code snippet for scanning LUNS (drivers/scsi/scsi_scan.c in function __scsi_scan_target()): /* * Scan LUN 0, if there is some response, scan further. Ideally, we * would not configure LUN 0 until all LUNs are scanned. */ res = scsi_probe_and

[dm-devel] [PATCH] [RESEND] scsi_dh_alua: Add module parameter to allow failover to non preferred path without STPG

2013-04-04 Thread Stewart, Sean
Resending with requested rewording of the parameter description. Currently ALUA device handler sends STPG command during failover and failback. Failover can be optimized by implicit failover (by not to sending STPG command), when 1 is passed as hwhandler parameter in multipath.conf. ex "2 alua 1"

Re: scanning for LUNs

2013-04-04 Thread James Bottomley
On Thu, 2013-04-04 at 08:12 -0700, K. Y. Srinivasan wrote: > Here is the code snippet for scanning LUNS (drivers/scsi/scsi_scan.c in > function > __scsi_scan_target()): > > /* > * Scan LUN 0, if there is some response, scan further. Ideally, we > * would not configure L

RE: scanning for LUNs

2013-04-04 Thread KY Srinivasan
> -Original Message- > From: James Bottomley [mailto:jbottom...@parallels.com] > Sent: Thursday, April 04, 2013 11:15 AM > To: KY Srinivasan > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; > de...@linuxdriverproject.org; oher...@suse.com; h...@infradead.org; linux- > s...@

Re: [PATCH 2/3] PCI: Handle device quirks when accessing sysfs resource entries

2013-04-04 Thread Bjorn Helgaas
On Thu, Mar 21, 2013 at 6:51 PM, Robert Hancock wrote: > On 03/20/2013 10:35 PM, Myron Stowe wrote: >> >> Sysfs includes entries to memory regions that back a PCI device's BARs. >> The pci-sysfs entries backing I/O Port BARs can be accessed by userspace, >> providing direct access to the device's

PING^3 Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542)

2013-04-04 Thread Paolo Bonzini
Il 22/03/2013 23:30, Paolo Bonzini ha scritto: > Il 20/02/2013 17:12, Paolo Bonzini ha scritto: >> Il 06/02/2013 16:15, Paolo Bonzini ha scritto: >>> This series regards the whitelist that is used for the SG_IO ioctl. This >>> whitelist has three problems: >>> >>> * the bitmap of allowed commands

Re: [PATCH 3/3] PCI, scsi, ahci: Unify usages of 0x1b4b vendor ID to use PCI_VENDOR_ID_MARVELL_EXT

2013-04-04 Thread Bjorn Helgaas
On Wed, Mar 20, 2013 at 10:35 PM, Myron Stowe wrote: > With the 0x1b4b vendor ID #define in place, convert hard-coded ID values. > Also, unify the previous SCSI specific use of this vendor ID to the new > macro. > > Signed-off-by: Myron Stowe > --- > > drivers/ata/ahci.c | 10 +--

Re: [RFC-v3 9/9] iser-target: Add iSCSI Extensions for RDMA (iSER) target driver

2013-04-04 Thread Nicholas A. Bellinger
On Thu, 2013-04-04 at 12:20 +0300, Or Gerlitz wrote: > On 04/04/2013 10:24, Nicholas A. Bellinger wrote: > > + > > +void isert_cq_tx_callback(struct ib_cq *, void *); > > +void isert_cq_rx_callback(struct ib_cq *, void *); > > +void isert_free_rx_descriptors(struct isert_conn *); > any reason not t

Re: [RFC-v3 9/9] iser-target: Add iSCSI Extensions for RDMA (iSER) target driver

2013-04-04 Thread Nicholas A. Bellinger
On Thu, 2013-04-04 at 12:45 +0300, Or Gerlitz wrote: > On 04/04/2013 10:24, Nicholas A. Bellinger wrote: > > > +#define ISER_RECV_DATA_SEG_LEN 8192 > > +#define ISER_RX_PAYLOAD_SIZE(ISER_HEADERS_LEN + ISER_RECV_DATA_SEG_LEN) > > [...] > > +#define ISER_RX_PAD_SIZE (16384 - (ISER_RX_PAYLOAD_

Re: [RFC-v3 9/9] iser-target: Add iSCSI Extensions for RDMA (iSER) target driver

2013-04-04 Thread Nicholas A. Bellinger
On Thu, 2013-04-04 at 12:51 +0300, Or Gerlitz wrote: > On 04/04/2013 10:24, Nicholas A. Bellinger wrote: > > +static int > > +isert_put_response(struct iscsi_conn *conn, struct iscsi_cmd *cmd) > > +{ > > + struct isert_cmd *isert_cmd = container_of(cmd, > > + str

Re: [dm-devel] [PATCH] scsi-dh-emc: fix activate vs set_params race

2013-04-04 Thread Mike Christie
On 04/02/2013 07:09 PM, Mikulas Patocka wrote: > Hi > > This fixes a possible race in scsi_dh_emc. It is untested because I don't > have the hardware. It could happen when we reload a multipath device and > path failure happens at the same time. I think this patch is ok. I do not have the hw t

Re: [dm-devel] [PATCH] scsi-dh-emc: fix activate vs set_params race

2013-04-04 Thread Laurence Oberman
I can test it. I have a clarion Cx3 Will get to it next week, traveling tomorrow Laurence Sent from my iPhone On Apr 4, 2013, at 7:11 PM, Mike Christie wrote: > On 04/02/2013 07:09 PM, Mikulas Patocka wrote: >> Hi >> >> This fixes a possible race in scsi_dh_emc. It is untested because I don't

[OT] LDD3 Query

2013-04-04 Thread Vijay Chauhan
Hi, I am new to Linux Device Driver and reading LDD3. It mentions that the disadvantage of dynamic major number allocation is that you can’t create the device nodes in advance, because the major number assigned to your module will vary. To solve this problem, it says that create a script to invo