linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Hounschell <markh@compro.net>
To: Denis Efremov <efremov@linux.com>,
	dmarkh@cfl.rr.com, linux-block@vger.kernel.org,
	Linux-kernel <linux-kernel@vger.kernel.org>
Cc: Jiri Kosina <jkosina@suse.cz>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [BUG] FLOPPY DRIVER since 5.10.20
Date: Mon, 26 Jul 2021 08:23:48 -0400	[thread overview]
Message-ID: <1cf8e751-db77-441e-53b4-d6e979bbe046@compro.net> (raw)
In-Reply-To: <f1277dcb-6bf8-b149-ad4e-68a4109d4e67@linux.com>

On 7/26/21 7:37 AM, Denis Efremov wrote:
> 
> 
> On 7/26/21 2:17 PM, Mark Hounschell wrote:
>> On 7/26/21 3:57 AM, Denis Efremov wrote:
>>> Hi,
>>>
>>> On 7/23/21 9:47 PM, Mark Hounschell wrote:
>>>>
>>>> These 2 incremental patches, patch-5.10.19-20 and patch-5.11.2-3 have broken the user land fd = open("/dev/fd0", (O_RDWR | O_NDELAY)); functionality.
>>>
>>> Thank you for the report, I'm looking into this.
>>>
>>>> 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.
>>>
>>> If it's a project with open sources could you please give a link?
>>>
>>> Regards,
>>> Denis
>>>
>> This is immaterial but fdutils and libdsk both use rely on this flag. Who can know who else does. The point is it should NOT have been changed.
> 
> Yes, I asked this only to add utils and this behavior to the tests.
> And be more specific about why we should preserve this behavior in
> next commit messages.
> 

Well, first thing is now you can't open a floppy with a write protected 
floppy installed. I don't think that was intended but that is now how it is.

Next there are commands that can be sent to the floppy via "ioctl(fd, 
FDRAWCMD,  &raw_cmd);" that do NOT require a floppy diskette to be 
installed.

All commands issued to the device that require a floppy diskette without 
a diskette installed fail with the proper status letting you know the 
device is not ready / no diskette installed. That goes for write 
protected floppies too.

There is no reason to force a user to only be able to operate on Linux 
fdformat formatted floppies.

Regards
Mark


  reply	other threads:[~2021-07-26 12:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23 18:47 Mark Hounschell
2021-07-26  7:57 ` Denis Efremov
2021-07-26 11:15   ` Mark Hounschell
2021-07-26 11:17   ` Mark Hounschell
2021-07-26 11:37     ` Denis Efremov
2021-07-26 12:23       ` Mark Hounschell [this message]
2021-07-26 16:34         ` Denis Efremov
2021-07-30  5:15           ` Denis Efremov
2021-08-01 11:14             ` Kurt Garloff
2021-08-08  7:42 ` [PATCH] Revert "floppy: reintroduce O_NDELAY fix" Denis Efremov
2021-08-16  7:17   ` Jiri Kosina
2021-08-18 15:53     ` Denis Efremov
2021-08-30  9:20   ` Thorsten Leemhuis

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=1cf8e751-db77-441e-53b4-d6e979bbe046@compro.net \
    --to=markh@compro.net \
    --cc=dmarkh@cfl.rr.com \
    --cc=efremov@linux.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jkosina@suse.cz \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [BUG] FLOPPY DRIVER since 5.10.20' \
    /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

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).