mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eduard Bloch <edi@gmx.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org,
	debburn-devel@lists.alioth.debian.org, Jens Axboe <axboe@suse.de>
Subject: Re: broken device locking, sg vs. sg_io on block devices
Date: Wed, 11 Apr 2007 12:12:45 +0200	[thread overview]
Message-ID: <20070411101245.GA32592@rotes76.wohnheim.uni-kl.de> (raw)
In-Reply-To: <20070407112131.GA10487@rotes76.wohnheim.uni-kl.de>

#include <hallo.h>
* Eduard Bloch [Sat, Apr 07 2007, 01:21:31PM]:

> Can we do following without having side effects:
> 
> open("/dev/sr0",O_EXCL|O_RDWR); /* no matter what it returns */
> fcntl(..., F_SETLK); /* no matter what it returns */
> ioctl(f, SCSI_IOCTL_GET_IDLUN, &x);
> ioctl(f, SCSI_IOCTL_GET_BUS_NUMBER, &jo);
> 
> Can you guarantee us that bit? 
> 
> Or shall we really implement ugly workarounds to avoid every open call?
> Note that "just do like UUCP guys" is not as easy or reliable as people
> may pretend.

Excuse me, but is there ANYBODY willing to give a binding statement on
that? First you tell "us CD writing guys" to manage that in user space
[1] and when we get real critical questions then everything we get is
radio silence? Very kindly. NOT.

Background: there are two good ways we can go:

a) carefully collecting device properties, mapping and opening
   additional devices
b) additional lockfiles delegating the locking operations

Unfortunately b leads to major problems in practice, while a looks
more promising but need a guarantee that it will be kept be working and
harmless in the future kernel releases. We need to know that before
moving on to missionary work.

Regards,
Eduard.

[1] which IMO still sucks because it's allowed to have device driver
access from any file, thus dealing locking problems at file level is
like fighting a hydra. And with multiple semi-autonomous drivers for the
same hardware even the previous silver bullet (O_EXCL) does not help.

-- 
Ich bin bereit überall hinzugehen, wenn es nur vorwärts ist.
		-- David Livingstone

  reply	other threads:[~2007-04-11 10:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200703261811.21448.gerald@itzgrund.net>
2007-03-30 11:17 ` Eduard Bloch
2007-03-30 13:43   ` Christoph Hellwig
2007-03-30 14:21     ` Eduard Bloch
2007-03-30 18:10       ` Alan Cox
2007-03-31 17:07         ` Eduard Bloch
2007-03-31 22:20           ` Alan Cox
2007-03-31 22:40             ` Eduard Bloch
2007-04-01  0:14               ` Alan Cox
2007-04-01  2:34                 ` Oleg Verych
2007-04-07 11:21             ` Eduard Bloch
2007-04-11 10:12               ` Eduard Bloch [this message]
2007-04-11 11:31                 ` Alan Cox
2007-04-11 12:19                   ` Eduard Bloch
2007-03-30 19:09       ` Jan Engelhardt

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=20070411101245.GA32592@rotes76.wohnheim.uni-kl.de \
    --to=edi@gmx.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=axboe@suse.de \
    --cc=debburn-devel@lists.alioth.debian.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®