Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: st.c update has broken dump multi-tape support



Hi !

I assumed Michael was proposing a solution for the missing biodone() in the fixed block path (though that part was missing in the patch).

We should try to fix both issues (write return code and missing biodone) with hopefully minimal changes without sacrificing clarity and abstraction.

IMHO ststart() should manage the interface to ststart1() but not look into specific bits (ST_EOM_PENDING) and ststart1() should signal ststart() errno and biodone(). Thus I did see

merit in Michael's proposal. This is a style discussion, however.

On a more important note: Looking into the code again we also seem to miss clearing ST_{EOM,EIO}_PENDING that is something that was present in 1.231. Clearing that would get st.c

in-line again with st(4).

Frank


On 06/10/21 15:52, Brett Lymn wrote:
On Thu, Jun 10, 2021 at 12:13:22PM +0200, Michael van Elst wrote:
On Thu, Jun 10, 2021 at 12:02:19PM +0200, Michael van Elst wrote:

If you don't like the fake errno, the function needs to return
two values, the error value and a boolean to finish the
unqueued request. Cleaner, but more changes.
E.g. (not even compile-tested):

I don't think that is quite right.  At line 1204 error is set to EIO, even with your changes
b_error will still get set to EIO when EOM_PENDING is true.  Previously b_error was only set
b_error would be set to EIO in previous versions this would only happen if there was no
ST_EOM_PENDING flag set.  I did a much smaller change in ststart inside
the if at line 1290 I added a check to only set b_error to the value of error unless error
==EIO and st->flags contains ST_EOM_PENDING.  This change made dump perform as expected and
prompt for a new tape.




Home | Main Index | Thread Index | Old Index