From: Andy Grover <agrover@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: target-devel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 05/15] target: Eliminate usage of struct se_mem
Date: Tue, 28 Jun 2011 16:22:24 -0700 [thread overview]
Message-ID: <4E0A6230.9040809@redhat.com> (raw)
In-Reply-To: <20110628211228.GA7594@infradead.org>
On 06/28/2011 02:12 PM, Christoph Hellwig wrote:
> This code pretty much is exactly the same as allocation in
> iscsit_alloc_buffs. If we can't switch iscsi to use internal buffers
> directly we should at least export this helper so it can use it.
>
> That also means killing the superflous t_mem_sg/t_mem_sg_nents members
> in favour of t_data/t_data_nents.
Yeah I think iscsi can go back to relying on the core to allocate. I
know it's a little weird to change it to self-allocation and then back,
but what the move to self-allocation *really* was about was getting
se_mem out of iscsi. Now that core no longer has se_mem, and allocating
data buffs doesn't involve task switches, having core allocate data
buffs sounds good again.
>> + ret = transport_allocate_control_task(cmd);
>> + if (ret < 0)
>> + return ret;
>> + else
>> + return 1;
>
> What about making transport_allocate_control_task return the expected
> value directly?
Yeah you're right.
>> @@ -4863,19 +4395,13 @@ int transport_generic_new_cmd(struct se_cmd *cmd)
>> if (ret < 0)
>> return ret;
>>
>> - if (cmd->se_cmd_flags & SCF_SCSI_DATA_SG_IO_CDB) {
>> - list_for_each_entry(task, &cmd->t_task_list, t_list) {
>> - if (atomic_read(&task->task_sent))
>> - continue;
>> - if (!dev->transport->map_task_SG)
>> - continue;
>> -
>> - ret = dev->transport->map_task_SG(task);
>> - if (ret < 0)
>> - return ret;
>> - }
>> - } else {
>> - ret = transport_map_control_cmd_to_task(cmd);
>> + list_for_each_entry(task, &cmd->t_task_list, t_list) {
>> + if (atomic_read(&task->task_sent))
>> + continue;
>> + if (!dev->transport->map_task_SG)
>> + continue;
>> +
>> + ret = dev->transport->map_task_SG(task);
>
> transport_map_control_cmd_to_task might have called ->cdb_none
> before. While I'd love to kill that method I haven't seen any work
> towards actually making that happen. So for now I suspect you'll
> still need the conditionally call to ->cdb_none.
Whups, ok.
Regards -- Andy
next prev parent reply other threads:[~2011-06-28 23:22 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-28 19:29 [PATCH 0/15] Target updates for June 28 Andy Grover
2011-06-28 19:29 ` [PATCH 01/15] target: Remove ifdeffed code in t_g_process_write Andy Grover
2011-06-28 20:10 ` Christoph Hellwig
2011-06-28 20:50 ` Andy Grover
2011-06-28 19:29 ` [PATCH 02/15] target: Pass 2nd param of transport_split_cdb by value Andy Grover
2011-06-28 20:11 ` Christoph Hellwig
2011-06-28 19:29 ` [PATCH 03/15] target: Make all control CDBs scatter-gather Andy Grover
2011-06-28 20:22 ` Christoph Hellwig
2011-06-28 19:29 ` [PATCH 04/15] target: Disable rd_dr Andy Grover
2011-06-28 19:29 ` [PATCH 05/15] target: Eliminate usage of struct se_mem Andy Grover
2011-06-28 21:12 ` Christoph Hellwig
2011-06-28 23:22 ` Andy Grover [this message]
2011-06-28 19:29 ` [PATCH 06/15] target: Rename task_sg_num to task_sg_nents Andy Grover
2011-06-28 19:29 ` [PATCH 07/15] target: Remove custom debug macros for pr_debug. Use pr_err() Andy Grover
2011-06-28 19:29 ` [PATCH 08/15] target: Remove custom debug macros in non-iscsi fabrics Andy Grover
2011-06-28 19:29 ` [PATCH 09/15] target/iscsi: Remove iscsi_target_debug.h and usage of TRACE() & printk() Andy Grover
2011-06-28 19:29 ` [PATCH 10/15] target/iscsi: Remove SE_CMD macro Andy Grover
2011-06-28 19:29 ` [PATCH 11/15] target: WRITE_SAME_16 and WRITE_SAME_32 should be DATA_SG_IO cdbs Andy Grover
2011-06-28 20:14 ` Christoph Hellwig
2011-06-28 20:40 ` Andy Grover
2011-06-28 19:29 ` [PATCH 12/15] target: Set WSNZ=1 in block limits VPD. Abort if WRITE_SAME sectors = 0 Andy Grover
2011-06-28 19:29 ` [PATCH 13/15] target: Enforce 1 page max for control cdb buffer sizes Andy Grover
2011-06-28 20:15 ` Christoph Hellwig
2011-06-28 19:29 ` [PATCH 14/15] target: Remove direct ramdisk code Andy Grover
2011-06-28 21:15 ` Christoph Hellwig
2011-06-28 19:29 ` [PATCH 15/15] target: Remove transport do_se_mem_map callback Andy Grover
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=4E0A6230.9040809@redhat.com \
--to=agrover@redhat.com \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=target-devel@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