Re: [Bugme-new] [Bug 7864] New: A MTIOCTOP/MTWEOF within the early warning will cause the file number to be incorrect

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

 



On Mon, 22 Jan 2007 13:07:20 -0800
bugme-daemon@xxxxxxxxxxxxxxxxxxx wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=7864
> 
>            Summary: A MTIOCTOP/MTWEOF within the early warning will cause
>                     the file number to be incorrect
>     Kernel Version: 2.6.19.2
>             Status: NEW
>           Severity: low
>              Owner: io_scsi@xxxxxxxxxxxxxxxxxxxx
>          Submitter: ce_reisinger@xxxxxxxxx
> 
> 
> Write records to a SCSI tape until a write fails with a ENOSPC (you have reached
> early warning.
> Now perform a:
>    struct mtget before, after;
>    ioctl(fd, MTIOCGET, &before);
>    struct mtop mtop = { MTWEOF, 1 };
>    ioctl(fd, MTIOCTOP, &mtop);
>    ioctl(fd, MTIOCGET, &after);
> 
> Check the value of mt_fileno in the before and after structures. Notice the
> after is 2 greater then the before.
> 
> The problem appears to be in the block of code starting at line 2817 in st.c.
> This block is entered because the drive did return a CHECK CONDITION with NO
> SENSE and the SENSE_EOM bit set. At lines 2824/5 the fileno is incremented. But
> it has already been increased by the number of filemarks requested by the
> MTIOCTOP. I believe that the residue count in the sense data should be
> subtracted from fileno, not a increment as is done.
> 

Thanks.  Could you please send us a tested patch to fix these things, as
per http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt ?
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux