From: Laurence Oberman <loberman@redhat.com>
To: Eyal Ben David <bdeyal@gmail.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>,
"Ewan D. Milne" <emilne@redhat.com>,
dgilbert@interlog.com, linux-scsi@vger.kernel.org
Subject: Re: SG does not ignore dxferp (direct io + mmap)
Date: Fri, 25 Nov 2016 09:46:05 -0500 (EST) [thread overview]
Message-ID: <805036857.58360.1480085165589.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <CAPrnrPBsBPH2B48QYLPCsdpg0LT7iBxc2+g+_xHPcDOjRf7f5A@mail.gmail.com>
----- Original Message -----
> From: "Eyal Ben David" <bdeyal@gmail.com>
> To: "Johannes Thumshirn" <jthumshirn@suse.de>
> Cc: "Ewan D. Milne" <emilne@redhat.com>, "Laurence Oberman" <loberman@redhat.com>, dgilbert@interlog.com,
> linux-scsi@vger.kernel.org
> Sent: Friday, November 25, 2016 7:36:34 AM
> Subject: Re: SG does not ignore dxferp (direct io + mmap)
>
> On Fri, Nov 25, 2016 at 1:53 PM, Johannes Thumshirn <jthumshirn@suse.de>
> wrote:
> > On Fri, Nov 25, 2016 at 01:20:34PM +0200, Eyal Ben David wrote:
> >> Note that sg_mmap_read does not parse the SCSI sense, so the script
> >> might fail for other reasons (some SCSI error) and think its a zero
> >> byte corruption.
> >
> > But SCSI generic checks for errors and returns -EINVAL on CHECK_CONDITION
> > or
> > DRIVER_SENSE (and sets SG_INFO_CHECK in hdr.info).
> >
> Ah OK. We use async write/read instead of ioctl and forgot that ioctl
> checks the read.
>
> > Anyways, can you test the patch Ewan found on one of your kernel's that are
> > known to fail?
>
> All the examples I gave before were on physical hosts and storage at a
> testing lab.
> That would be difficult to do. Sorry.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
I applied just the patch myself and Ewan isolated to the 4.7.9 kernel and the issue is resolved for me.
I have 100000 loops of the test with no issue.
I repeated the test flushing cache each time as well to make sure
for i in `seq 1 100000`; do ./sg_mmap_read -d /dev/sg1 -l 0 -m -b | hexdump | grep 6300; done
for i in `seq 1 100000`; do ./sg_mmap_read -d /dev/sg1 -l 0 -m -b | hexdump | grep 6300; echo 3 > /proc/sys/vm/drop_caches;done
Johannes, you are reproducing another race in your test I think.
next prev parent reply other threads:[~2016-11-25 15:43 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-20 16:02 SG does not ignore dxferp (direct io + mmap) Eyal Ben David
2016-11-21 0:04 ` Laurence Oberman
2016-11-21 9:23 ` Eyal Ben David
2016-11-21 14:24 ` Ewan D. Milne
2016-11-21 14:54 ` Laurence Oberman
2016-11-21 14:55 ` Eyal Ben David
2016-11-21 15:12 ` Laurence Oberman
2016-11-21 15:15 ` Johannes Thumshirn
2016-11-21 15:44 ` Johannes Thumshirn
2016-11-21 16:04 ` Eyal Ben David
2016-11-21 16:25 ` Ewan D. Milne
2016-11-21 17:34 ` Douglas Gilbert
2016-11-21 18:24 ` Ewan D. Milne
2016-11-22 8:37 ` Johannes Thumshirn
2016-11-22 13:48 ` Eyal Ben David
2016-11-22 15:31 ` Laurence Oberman
2016-11-22 16:00 ` Johannes Thumshirn
2016-11-22 16:28 ` Eyal Ben David
2016-11-22 18:30 ` Ewan D. Milne
2016-11-22 18:46 ` Laurence Oberman
2016-11-22 20:55 ` Eyal Ben David
2016-11-23 18:55 ` Laurence Oberman
2016-11-23 20:22 ` Ewan D. Milne
2016-11-25 8:07 ` Johannes Thumshirn
2016-11-25 11:20 ` Eyal Ben David
2016-11-25 11:53 ` Johannes Thumshirn
2016-11-25 12:28 ` Johannes Thumshirn
2016-11-25 12:36 ` Eyal Ben David
2016-11-25 14:46 ` Laurence Oberman [this message]
2016-11-28 10:30 ` Johannes Thumshirn
2016-11-25 17:56 ` Ewan Milne
2016-11-25 18:01 ` Laurence Oberman
2016-11-30 16:26 ` Ewan D. Milne
2016-12-01 13:40 ` Martin K. Petersen
2016-12-02 12:21 ` Christoph Hellwig
2016-12-02 13:29 ` Ewan D. Milne
2016-12-02 14:10 ` Hannes Reinecke
2016-12-02 14:17 ` Laurence Oberman
2016-12-02 19:29 ` Ewan D. Milne
2016-12-02 20:37 ` Ewan D. Milne
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=805036857.58360.1480085165589.JavaMail.zimbra@redhat.com \
--to=loberman@redhat.com \
--cc=bdeyal@gmail.com \
--cc=dgilbert@interlog.com \
--cc=emilne@redhat.com \
--cc=jthumshirn@suse.de \
--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;
as well as URLs for NNTP newsgroup(s).