mirror of
https://github.com/pgsty/minio.git
synced 2026-07-22 21:50:22 +03:00
[feat]: use DSYNC for xl.meta writes and NOATIME for reads (#11615)
Instead of using O_SYNC, we are better off using O_DSYNC instead since we are only ever interested in data to be persisted to disk not the associated filesystem metadata. For reads we ask customers to turn off noatime, but instead we can proactively use O_NOATIME flag to avoid atime updates upon reads.
This commit is contained in:
@@ -109,6 +109,10 @@ func readDirFn(dirPath string, fn func(name string, typ os.FileMode) error) erro
|
||||
if isSysErrNotDir(err) {
|
||||
return nil
|
||||
}
|
||||
err = osErrToFileErr(err)
|
||||
if err == errFileNotFound {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
if nbuf <= 0 {
|
||||
@@ -183,7 +187,7 @@ func readDirN(dirPath string, count int) (entries []string, err error) {
|
||||
if isSysErrNotDir(err) {
|
||||
return nil, errFileNotFound
|
||||
}
|
||||
return nil, err
|
||||
return nil, osErrToFileErr(err)
|
||||
}
|
||||
if nbuf <= 0 {
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user