mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: Randy Dunlap <randy.dunlap@oracle.com>
Cc: lkml <linux-kernel@vger.kernel.org>, akpm <akpm@osdl.org>,
	axboe <axboe@suse.de>, scsi <linux-scsi@vger.kernel.org>
Subject: Re: [Ubuntu PATCH] CDROMEJECT cannot eject some devices
Date: Mon, 03 Jul 2006 16:10:31 -0500	[thread overview]
Message-ID: <1151961031.3445.15.camel@mulgrave.il.steeleye.com> (raw)
In-Reply-To: <44A98220.2000007@oracle.com>

On Mon, 2006-07-03 at 13:46 -0700, Randy Dunlap wrote:
> -			err = blk_send_start_stop(q, bd_disk, 0x02);
> +			err = 0;
> +
> +			err |= blk_send_allow_medium_removal(q, bd_disk);

This piece is clearly wrong.  If the medium has physically been locked
(and the lock is managed by the cdrom layer) then we don't want to be
overriding it.  It should be up to the user or the tools to figure out
who has it open or mounted and take the appropriate action.

> +			err |= blk_send_start_stop(q, bd_disk, 0x01);

And this looks unnecessary.  Why does the device need to be started to
eject its medium?

> +			err |= blk_send_start_stop(q, bd_disk, 0x02);

James



      parent reply	other threads:[~2006-07-03 21:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-03 20:46 Randy Dunlap
2006-07-03 21:04 ` Matthew Wilcox
2006-07-03 21:10 ` James Bottomley [this message]

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=1151961031.3445.15.camel@mulgrave.il.steeleye.com \
    --to=james.bottomley@steeleye.com \
    --cc=akpm@osdl.org \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=randy.dunlap@oracle.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

all inboxes | Powered by JetHome®