Show Your Support: This site is primarily supported by advertisements. Ads are what have allowed this site to be maintained on a daily basis for the past 18+ years. We do our best to ensure only clean, relevant ads are shown, when any nasty ads are detected, we work to remove them ASAP. If you would like to view the site without ads while still supporting our work, please consider our ad-free Phoronix Premium.
Linux Regressed Its Floppy Disk Driver - Someone Actually Noticed Just A Few Months Later
There remains a lot of vintage hardware code within the Linux kernel like enthusiasts maintaining the Motorola 68000 series support, among a lot of other older hardware and many drivers for peripherals that haven't been sold new in many years -- including the floppy disk code. But as is often the case, besides it becoming increasingly rare for users of old hardware in general, it's increasingly rare to find vintage computer owners running modern versions of the Linux kernel. But some still do, with the latest example being a regression report over the Linux floppy driver.
Back in February I wrote about the Linux kernel still seeing occasional work on its floppy disk support after thirty years. That patch was subsequently mainlined and also back-ported to prior kernel stable series.
Fast forward nearly a half-year, it turns out that the latest floppy code regressed the existing driver behavior. There is a bug report that the floppy driver regressed on the Linux 5.10 LTS kernel following that change being back-ported. The floppy driver still largely works but some behavior was unintentionally/silently altered. Most notably, not being able to open a floppy disk that is write-protected. The issue noted, "Since FOREVER before the patch, when using O_NDELAY, one could open the floppy device with no media inserted or even with write protected media without error. "Read-only file system" status is returned only when we actually tried to write to it. We have software still in use today that relies on this functionality. After the patch, if no media is in the drive the open fails with "no such device or address". If the floppy media is write protected the open fails with "Read-only file system"."
The offending commit changing the floppy disk handling behavior is the change from February. Unfortunately, there isn't a clean fix as the code change does address an issue with libblkid. So now a new solution needs to be figured out for maintaining the Linux floppy code in 2021 with recent kernels.