Re: [PATCH v3 1/5] target: ensure se_cmd-t_prot_sg is allocated when required

2015-04-27 Thread Akinobu Mita
2015-04-26 18:44 GMT+09:00 Sagi Grimberg sa...@dev.mellanox.co.il: @@ -2181,6 +2182,12 @@ static inline void transport_reset_sgl_orig(struct se_cmd *cmd) static inline void transport_free_pages(struct se_cmd *cmd) { +if (!(cmd-se_cmd_flags SCF_PASSTHROUGH_PROT_SG_TO_MEM_NOALLOC)) {

Re: [PATCH v3 1/5] target: ensure se_cmd-t_prot_sg is allocated when required

2015-04-27 Thread Sagi Grimberg
On 4/27/2015 3:57 PM, Akinobu Mita wrote: 2015-04-26 18:44 GMT+09:00 Sagi Grimberg sa...@dev.mellanox.co.il: @@ -2181,6 +2182,12 @@ static inline void transport_reset_sgl_orig(struct se_cmd *cmd) static inline void transport_free_pages(struct se_cmd *cmd) { +if (!(cmd-se_cmd_flags

Re: [PATCH v3 1/5] target: ensure se_cmd-t_prot_sg is allocated when required

2015-04-26 Thread Sagi Grimberg
On 4/25/2015 5:33 PM, Akinobu Mita wrote: Even if the device backend is initialized with protection info is enabled, some requests don't have the protection info attached for WRITE SAME command issued by block device helpers, WRITE command with WRPROTECT=0 by SG_IO ioctl, etc. So when TCM

[PATCH v3 1/5] target: ensure se_cmd-t_prot_sg is allocated when required

2015-04-25 Thread Akinobu Mita
Even if the device backend is initialized with protection info is enabled, some requests don't have the protection info attached for WRITE SAME command issued by block device helpers, WRITE command with WRPROTECT=0 by SG_IO ioctl, etc. So when TCM loopback fabric module is used, se_cmd-t_prot_sg