Opened 3 years ago

Closed 3 years ago

#1466 closed defect (fixed)

Timeout too short for some devices under openBSD

Reported by: Martin Ziemer Owned by: Christian Franke
Priority: major Milestone: Release 7.3
Component: all Version:
Keywords: openbsd scsi Cc:


Under OpenBSD some timeouts are too short because of a needed conversion to seconds.

The problem can be fixed for OpenBSD in scsiata.cpp in line 367 by applying a multiplier of 1000 as used in os_openbsd.cpp in line 173. (But i guess it would break other Operating Systems!)

I dont know, where to apply this multiplier without breaking other Operating Systems! It would be great, if someone finds the right spot to correct this.

Attachments (1)

timeout.patch (998 bytes ) - added by Martin Ziemer 3 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by Christian Franke, 3 years ago

Keywords: openbsd scsi added; OpenBSD removed
Milestone: undecided
Priority: minormajor

Please test this patch:

  • os_openbsd.cpp

    266266  sc.databuf = (char *)iop->dxferp;
    267267  sc.datalen = iop->dxfer_len;
    268268  sc.senselen = iop->max_sense_len;
    269   sc.timeout = iop->timeout == 0 ? 60000 : iop->timeout;       /* XXX */
     269  sc.timeout = (iop->timeout == 0 ? 60 : iop->timeout) * 1000;
    270270  sc.flags =
    271271    (iop->dxfer_dir == DXFER_NONE ? SCCMD_READ :
    272272    (iop->dxfer_dir == DXFER_FROM_DEVICE ? SCCMD_READ : SCCMD_WRITE));

comment:2 by Martin Ziemer, 3 years ago

This patch works: The "atascsi_passthru_done, timeout"-messages go away in smartd as well as smartctl.

comment:3 by Christian Franke, 3 years ago

Milestone: undecidedRelease 7.3

Thanks. Feel free to provide it as a patch.

by Martin Ziemer, 3 years ago

Attachment: timeout.patch added

comment:4 by Christian Franke, 3 years ago

Owner: set to Christian Franke
Status: newaccepted

comment:5 by Christian Franke, 3 years ago

Resolution: fixed
Status: acceptedclosed

Applied in r5214, thanks.

Note: See TracTickets for help on using tickets.