public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>
Cc: Harald Seipp <SEIPP@de.ibm.com>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: RE: remove-single-device removes mounted HDDs (kernel 2.6)
Date: Thu, 11 Aug 2005 12:52:26 -0500	[thread overview]
Message-ID: <1123782746.5062.42.camel@mulgrave> (raw)
In-Reply-To: <547AF3BD0F3F0B4CBDC379BAC7E4189F01684DCF@otce2k03.adaptec.com>

On Thu, 2005-08-11 at 13:05 -0400, Salyzyn, Mark wrote:
> RAID management applications have no idea what other applications are
> doing and can not exercise such control over them. From my (flawed?)
> view, there is no way to ask the OS if the target happens to be unused
> and quiesced at this instant of time.

But we have userspace tools, like fuser that can get the answers

> Asking the (various) applications (of which one of them is the
> filesystem mounts) this question is an exercise in anger management
> currently. All attempts to add such 'busy' interrogation code to the
> ioctl of the driver are rejected. This code resides in the 'Adaptec
> Branch' of the aacraid driver as one of our OEM added values.

That's because such questions are 1) racy and 2) flawed.

I could export the device ref count sure enough, but it's not useful.
It's internal bookkeeping only.  It could be 1 if there's a filesystem
mounted, in which case you don't want to force an ejection without
unmounting or it could be 1 because someone's sitting in the sysfs
directory, in which case an ejection is fine.

Regardless, userspace is supposed to clean up nicely, so you
use /proc/mounts and fuser to check to see if the thing is really in use
and by whom and the user takes action accordingly (either say wait for
me to clean up manually or go ahead and kill everything to clean this
up).

James



  reply	other threads:[~2005-08-11 17:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-11 17:05 remove-single-device removes mounted HDDs (kernel 2.6) Salyzyn, Mark
2005-08-11 17:52 ` James Bottomley [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-09-06 21:28 [RFC] SCSI target for IBM Power5 LPAR Dave C Boutcher
2005-09-07 10:49 ` Christoph Hellwig
2005-09-07 12:45   ` Dave C Boutcher
2005-09-07 12:58     ` FUJITA Tomonori
2005-09-07 17:17       ` Mike Christie
2005-09-07 17:48         ` remove-single-device removes mounted HDDs (kernel 2.6) Steve Byan
2005-08-12 15:07 corene
2005-08-12 11:36 Salyzyn, Mark
2005-08-11 16:37 Salyzyn, Mark
2005-08-11 16:53 ` James Bottomley
2005-08-11 15:51 Salyzyn, Mark
2005-08-11 16:07 ` James Bottomley
2005-08-11 17:40   ` Bryan Henderson
2005-08-11 22:06     ` Stefan Richter
2005-08-11 10:09 Harald Seipp
2005-08-11 11:55 ` Douglas Gilbert
2005-08-11 16:57   ` Harald Seipp
2005-08-11 13:59 ` James Bottomley
2005-08-11 14:32   ` Harald Seipp
2005-08-11 14:46     ` Matthew Wilcox
2005-08-11 14:51     ` James Bottomley
2005-08-11 15:44       ` Harald Seipp
2005-08-11 16:40         ` Christoph Hellwig
2005-08-11 16:50           ` Harald Seipp
2005-09-06 11:43             ` Christoph Hellwig
2005-08-11 17:47         ` Bryan Henderson
2005-08-12  8:59           ` Harald Seipp

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=1123782746.5062.42.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=SEIPP@de.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mark_salyzyn@adaptec.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