[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#7682) LMDB: [PATCH] mdb_env_copy should retry open() if O_DIRECT fails



Full_Name: Salvador Ortiz
Version: 24
OS: Linux
URL: ftp://ftp.msg.com.mx/pub/varios/0001-In-mdb_env_copy-retry-open-if-O_DIRECT-fails.patch
Submission from: (NULL) (187.162.45.111)


If the OS defines O_DIRECT mdb_env_copy unconditionally uses it, but according
to open(2): "Some  file  systems  may  not implement the flag and open() will
fail with EINVAL if it is used."

In this cases mdb_env_copy should retry without the flag.

The attached patch implements that.