Module Name: src Committed By: kardel Date: Tue Feb 12 13:43:40 UTC 2019
Modified Files: src/sys/dev/scsipi: st.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.235 -r1.236 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.