You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: disk_avail.go
    path of file: ./repos/memphis/server
    
    the code of the file until where you have to start completion: // Copyright 2020-2022 The NATS Authors
// L
    
func diskAvailable(storeDir string) int64 {
	var ba int64
	if _, err := os.Stat(storeDir); os.IsNotExist(err) {
		os.MkdirAll(storeDir, defaultDirPerms)
	}
	var fs syscall.Statfs_t
	if err := syscall.Statfs(storeDir, &fs); err == nil {
		// Estimate 95% of available storage. // ** changed to 95 by Memphis
		ba = int64(uint64(fs.Blocks) * uint64(fs.Bsize) / 20 * 19) // ** changed to 95% by Memphis **
	} else {
		// Used 1TB default as a guess if all else fails.
		ba = JetStreamMaxStoreDefault
	}
	return ba
}