linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@suse.de>
To: Richard Sharpe <realrichardsharpe@gmail.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/1] Remove LUNs that no longer exist when we scan a target with REPORT LUNS.
Date: Wed, 18 Aug 2010 10:13:17 -0500	[thread overview]
Message-ID: <1282144397.3035.32.camel@mulgrave.site> (raw)
In-Reply-To: <AANLkTi=LvbUnQjPjFrHFtszMkY526mu8X9vCrMDEBO5C@mail.gmail.com>

On Wed, 2010-08-18 at 08:10 -0700, Richard Sharpe wrote:
> On Sun, Aug 15, 2010 at 5:08 PM,  <realrichardsharpe@gmail.com> wrote:
> > From: Richard Sharpe <realrichardsharpe@gmail.com>
> >
> > If the target returns logical_unit_not_supported when we send REPORT LUNS
> > it means that it supports REPORT LUNS but there really are no LUNs there.
> > Delete LUN 0 in that case.
> >
> > Also, when parsing the LUNs reported, remove any LUNs that used to exist
> > in the gaps, and remove LUNs beyond the end of those reported. They no
> > longer exist.
> >
> > Also don't scan a target where the ID is too large or the channel is
> > too large.
> >
> > Tested by adding four LUNs with scst_local and then deleting them in
> > various combinations, including deleting from LUN 0, deleting from last
> > LUN and deleting in the middle out.
> 
> Hmmm, before James responds, it turns out that I did not test as
> carefully as I thought, and deleting LUNs in the order 0, 2, ... does
> not produce the results I expected, so I will have to rework this.

OK, so I think what I'd really like is an AEN notification
infrastructure based on the unit attentions that bubbles this up to user
space for a decision.  That way if user space does the removal, we're
not going to get into locking or other problems.

James




  reply	other threads:[~2010-08-18 15:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-16  0:08 (unknown), realrichardsharpe
2010-08-16  0:08 ` [PATCH 1/1] Remove LUNs that no longer exist when we scan a target with REPORT LUNS realrichardsharpe
2010-08-16 13:45   ` Konrad Rzeszutek Wilk
2010-08-16 13:59     ` Richard Sharpe
2010-08-16 14:58       ` Konrad Rzeszutek Wilk
2010-08-18 15:37     ` Loke, Chetan
2010-08-18 15:10   ` Richard Sharpe
2010-08-18 15:13     ` James Bottomley [this message]
2010-08-20  2:59       ` Richard Sharpe

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=1282144397.3035.32.camel@mulgrave.site \
    --to=james.bottomley@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=realrichardsharpe@gmail.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;
as well as URLs for NNTP newsgroup(s).