Commit graph

5 commits

Author SHA1 Message Date
Marko Mäkelä
617dee3488 MDEV-26042 Atomic write capability is not detected correctly
my_init_atomic_write(): Detect all forms of SSD, in case multiple
types of devices are installed in the same machine.
This was broken in commit ed008a74cf
and further in commit 70684afef2.

SAME_DEV(): Match block devices, ignoring partition numbers.

Let us use stat() instead of lstat(), in case someone has a symbolic
link in /dev.

Instead of reporting errors with perror(), let us use fprintf(stderr)
with the file name, the impact of the error, and the strerror(errno).
Because this code is specific to Linux, we may depend on the
GNU libc/uClibc/musl extension %m for strerror(errno).
2021-06-29 15:04:27 +03:00
Qi Wu
70684afef2 Atomic write support for ScaleFlux NVMe SSD's 2020-07-03 22:42:10 +03:00
Vladislav Vaintroub
60bd353bdf Fixes for atomic writes on Windows.
Windows does atomic writes, as long as they are aligned and multiple
of sector size. this is documented in MSDN.

Fix innodb.doublewrite test to always use doublewrite buffer,
(even if atomic writes are autodetected)
2019-05-06 11:32:17 +00:00
Otto Kekäläinen
c9c28bef3c Minor spelling fixes in code comments, docs and output
This commit does not touch any variable names or any other actual code,
and thus should not in any way affect how the code works.
2018-01-12 16:49:02 +02:00
Sergei Golubchik
ed008a74cf Make atomic writes general
- Atomic writes are enabled by default
- Automatically detect if device supports atomic write and use it if
  atomic writes are enabled
- Remove ATOMIC WRITE options from CREATE TABLE
  - Atomic write is a device option, not a table options as the table may
    crash if the media changes
- Add support for SHANNON SSD cards
2017-01-11 09:18:35 +02:00