From: Andrew Morton <akpm@osdl.org>
To: ce_reisinger@yahoo.com
Cc: "bugme-daemon@kernel-bugs.osdl.org"
<bugme-daemon@bugzilla.kernel.org>,
linux-scsi@vger.kernel.org,
Kai Makisara <Kai.Makisara@kolumbus.fi>
Subject: Re: [Bugme-new] [Bug 7864] New: A MTIOCTOP/MTWEOF within the early warning will cause the file number to be incorrect
Date: Wed, 24 Jan 2007 20:48:04 -0800 [thread overview]
Message-ID: <20070124204804.77486468.akpm@osdl.org> (raw)
In-Reply-To: <200701222107.l0ML7KPn010266@fire-2.osdl.org>
On Mon, 22 Jan 2007 13:07:20 -0800
bugme-daemon@bugzilla.kernel.org 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@kernel-bugs.osdl.org
> Submitter: ce_reisinger@yahoo.com
>
>
> 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 ?
next parent reply other threads:[~2007-01-25 4:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200701222107.l0ML7KPn010266@fire-2.osdl.org>
2007-01-25 4:48 ` Andrew Morton [this message]
2007-01-25 22:38 ` [Bugme-new] [Bug 7864] New: A MTIOCTOP/MTWEOF within the early warning will cause the file number to be incorrect Kai Makisara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070124204804.77486468.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=Kai.Makisara@kolumbus.fi \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=ce_reisinger@yahoo.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox