From: Stefan Behrens <sbehrens@giantdisaster.de>
To: Chris Mason <chris.mason@fusionio.com>
Cc: Josef Bacik <JBacik@fusionio.com>,
Papp Tamas <tompos@martos.bme.hu>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: oops at mount
Date: Thu, 30 May 2013 16:59:59 +0200 [thread overview]
Message-ID: <51A7696F.8090407@giantdisaster.de> (raw)
In-Reply-To: <20130530140329.23156.38088@localhost.localdomain>
On Thu, 30 May 2013 10:03:29 -0400, Chris Mason wrote:
> Quoting Stefan Behrens (2013-05-30 08:55:58)
>> Papp is using an Intel X18-M/X25-M/X25-V G2 SSD. At least with an Intel
>> X25 SSD that identifies itself with "INTEL SSDSA2M080" and on one with
>> the ID "INTEL SSDSA2M040", I've tested whether they honor the flush
>> request. And these two SSDs don't do so, they ignore it. If you cut the
>> power after a flush request completes, the data that was written before
>> the flush request is gone, the write cache was _not_ flushed.
>>
>> You can only disable the write cache during/after every boot "hdparm -W
>> 0 /dev/sd..." (which reduces the SSDs write speed to about 4 MB/s), or
>> avoid such SSDs, or prepare to restore from backup occasionally.
>
> Hi Stefan,
>
> How did you verify this? I'm sure intel will want to hear about it if
> we can reproduce on all filesystems.
>
> -chris
>
We have written a kernel module that (among others) is able to write 4KB
block of random data at random locations on an SSD, and in a second step
to read and verify that data.
The test procedure to check SSDs is:
1. Write 4KB blocks of random data to random locations on the disk. Send
a submit_bio(REQ_FLUSH) after each 4KB block. Log the completion of the
write request and of the flush request together with the result value.
2. Somewhere in the middle of operation, switch off all power, drive
presence and SAS data pins between the SSD and the SATA host controller.
3. Wait some time, afterwards enable the connection between the SSD and
the host controller again.
4. Read back the 4KB blocks of random data at random locations using the
same seed value that was used to generate the contents and location when
the blocks were written. Verify the data, log whether the verification
succeeded or failed.
5. Compare the log of the write and flush request completion with the
one of the read and verify process.
SSDs that honor the flush request don't cause verify errors for blocks
where the write bio and the flush bio completed successfully. Those two
Intel SSDs that I mentioned failed this test. Other Intel SSD types
succeeded the test.
Maybe a firmware update would fix this issue, I suppose it will, I have
never tried it. My intention was not to blame the SSD manufacturer, in
fact, I like their SSDs very much and buy and use them frequently. I
just wanted to prevent Josef from the headache to question the Btrfs
implementation. The issue that Papp described looks just like a power
failure in conjunction with a storage device that ignores flush requests.
next prev parent reply other threads:[~2013-05-30 14:59 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 11:17 oops at mount Papp Tamas
2013-05-30 12:32 ` Josef Bacik
2013-05-30 12:55 ` Stefan Behrens
2013-05-30 14:03 ` Chris Mason
2013-05-30 14:59 ` Stefan Behrens [this message]
2013-05-30 16:37 ` Chris Mason
2013-06-03 11:56 ` Papp Tamas
2013-06-03 12:13 ` Hugo Mills
2013-05-31 14:55 ` Papp Tamas
2013-05-30 20:08 ` Stefan Behrens
-- strict thread matches above, loose matches on Subject: below --
2007-04-25 15:09 OOPS " Joakim Tjernlund
2007-04-25 15:23 ` David Woodhouse
2007-04-25 15:40 ` Joakim Tjernlund
2007-04-25 15:44 ` David Woodhouse
2007-04-25 15:56 ` Joakim Tjernlund
2007-04-25 16:07 ` David Woodhouse
2007-04-25 17:39 ` Joakim Tjernlund
2007-04-26 6:32 ` David Woodhouse
2007-04-26 8:20 ` Joakim Tjernlund
2007-04-26 8:29 ` David Woodhouse
2007-04-26 9:04 ` Joakim Tjernlund
2007-04-26 9:21 ` David Woodhouse
2007-04-26 11:26 ` Joakim Tjernlund
2007-04-26 11:27 ` David Woodhouse
2007-04-26 11:35 ` Joakim Tjernlund
2007-04-26 11:41 ` David Woodhouse
2007-04-26 12:49 ` Joakim Tjernlund
2007-04-26 12:49 ` David Woodhouse
2007-04-26 11:45 ` Joakim Tjernlund
2007-04-26 11:57 ` David Woodhouse
2007-04-26 12:31 ` David Woodhouse
2007-04-26 12:43 ` Joakim Tjernlund
2007-04-26 12:49 ` David Woodhouse
2007-04-26 13:00 ` Joakim Tjernlund
2007-04-26 13:08 ` David Woodhouse
2007-04-26 13:13 ` Joakim Tjernlund
2007-04-26 13:15 ` David Woodhouse
2007-04-26 13:31 ` David Woodhouse
2007-04-26 13:39 ` Joakim Tjernlund
2007-04-26 13:44 ` David Woodhouse
2007-04-26 13:52 ` Joakim Tjernlund
2007-04-26 13:56 ` David Woodhouse
2007-04-26 14:37 ` Joakim Tjernlund
2007-04-26 19:39 ` David Woodhouse
2007-04-26 20:21 ` Joakim Tjernlund
2007-04-27 9:48 ` David Woodhouse
2007-04-25 15:46 ` David Woodhouse
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=51A7696F.8090407@giantdisaster.de \
--to=sbehrens@giantdisaster.de \
--cc=JBacik@fusionio.com \
--cc=chris.mason@fusionio.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=tompos@martos.bme.hu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.