From: Andy Grover <agrover@redhat.com>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: linux-iscsi-target-dev@googlegroups.com,
target-devel <target-devel@vger.kernel.org>,
Christoph Hellwig <hch@lst.de>,
linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 10/42] target: Rewrite transport_init_task_sg()
Date: Tue, 31 May 2011 14:04:52 -0700 [thread overview]
Message-ID: <4DE557F4.3080700@redhat.com> (raw)
In-Reply-To: <1306825729.8193.77.camel@haakon2.linux-iscsi.org>
On 05/31/2011 12:08 AM, Nicholas A. Bellinger wrote:
> On Fri, 2011-05-27 at 12:06 -0700, Andy Grover wrote:
>> Don't set task->task_sg_num until task_sg is successfully alloced, to
>> prevent it from possibly being out of sync.
>>
>> Simplify loop counting sgs needed. Handle possible (?) case of offset
>> greater than se_mem->se_len. Remove some cluttering debugprints. Reduce
>> local variable usage.
>>
>> Do not set termination bit in padded-1 entry in the padded_sg case. If
>> something barfs on an extra zeroed sg, (will happen if chain-capable sgs
>> don't actually get chained) then it's broken.
>>
>> Remove unneeded parens.
>>
>> Signed-off-by: Andy Grover <agrover@redhat.com>
>> ---
>
> So I am not exactly sure there is an issue here with task->task_sg_num
> assignment in the failure case, as nothing depends AFAICT upon
> task->task_sg_num in the release path before an possible
> transport_init_task_sg() failure..
Yeah I was just being paranoid..
> However, my main concern is the removal of sg_mark_end() calls to
> signify the end of task->task_sg[] memory for individual task I/O
> dispatch. As you have noticed this looks OK with existing code wrt to
> backend *_map_task_sg() and *_do_task() using for_each_sg() w/
> task->task_sg_num, but am wondering if it really makes sense to remove
> this for the actual scatterlist dispatch for all backends..? Is there
> any possible code below TCM backend drivers where HW drivers can pose an
> issue..?
>
> I am happy to merge this for tcm v4.1 along with patch #11 if this is
> really safe to do, but will defer for the moment until we can get a few
> more ACKs on these two..
Every sg[] that is initialized by sg_init_table (or sg_init_one) should
have sg_mark_end called on its last element[1] so I think we're ok, or
am I misunderstanding the issue you're getting at?
Regards -- Andy
[1] http://lxr.linux.no/linux+v2.6.38/lib/scatterlist.c#L85
next prev parent reply other threads:[~2011-05-31 21:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1306523240-15543-1-git-send-email-agrover@redhat.com>
2011-05-27 22:15 ` [PATCH 0/42 RESEND+NEW] Target updates for May 27 Nicholas A. Bellinger
2011-05-27 22:35 ` Christoph Hellwig
2011-05-27 23:39 ` Nicholas A. Bellinger
2011-05-28 7:43 ` Christoph Hellwig
2011-05-28 19:09 ` Nicholas A. Bellinger
2011-05-29 2:23 ` Andy Grover
2011-05-30 12:56 ` Christoph Hellwig
[not found] ` <1306523240-15543-11-git-send-email-agrover@redhat.com>
2011-05-31 7:08 ` [PATCH 10/42] target: Rewrite transport_init_task_sg() Nicholas A. Bellinger
2011-05-31 21:04 ` Andy Grover [this message]
2011-05-31 21:08 ` Christoph Hellwig
2011-06-01 0:33 ` Nicholas A. Bellinger
[not found] ` <1306523240-15543-38-git-send-email-agrover@redhat.com>
2011-05-31 9:00 ` [PATCH 37/42] target/iscsi: Do not use t_mem_list anymore Nicholas A. Bellinger
[not found] ` <1306523240-15543-40-git-send-email-agrover@redhat.com>
2011-05-31 9:32 ` [PATCH 39/42] target: Call transport_new_cmd instead of adding to cmd queue Nicholas A. Bellinger
2011-05-31 9:48 ` Christoph Hellwig
2011-05-31 10:10 ` Nicholas A. Bellinger
2011-05-31 10:22 ` Christoph Hellwig
2011-05-31 11:22 ` Nicholas A. Bellinger
2011-05-31 10:17 ` Christoph Hellwig
2011-05-31 11:18 ` Nicholas A. Bellinger
2011-06-01 4:09 ` Christoph Hellwig
2011-06-04 2:33 ` Nicholas A. Bellinger
2011-06-04 14:18 ` Christoph Hellwig
[not found] ` <1306523240-15543-42-git-send-email-agrover@redhat.com>
2011-05-31 9:58 ` [PATCH 41/42] target/iscsi: remove unsolicited_data_comp completion Nicholas A. Bellinger
[not found] ` <1306523240-15543-43-git-send-email-agrover@redhat.com>
2011-05-31 10:59 ` [PATCH 42/42] target/file: Alloc iov[] off the stack 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=4DE557F4.3080700@redhat.com \
--to=agrover@redhat.com \
--cc=hch@lst.de \
--cc=linux-iscsi-target-dev@googlegroups.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.