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) 2018-2019 MinIO, Inc.
* MinIO Cloud Storage, (C) 2018-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.
@@ -18,8 +18,6 @@ package disk
import (
"os"
"github.com/ncw/directio"
)
// Info stat fs struct is container which holds following values
@@ -73,7 +71,7 @@ func doPerfMeasure(fsPath string, size int64) (writeSpeed, readSpeed float64, er
}
// Fetch aligned buf for direct-io
buf := directio.AlignedBlock(speedTestBlockSize)
buf := AlignedBlock(speedTestBlockSize)
writeSpeed, err = speedTestWrite(w, buf, size)
w.Close()