From: Damien Le Moal <dlemoal@kernel.org>
To: Bart Van Assche <bvanassche@acm.org>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Jaegeuk Kim <jaegeuk@kernel.org>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Ming Lei <ming.lei@redhat.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>
Subject: Re: [PATCH v3 4/6] scsi: Retry unaligned zoned writes
Date: Thu, 27 Jul 2023 08:46:35 +0900 [thread overview]
Message-ID: <918d430b-184f-9bf4-c76f-e8a479d80ecd@kernel.org> (raw)
In-Reply-To: <15c27150-a4fb-9c93-377a-6a462f3565c1@acm.org>
On 7/27/23 00:02, Bart Van Assche wrote:
> On 7/26/23 01:47, Damien Le Moal wrote:
>> On 7/26/23 09:57, Bart Van Assche wrote:
>>> +/*
>>> + * Returns a negative value if @_a has a lower LBA than @_b, zero if
>>> + * both have the same LBA and a positive value otherwise.
>>> + */
>>> +static int scsi_cmp_lba(void *priv, const struct list_head *_a,
>>> + const struct list_head *_b)
>>
>> The argument priv is unused.
>
> I cannot remove the 'priv' argument. From include/linux/list_sort.h:
>
> typedef int __attribute__((nonnull(2,3))) (*list_cmp_func_t)(void *,
> const struct list_head *, const struct list_head *);
>
> __attribute__((nonnull(2,3)))
> void list_sort(void *priv, struct list_head *head, list_cmp_func_t cmp);
Yes. I missed that this is a callbalck. Sorry for the noise.
>
>>> /**
>>> * scsi_unjam_host - Attempt to fix a host which has a cmd that failed.
>>> * @shost: Host to unjam.
>>> @@ -2258,6 +2289,12 @@ static void scsi_unjam_host(struct Scsi_Host *shost)
>>> SCSI_LOG_ERROR_RECOVERY(1, scsi_eh_prt_fail_stats(shost, &eh_work_q));
>>> + /*
>>> + * Sort pending SCSI commands in LBA order. This is important if zone
>>> + * write locking is disabled for a zoned SCSI device.
>>> + */
>>> + list_sort(NULL, &eh_work_q, scsi_cmp_lba);
>>
>> Should we do this only for zoned devices ?
>
> I'm not sure this is possible. Error handling happens per SCSI host. Some of
> the logical units associated with a host may be zoned while others may
> represent conventional storage or have no storage associated with them (WLUN).
>
> Thanks,
>
> Bart.
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2023-07-26 23:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 0:57 [PATCH v3 0/6] Improve the performance of F2FS on zoned UFS Bart Van Assche
2023-07-26 0:57 ` [PATCH v3 1/6] block: Introduce the flag REQ_NO_WRITE_LOCK Bart Van Assche
2023-07-26 8:37 ` Damien Le Moal
2023-07-26 14:58 ` Bart Van Assche
2023-07-26 0:57 ` [PATCH v3 2/6] block/mq-deadline: Only use zone locking if necessary Bart Van Assche
2023-07-26 8:41 ` Damien Le Moal
2023-07-26 0:57 ` [PATCH v3 3/6] block/null_blk: Support disabling zone write locking Bart Van Assche
2023-07-26 8:43 ` Damien Le Moal
2023-07-26 0:57 ` [PATCH v3 4/6] scsi: Retry unaligned zoned writes Bart Van Assche
2023-07-26 8:47 ` Damien Le Moal
2023-07-26 15:02 ` Bart Van Assche
2023-07-26 23:46 ` Damien Le Moal [this message]
2023-07-26 0:57 ` [PATCH v3 5/6] scsi: ufs: Disable zone write locking Bart Van Assche
2023-07-26 12:04 ` kernel test robot
2023-07-26 0:57 ` [PATCH v3 6/6] fs/f2fs: " Bart Van Assche
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=918d430b-184f-9bf4-c76f-e8a479d80ecd@kernel.org \
--to=dlemoal@kernel.org \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hch@lst.de \
--cc=jaegeuk@kernel.org \
--cc=jejb@linux.ibm.com \
--cc=linux-block@vger.kernel.org \
--cc=martin.petersen@oracle.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;
as well as URLs for NNTP newsgroup(s).