Detect underlying disk mount/unmount (#8408)

This commit is contained in:
Krishna Srinivas
2019-10-25 10:37:53 -07:00
committed by kannappanr
parent 8aaaa46be9
commit 980bf78b4d
13 changed files with 415 additions and 239 deletions

View File

@@ -99,7 +99,11 @@ func deleteBucketMetadata(ctx context.Context, bucket string, objAPI ObjectLayer
// Depending on the disk type network or local, initialize storage API.
func newStorageAPI(endpoint Endpoint) (storage StorageAPI, err error) {
if endpoint.IsLocal {
return newPosix(endpoint.Path)
storage, err := newPosix(endpoint.Path)
if err != nil {
return nil, err
}
return &posixDiskIDCheck{storage: storage}, nil
}
return newStorageRESTClient(endpoint)