From: Andy Grover <agrover@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: "Nicholas A. Bellinger" <nab@linux-iscsi.org>,
target-devel <target-devel@vger.kernel.org>,
linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 1/7] iscsi-target: Fix iscsit_alloc_buffs() breakage with offset_in_page
Date: Tue, 07 Jun 2011 14:43:05 -0700 [thread overview]
Message-ID: <4DEE9B69.5080301@redhat.com> (raw)
In-Reply-To: <20110604142138.GB13579@lst.de>
On 06/04/2011 07:21 AM, Christoph Hellwig wrote:
> On Fri, Jun 03, 2011 at 06:18:12PM -0700, Nicholas A. Bellinger wrote:
>> From: Nicholas Bellinger <nab@linux-iscsi.org>
>>
>> This patch changes iscsit_alloc_buffs() w/ SCF_SCSI_CONTROL_NONSG_IO_CDB
>> to take into account the offset_in_page(), and also handles the case
>> where length and PAGE_SIZE are identical, and require nents to be incremented.
>>
>> It also moves iscsit_allocate_iovecs() for the SCSI payload case until
>> after transport_generic_map_mem_to_cmd() has been called because the
>> iovec allocation depends upon cmd->se_cmd.t_tasks_se_num having been
>> set by the return of transport_map_sg_to_mem() done in RX thread context.
>
> I'd rather just remove the SCF_SCSI_CONTROL_NONSG_IO_CDB side of the
> code path, and always allocate one page per S/G list item. That simplifies
> the code, and fixes the issues with non-aligned kmallocs.
I thought about doing that but didn't quite have the guts.
It *would* simplify things a lot, though. Offsets of offsets are no fun.
+1 from me. Express everything in pages and scatterlists.
-- Andy
next prev parent reply other threads:[~2011-06-07 21:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-04 1:18 [PATCH 0/7] iscsi-target: Bugfixes for t_mem_list -> t_mem_sg[] conversion Nicholas A. Bellinger
2011-06-04 1:18 ` [PATCH 1/7] iscsi-target: Fix iscsit_alloc_buffs() breakage with offset_in_page Nicholas A. Bellinger
2011-06-04 14:21 ` Christoph Hellwig
2011-06-07 21:43 ` Andy Grover [this message]
2011-06-04 1:18 ` [PATCH 2/7] iscsi-target: Fix padding breakage in iscsit_send_data_in Nicholas A. Bellinger
2011-06-04 1:18 ` [PATCH 3/7] iscsi-target: Clear map_sg usage for non ISTATE_SEND_DATAIN ops Nicholas A. Bellinger
2011-06-04 1:18 ` [PATCH 4/7] iscsi-target: Handle transport_generic_new_cmd failure Nicholas A. Bellinger
2011-06-04 14:00 ` Christoph Hellwig
2011-06-04 1:18 ` [PATCH 5/7] iscsi-target: Fix iscsit_map_iovec cur_len + data_offset breakage Nicholas A. Bellinger
2011-06-04 1:18 ` [PATCH 6/7] iscsi-target: Fix iscsit_fe_sendpage_sg breakage Nicholas A. Bellinger
2011-06-04 1:18 ` [PATCH 7/7] iscsi-target: Fix iscsit_do_crypto_hash_sg() bug Nicholas A. Bellinger
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=4DEE9B69.5080301@redhat.com \
--to=agrover@redhat.com \
--cc=hch@lst.de \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.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