Re: [PATCH-v2 11/15] loopback: Add fabric_prot_type attribute support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2015-03-30 at 11:07 +0300, Sagi Grimberg wrote:
> On 3/30/2015 6:28 AM, Nicholas A. Bellinger wrote:
> > From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
> >
> > This patch updates loopback to add a new fabric_prot_type TPG attribute,
> > used for controlling LLD level protection into LIO when the backend
> > device does not support T10-PI.
> >
> > Also, go ahead and set DIN_PASS + DOUT_PASS so target-core knows that
> > it will be doing any WRITE_STRIP and READ_INSERT operations.
> >
> > Cc: Martin Petersen <martin.petersen@xxxxxxxxxx>
> > Cc: Sagi Grimberg <sagig@xxxxxxxxxxxx>
> > Cc: Hannes Reinecke <hare@xxxxxxx>
> > Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
> > ---
> >   drivers/target/loopback/tcm_loop.c | 54 ++++++++++++++++++++++++++++++++++++--
> >   drivers/target/loopback/tcm_loop.h |  1 +
> >   2 files changed, 53 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c
> > index f4618e7..797c731 100644
> > --- a/drivers/target/loopback/tcm_loop.c
> > +++ b/drivers/target/loopback/tcm_loop.c
> > @@ -697,6 +697,13 @@ static int tcm_loop_check_prod_mode_write_protect(struct se_portal_group *se_tpg
> >   	return 0;
> >   }
> >
> > +static int tcm_loop_check_prot_fabric_only(struct se_portal_group *se_tpg)
> > +{
> > +	struct tcm_loop_tpg *tl_tpg = container_of(se_tpg, struct tcm_loop_tpg,
> > +						   tl_se_tpg);
> > +	return tl_tpg->tl_fabric_prot_type;
> > +}
> > +
> 
> So now loopback devices can finally protect transfers with
> read_verify=0, write_generate=0?
> 

(Adding Jerome CC')

Yes.

However, a non zero tl_fabric_prot_type TPG attribute value needs to be
set before I_T nexus creation occurs in order for the loopback session
to report se_sess->sess_prot_type in SBC/SPC control bit emulation code.

Also, rtslib needs to be updated to optionally set prot_fabric_only=1
before nexus creation occurs to enable this code.

--nab

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux