From: "Gilad Broner" <gbroner@codeaurora.org>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Gilad Broner <gbroner@codeaurora.org>,
Jej B <james.bottomley@hansenpartnership.com>,
LKML <linux-kernel@vger.kernel.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
linux-arm-msm@vger.kernel.org, Santosh Y <santoshsy@gmail.com>,
linux-scsi-owner@vger.kernel.org,
Subhash Jadavani <subhashj@codeaurora.org>,
Yaniv Gardi <ygardi@codeaurora.org>,
Dolev Raviv <draviv@codeaurora.org>,
Sujit Reddy Thumma <sthumma@codeaurora.org>,
Vinayak Holikatti <vinholikatti@gmail.com>,
"James E.J. Bottomley" <jbottomley@parallels.com>,
Andrew Morton <akpm@linux-foundation.org>,
"David S. Miller" <davem@davemloft.net>,
Ingo Molnar <mingo@kernel.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Davidlohr Bueso <davidlohr@hp.com>,
Andi Kleen <ak@linux.intel.com>,
Alexei Starovoitov <ast@plumgrid.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>
Subject: Re: [PATCH v4 4/4] scsi: ufs: inject errors to verify error handling
Date: Tue, 10 Mar 2015 10:20:54 -0000 [thread overview]
Message-ID: <83c5d23982cd8eb481a6ff2848925331.squirrel@www.codeaurora.org> (raw)
In-Reply-To: <CAC5umyhjW7=oA_92SfPQu6gOzU9Qm-0EqgOGtGtVDwM9Kiz1OA@mail.gmail.com>
>> +static bool inject_cmd_hang_tr(struct ufs_hba *hba)
>> +{
>> + int tag;
>> +
>> + tag = find_first_bit(&hba->outstanding_reqs, hba->nutrs);
>> + if (tag == hba->nutrs)
>> + return 0;
>> +
>> + __clear_bit(tag, &hba->outstanding_reqs);
>> + hba->lrb[tag].cmd = NULL;
>> + __clear_bit(tag, &hba->lrb_in_use);
>
> hba->lrb_in_use is a bitmap set by test_and_set_bit_lock(). So
> this should be cleared by clear_bit_unlock().
You are correct. Thanks.
>
> And as soon as the bit corresponds to this slot in hba->lrb_in_use is
> cleared, this slot could be reused. But if the request corresponds
> to the slot is not completed yet, it could sacrifice the new request,
> too. So should we only inject into the commands which have been
> completed like this?
Please note that we only clear the bit in hba->lrb_in_use. scsi_done is
not called for this request. Therefore, the tag is not yet free in the
block layer and next calls for queuecommand will not pass down this tag to
be used in the UFS driver. So there is no danger of a new request being
sacrificed.
On a different note, we are debating internally on a few other changes so
until we consolidate those I will drop this patch with error injection.
Gilad.
--
Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2015-03-10 10:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-02 14:56 [PATCH v4 0/4] Add ioctl and debug utilities to UFS driver Gilad Broner
2015-03-02 14:56 ` [PATCH v4 1/4] scsi: ufs: add ioctl interface for query request Gilad Broner
2015-03-02 14:56 ` [PATCH v4 2/4] scsi: ufs: add debugfs for ufs Gilad Broner
2015-03-02 14:56 ` [PATCH v4 3/4] scsi: ufs: add trace events and dump prints for debug Gilad Broner
2015-03-02 14:56 ` [PATCH v4 4/4] scsi: ufs: inject errors to verify error handling Gilad Broner
2015-03-04 13:50 ` Akinobu Mita
2015-03-10 10:20 ` Gilad Broner [this message]
2015-03-10 13:09 ` Akinobu Mita
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=83c5d23982cd8eb481a6ff2848925331.squirrel@www.codeaurora.org \
--to=gbroner@codeaurora.org \
--cc=ak@linux.intel.com \
--cc=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=ast@plumgrid.com \
--cc=davem@davemloft.net \
--cc=davidlohr@hp.com \
--cc=draviv@codeaurora.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=james.bottomley@hansenpartnership.com \
--cc=jbottomley@parallels.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi-owner@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=santoshsy@gmail.com \
--cc=sthumma@codeaurora.org \
--cc=subhashj@codeaurora.org \
--cc=vinholikatti@gmail.com \
--cc=ygardi@codeaurora.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;
as well as URLs for NNTP newsgroup(s).