From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: Ming Lei <ming.lei@redhat.com>, James Bottomley <jejb@linux.ibm.com>
Cc: John Garry <john.garry@huawei.com>,
Andrea Righi <andrea.righi@canonical.com>,
Martin Wilck <martin.wilck@suse.com>,
Bart Van Assche <bvanassche@acm.org>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: filesystem corruption with "scsi: core: Reallocate device's budget map on queue depth change"
Date: Thu, 31 Mar 2022 07:30:35 +0900 [thread overview]
Message-ID: <ba090f1b-a767-46a1-5728-82d9c587ef3c@opensource.wdc.com> (raw)
In-Reply-To: <YkRfrjgNpD+S2WpN@T590>
On 3/30/22 22:48, Ming Lei wrote:
> On Wed, Mar 30, 2022 at 09:31:35AM -0400, James Bottomley wrote:
>> On Wed, 2022-03-30 at 13:59 +0100, John Garry wrote:
>>> On 30/03/2022 12:21, Andrea Righi wrote:
>>>> On Wed, Mar 30, 2022 at 11:38:02AM +0100, John Garry wrote:
>>>>> On 30/03/2022 11:11, Andrea Righi wrote:
>>>>>> Hello,
>>>>>>
>>>>>> after this commit I'm experiencing some filesystem corruptions
>>>>>> at boot on a power9 box with an aacraid controller.
>>>>>>
>>>>>> At the moment I'm running a 5.15.30 kernel; when the filesystem
>>>>>> is mounted at boot I see the following errors in the console:
>>>
>>> About "scsi: core: Reallocate device's budget map on queue depth
>>> change" being added to a stable kernel, I am not sure if this was
>>> really a fix or just a memory optimisation.
>>
>> I can see how it becomes the problem: it frees and allocates a new
>> bitmap across a queue freeze, but bits in the old one might still be in
>> use. This isn't a problem except when they return and we now possibly
>> see a tag greater than we think we can allocate coming back.
>> Presumably we don't check this and we end up doing a write to
>> unallocated memory.
>>
>> I think if you want to reallocate on queue depth reduction, you might
>> have to drain the queue as well as freeze it.
>
> After queue is frozen, there can't be any in-flight request/scsi
> command, so the sbitmap is zeroed at that time, and safe to reallocate.
>
> The problem is aacraid specific, since the driver has hard limit
> of 256 queue depth, see aac_change_queue_depth().
256 is the scsi hard limit per device... Any SAS drive has the same limit
by default since there is no way to know the max queue depth of a scsi
disk. So what is special about aacraid ?
>
>
> Thanks,
> Ming
>
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2022-03-30 22:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-30 10:11 Andrea Righi
2022-03-30 10:38 ` John Garry
2022-03-30 11:21 ` Andrea Righi
2022-03-30 12:59 ` John Garry
2022-03-30 13:31 ` James Bottomley
2022-03-30 13:48 ` Ming Lei
2022-03-30 22:30 ` Damien Le Moal [this message]
2022-03-31 2:14 ` Ming Lei
2022-03-31 6:12 ` Damien Le Moal
2022-03-30 13:41 ` Ming Lei
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=ba090f1b-a767-46a1-5728-82d9c587ef3c@opensource.wdc.com \
--to=damien.lemoal@opensource.wdc.com \
--cc=andrea.righi@canonical.com \
--cc=bvanassche@acm.org \
--cc=jejb@linux.ibm.com \
--cc=john.garry@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=martin.wilck@suse.com \
--cc=ming.lei@redhat.com \
/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
all inboxes | Powered by JetHome®