From: Andy Grover <agrover@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Roland Dreier <roland@kernel.org>,
"Nicholas A. Bellinger" <nab@linux-iscsi.org>,
target-devel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 5/7] target: Check sess_tearing_down in target_get_sess_cmd()
Date: Tue, 17 Jul 2012 12:28:20 -0700 [thread overview]
Message-ID: <5005BCD4.7080006@redhat.com> (raw)
In-Reply-To: <20120717163909.GB15995@infradead.org>
On 07/17/2012 09:39 AM, Christoph Hellwig wrote:
> On Tue, Jul 17, 2012 at 09:34:49AM -0700, Roland Dreier wrote:
>> Sleeping on things, I now feel pretty strongly that having target_submit_cmd
>> return an error value for "immediate" errors where the command does not
>> make it into the target core is the right approach.
>
> I think it is. When I tried to convert other drivers to
> target_submit_cmd while doing the target processing thread removal that
> would have simplified a lot of things.
>
>> Freeing commands is already one of the most confusing and complex parts
>> of the target code, with "check_stop_free," "cmd_wait_comp" and
>> "SCF_ACK_KREF." Adding another code flow back to the fabric driver
>> with yet another set of semantics around freeing a command seems like
>> it's making things even harder to maintain.
>
> True. And the above mess really needs to be simplified, too.
I'm ok with submit_cmd returning a value for now. Maybe in the end it
doesn't, but getting the code working comes first.
This is one of those areas that needs a complete rewrite, so who cares
if there's some dirt on the floor when the whole joint is due for
remodeling.
-- Andy
next prev parent reply other threads:[~2012-07-17 19:28 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-16 18:04 [PATCH 0/7] series to fix qla2xxx use-after-free Roland Dreier
2012-07-16 18:04 ` [PATCH 1/7] qla2xxx: Get rid of redundant qla_tgt_sess.tearing_down Roland Dreier
2012-07-16 22:52 ` Nicholas A. Bellinger
2012-07-16 18:04 ` [PATCH 2/7] target: Un-export target_get_sess_cmd() Roland Dreier
2012-07-16 22:54 ` Nicholas A. Bellinger
2012-07-16 18:04 ` [PATCH 3/7] sbp-target: Consolidate duplicated error path code in sbp_handle_command() Roland Dreier
2012-07-16 22:55 ` Nicholas A. Bellinger
2012-07-16 18:04 ` [PATCH 4/7] target: Allow for target_submit_cmd() returning errors Roland Dreier
2012-07-16 23:00 ` Nicholas A. Bellinger
2012-07-16 23:05 ` Roland Dreier
2012-07-16 23:37 ` Nicholas A. Bellinger
2012-07-16 18:04 ` [PATCH 5/7] target: Check sess_tearing_down in target_get_sess_cmd() Roland Dreier
2012-07-16 23:08 ` Nicholas A. Bellinger
2012-07-16 23:21 ` Roland Dreier
2012-07-17 1:40 ` Roland Dreier
2012-07-17 1:56 ` Nicholas A. Bellinger
2012-07-17 1:59 ` Nicholas A. Bellinger
2012-07-17 16:34 ` Roland Dreier
2012-07-17 16:39 ` Christoph Hellwig
2012-07-17 19:28 ` Andy Grover [this message]
2012-07-17 23:24 ` Nicholas A. Bellinger
2012-07-16 18:04 ` [PATCH 6/7] qla2xxx: Remove racy, now-redundant check of sess_tearing_down Roland Dreier
2012-07-16 23:10 ` Nicholas A. Bellinger
2012-07-16 18:04 ` [PATCH 7/7] target: Remove se_session.sess_wait_list Roland Dreier
2012-07-16 23:15 ` 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=5005BCD4.7080006@redhat.com \
--to=agrover@redhat.com \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=roland@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 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.