services:
- rgw
with_legacy: true
+- name: rgw_d4n_l1_write_open_flags
+ type: uint
+ level: advanced
+ desc: cache files write 'man 2 open' 'file status flags' modifiers
+ long_desc: For example, to configure synchronized I/O, fcntl-linux.h defines (converted from octal)
+ O_SYNC = 1052672
+ O_DSYNC = 4096
+ (0 for no modification of the flags)
+ default: 1052672
+ services:
+ - rgw
+ with_legacy: true
- name: rgw_d4n_libaio_aio_threads
type: int
level: advanced
cb.reset(new struct aiocb);
memset(cb.get(), 0, sizeof(struct aiocb));
mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
- r = fd = TEMP_FAILURE_RETRY(::open(file_path.c_str(), O_WRONLY | O_CREAT | O_TRUNC, mode));
+ r = fd = TEMP_FAILURE_RETRY(::open(file_path.c_str(), O_WRONLY | O_CREAT | O_TRUNC | dpp->get_cct()->_conf->rgw_d4n_l1_write_open_flags, mode));
if (fd < 0) {
//directories might have been deleted by a parallel delete of the last version of an object
if (errno == ENOENT) {
}
ldpp_dout(dpp, 20) << "INFO: AsyncWriteRequest::prepare_libaio_write_op: dir_path for creating directories=" << dir_path << dendl;
create_directories(dpp, dir_path);
- r = fd = TEMP_FAILURE_RETRY(::open(file_path.c_str(), O_WRONLY | O_CREAT | O_TRUNC, mode));
+ r = fd = TEMP_FAILURE_RETRY(::open(file_path.c_str(), O_WRONLY | O_CREAT | O_TRUNC | dpp->get_cct()->_conf->rgw_d4n_l1_write_open_flags, mode));
if (fd < 0) {
ldpp_dout(dpp, 0) << "ERROR: AsyncWriteRequest::prepare_libaio_write_op: open file failed, errno=" << errno << ", location='" << file_path.c_str() << "'" << dendl;
return r;