From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: chenxiang <chenxiang66@hisilicon.com>
Cc: <axboe@kernel.dk>, <tj@kernel.org>, <martin.petersen@oracle.com>,
<linux-ide@vger.kernel.org>, <linux-scsi@vger.kernel.org>,
<linuxarm@openeuler.org>, <linuxarm@huawei.com>
Subject: Re: [PATCH] libata: configure max sectors properly
Date: Tue, 25 May 2021 22:48:20 -0400 [thread overview]
Message-ID: <yq135uaxmt8.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <1621992862-114264-1-git-send-email-chenxiang66@hisilicon.com> (chenxiang's message of "Wed, 26 May 2021 09:34:22 +0800")
> To avoid the issue, set q->limits.max_sectors with the minimum value
> between dev->max_sectors and q->limits.max_sectors.
dev->max_sectors describes the ATA hardware limitation (similar to
shost->max_sectors for SCSI). Whereas q->limit.max_sectors is the block
layer soft limit for filesystem I/O. That value should not be used to
set blk_queue_max_hw_sectors(). Nor should queue limits currently in
effect be used to configure what is essentially a hardware capability.
I suspect you need to clamp the libata dev->max_sectors value to
sdev->host->max_sectors.
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2021-05-26 2:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-26 1:34 [PATCH] libata: configure max sectors properly chenxiang
2021-05-26 2:48 ` Martin K. Petersen [this message]
2021-05-31 14:19 ` [libata] 2c76f9f255: stress-ng.copy-file.ops_per_sec -25.9% regression kernel test robot
2021-05-31 14:19 ` kernel test robot
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=yq135uaxmt8.fsf@ca-mkp.ca.oracle.com \
--to=martin.petersen@oracle.com \
--cc=axboe@kernel.dk \
--cc=chenxiang66@hisilicon.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=linuxarm@openeuler.org \
--cc=tj@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.