Module Name: src Committed By: martin Date: Fri Mar 1 17:29:32 UTC 2019
Modified Files: src/sys/dev/scsipi [netbsd-8]: files.scsipi st.c Log Message: Pull up following revision(s) (requested by kardel in ticket #1197): sys/dev/scsipi/st.c: revision 1.236 sys/dev/scsipi/st.c: revision 1.237 sys/dev/scsipi/files.scsipi: revision 1.42 Fix PR kern/53949: Fix inconsistent/incomplete file mark handling to conform again to mtio(4) at close(2) time. This was necessary as the PREVENT/ALLOW bracket was reduced from a whole mount session to cover only the open(2)/close(2) time on ~2002-03-22. The rationale was to allow robots and humans to change the media during a mount session. Unfortunately this lead to file marks being written to potentially other media at the beginning on drives that used the two file marks as EOM pattern. In order for that to happen the media had to be removed after data and at most one file mark had been written before removal. The mount error message has been clarified and a warning about potential data/file mark lossage on UNIT ATTENTION during an active mount session with unfinished file marks has been added. While there, fix, but disable the commented SUN compatibility to write final file marks by opening and immediately closing the device in O_WRONLY mode. That code has not been working since around 1998. It can now be enabled with options ST_SUNCOMPAT. Additionally debug output coverage has been extended. - Correct printing type of b_blkno (int64_t) in st.c Fixes build with kUBSan on NetBSD/i386. Fix, but disable the commented SUN compatibility in st.c to write final file marks by opening and immediately closing the device in O_WRONLY mode. That code has not been working since around 1998. It can now be enabled with options ST_SUNCOMPAT. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.41.156.1 src/sys/dev/scsipi/files.scsipi cvs rdiff -u -r1.230.8.2 -r1.230.8.3 src/sys/dev/scsipi/st.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.