Util-Linux package development
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Cc: util-linux@vger.kernel.org, jkosina@suse.cz, kurt@garloff.de,
	den@openvz.org, msuchanek@suse.de, efremov@linux.com
Subject: Re: [PATCH 2/2] libblkid: reopen floppy without O_NONBLOCK
Date: Fri, 21 Jan 2022 11:18:40 +0100	[thread overview]
Message-ID: <20220121101840.qaydaibbcphc4fja@ws.net.home> (raw)
In-Reply-To: <20211209141233.3774937-3-vsementsov@virtuozzo.com>

On Thu, Dec 09, 2021 at 03:12:33PM +0100, Vladimir Sementsov-Ogievskiy wrote:
> Since c7e9d0020361f4308a70cdfd6d5335e273eb8717
> "Revert "floppy: reintroduce O_NDELAY fix"" commit in linux kernel,
> floppy drive works bad when opened with O_NONBLOCK: first read may
> fail. This cause probing fail and leave error messages in dmesg. So, if
> we detect that openedfd is floppy, reopen it without O_NONBLOCK flag.

 I'd like to a little bit optimize the code in libblkid and reduce
 number of situations when we call FDGETFDCSTAT ioctl.

 If I good understand the problem is read() with O_NONBLOCK, right?

 I'd like to call stat() before FDGETFDCSTAT ioctl to make sure that
 the file descriptor is really block-device etc. (libmount supports
 regular files too)

   Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


  parent reply	other threads:[~2022-01-21 10:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09 14:12 [PATCH 0/2] libblkid: don't use O_NONBLOCK for floppy Vladimir Sementsov-Ogievskiy
2021-12-09 14:12 ` [PATCH 1/2] libblkid: introduce blkid_safe_open Vladimir Sementsov-Ogievskiy
2021-12-09 14:12 ` [PATCH 2/2] libblkid: reopen floppy without O_NONBLOCK Vladimir Sementsov-Ogievskiy
2021-12-14 11:45   ` Michal Suchánek
2021-12-14 13:58     ` Vladimir Sementsov-Ogievskiy
2021-12-14 12:03   ` Karel Zak
2021-12-14 14:24     ` Vladimir Sementsov-Ogievskiy
2021-12-15 12:56       ` Karel Zak
2021-12-16  8:47         ` Vladimir Sementsov-Ogievskiy
2021-12-24 15:31           ` Vladimir Sementsov-Ogievskiy
2022-01-03  8:43             ` Karel Zak
2022-01-17 11:50               ` Karel Zak
2022-01-17 15:46                 ` Vladimir Sementsov-Ogievskiy
2022-01-17 16:12                   ` Karel Zak
2022-01-17 18:10                   ` Vladimir Sementsov-Ogievskiy
2022-01-20  9:14                     ` Karel Zak
2022-01-21 10:18   ` Karel Zak [this message]
2022-01-21 12:13     ` Vladimir Sementsov-Ogievskiy
2022-01-21 13:57       ` Karel Zak
2021-12-14 10:25 ` [PATCH 0/2] libblkid: don't use O_NONBLOCK for floppy Jiri Kosina
2021-12-14 10:29   ` Kurt Garloff
2021-12-14 11:46 ` Michal Suchánek

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=20220121101840.qaydaibbcphc4fja@ws.net.home \
    --to=kzak@redhat.com \
    --cc=den@openvz.org \
    --cc=efremov@linux.com \
    --cc=jkosina@suse.cz \
    --cc=kurt@garloff.de \
    --cc=msuchanek@suse.de \
    --cc=util-linux@vger.kernel.org \
    --cc=vsementsov@virtuozzo.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