Skip building directio on platforms that don't support Direct IO (#9059)

This commit is contained in:
Kody A Kantor
2020-03-12 20:57:41 -05:00
committed by GitHub
parent 603cf2a8bb
commit 06e30b5aa1
6 changed files with 49 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
/*
* Minio Cloud Storage, (C) 2019 Minio, Inc.
* Minio Cloud Storage, (C) 2019-2020 Minio, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,3 +34,8 @@ func DisableDirectIO(f *os.File) error {
_, err := unix.FcntlInt(fd, unix.F_NOCACHE, 0)
return err
}
// AlignedBlock - pass through to directio implementation.
func AlignedBlock(BlockSize int) []byte {
return directio.AlignedBlock(BlockSize)
}