diff options
| author | 2026-09-30 14:59:51 +0800 | |
|---|---|---|
| committer | 2026-10-01 08:37:58 -0600 | |
| commit | 9690943353cec1690a715e000ba6a74e5139f530 (patch) | |
| tree | fc6f71467e86d8f9e2618c5c86a93b59612e35eb /scripts/Makefile.thinlto | |
| parent | block: drop the cached plug time when blk_add_rq_to_plug() flushes (diff) | |
block: amiflop: synchronize flush timer before track flush
The amiflop track buffer is shared with the timer callback. timer_delete()
does not wait for an in-flight callback, and that callback can rearm itself
when it cannot acquire the floppy controller. A synchronous track flush can
therefore race with the callback.
Stop the timer before synchronous track writes and use timer_delete_sync()
to wait for any callback already running. Keep callback rearming disabled
until the write is complete. Apply this to the FDFMTTRK path as well.
FDFLUSH, FDFMTTRK and close-time flushes run outside the blk-mq
request callback. Freeze their queues so an in-flight request cannot
change the shared track buffer while it is encoded and written. Restart
the timer if a track remains dirty after a failed flush.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
Link: https://patch.msgid.link/20260930065951.2932739-1-runyu.xiao@seu.edu.cn
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
