From: Greg KH <gregkh@linuxfoundation.org>
To: Michael Schmitz <schmitzmic@gmail.com>
Cc: stable@vger.kernel.org, linux-m68k@vger.kernel.org,
geert@linux-m68k.org, Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH] block: ataflop: more blk-mq refactoring fixes
Date: Tue, 27 Feb 2024 10:06:37 +0100 [thread overview]
Message-ID: <2024022726-magnitude-molecule-d251@gregkh> (raw)
In-Reply-To: <20240227013728.15935-1-schmitzmic@gmail.com>
On Tue, Feb 27, 2024 at 02:37:28PM +1300, Michael Schmitz wrote:
> [ commit d28e4dff085c5a87025c9a0a85fb798bd8e9ca17 upstream ]
>
> As it turns out, my earlier patch in commit 86d46fdaa12a (block:
> ataflop: fix breakage introduced at blk-mq refactoring) was
> incomplete. This patch fixes any remaining issues found during
> more testing and code review.
>
> Requests exceeding 4 k are handled in 4k segments but
> __blk_mq_end_request() is never called on these (still
> sectors outstanding on the request). With redo_fd_request()
> removed, there is no provision to kick off processing of the
> next segment, causing requests exceeding 4k to hang. (By
> setting /sys/block/fd0/queue/max_sectors_k <= 4 as workaround,
> this behaviour can be avoided).
>
> Instead of reintroducing redo_fd_request(), requeue the remainder
> of the request by calling blk_mq_requeue_request() on incomplete
> requests (i.e. when blk_update_request() still returns true), and
> rely on the block layer to queue the residual as new request.
>
> Both error handling and formatting needs to release the
> ST-DMA lock, so call finish_fdc() on these (this was previously
> handled by redo_fd_request()). finish_fdc() may be called
> legitimately without the ST-DMA lock held - make sure we only
> release the lock if we actually held it. In a similar way,
> early exit due to errors in ataflop_queue_rq() must release
> the lock.
>
> After minor errors, fd_error sets up to recalibrate the drive
> but never re-runs the current operation (another task handled by
> redo_fd_request() before). Call do_fd_action() to get the next
> steps (seek, retry read/write) underway.
>
> Signed-off-by: Michael Schmitz <schmitzmic@gmail.com>
> Fixes: 6ec3938cff95f (ataflop: convert to blk-mq)
> Fixes: 86d46fdaa12a (block: ataflop: fix breakage introduced at blk-mq refactoring)
> CC: stable@vger.kernel.org # 5.10.x
> Link: https://lore.kernel.org/r/20211024002013.9332-1-schmitzmic@gmail.com
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
> [MSch: v5.10 backport merge conflict fix]
Now queued up, thanks.
greg k-h
prev parent reply other threads:[~2024-02-27 9:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-27 1:37 [PATCH] block: ataflop: more blk-mq refactoring fixes Michael Schmitz
2024-02-27 9:06 ` Greg KH [this message]
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=2024022726-magnitude-molecule-d251@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=axboe@kernel.dk \
--cc=geert@linux-m68k.org \
--cc=linux-m68k@vger.kernel.org \
--cc=schmitzmic@gmail.com \
--cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox