patchGNU cpio - Patches: patch #9263, Open device with O_NONBLOCK option

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #9263: Open device with O_NONBLOCK option

Submitter:  Alexey Svistunov <svalx>
Submitted:  Fri 17 Feb 2017 12:55:08 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Discussion

Sun 07 Mar 2021 06:45:39 PM UTC, comment #1: 

Ping - any chance that this change will still be merged? We're still carrying it downstream in openSUSE / SLES via https://build.ope ... ck.patch?expand=1

ddiss
Fri 17 Feb 2017 12:55:08 PM UTC, original submission:  

When running the 2.6 kernel, "mt -f /dev/nst0 status" blocks if there is no media in the drive.  The same occurs for other commands.

When running the 2.4.24 kernel, "mt -f /dev/nst0 status" does not block when there is no tape in the drive.

This behavior change is documented for the 2.6 kernel (see
kernel-source-2.6.3/Documentation/scsi/st.txt for the full doc):

If the open option O_NONBLOCK is used, open succeeds even if the
drive is not ready. If O_NONBLOCK is not used, the driver waits for the drive to become ready. If this does not happen in ST_BLOCK_SECONDS seconds, open fails with the errno value EIO. With O_NONBLOCK the device can be opened for writing even if there is a write protected tape in the drive (commands trying to write something return error if attempted).

It appears that the use of O_NONBLOCK is safe with pre-2.6 kernels. Suggest adding the use of O_NONBLOCK when opening the device. As it is, for long-running commands such as "fsf", one cannot tell if the command is progressing or if it's blocking waiting for media.

See: https://bugs.debi ... rt.cgi?bug=239130
     https://lists.gnu ... -10/msg00002.html
     http://support.no ... 16d08211bc88.html

Alexey Svistunov <svalx>

 

Attached Files

Attached Files
file #39774:  cpio-open_nonblock.patch added by svalx (1.3KiB - application/octet-stream)

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by ddiss (Posted a comment)
  • -email is unavailable- added by svalx (Submitted the item)
  • -email is unavailable- added by svalx
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    History

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-17 svalx Attached File- Added cpio-open_nonblock.patch, #39774
        Carbon-Copy- Added svalx

    Back to the top

    Powered by Savane 3.16-8b18.
    Corresponding source code