Subject: Re: Unit attention in st
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Matthew Jacob <mjacob@feral.com>
List: tech-kern
Date: 05/03/2002 15:04:45
On Fri, 3 May 2002, Manuel Bouyer wrote:

> On Fri, May 03, 2002 at 10:14:36AM -0700, Matthew Jacob wrote:
> > 
> > 
> > > To solve this I made a change similar to the one I made to st.c a few days
> > 
> > I just noticed this (hey- I'm supposed to be caring about st- how about
> > running this stuff by me, or the list). The change you made is wrong I
> 
> As usual, because I though it was a trivial change :(
> 
> > believe- the check should be against ST_MOUNTED, not PERIPH_OPEN- you now have
> > allowed somebody to eject a tape manually in the middle of a no-rewind set of
> > backups and replace it such that the backup apps don't know something has
> > happened.
> 
> OK, I see what happen. A simple 'mt status' will mount the tape and leave it
> mounted. Maybe it should not be mounted at first open of /dev/nrst0, but
> at the first tape operation (read, write, or move space file/record) ?
> Or maybe mt should default to use /dev/enrst0 instead.

I think that now that we're keeping track of file position that a close of
/dev/nrst0 where you're at BOT (known to be at BOT) should do an st_unmount.

That's sort of like you're first option, but handles the case of a bunch of
operations and then returning to BOT.

Hmm.

-matt