Add support of fallocate for FS and XL backends (#3032)

This commit is contained in:
Anis Elleuch
2016-10-29 20:44:44 +01:00
committed by Harshavardhana
parent 0b3282ac9f
commit a47ce7ab22
17 changed files with 415 additions and 50 deletions

View File

@@ -186,6 +186,18 @@ func (n networkStorage) DeleteVol(volume string) error {
// File operations.
func (n networkStorage) PrepareFile(volume, path string, length int64) (err error) {
reply := GenericReply{}
if err = n.rpcClient.Call("Storage.PrepareFileHandler", &PrepareFileArgs{
Vol: volume,
Path: path,
Size: length,
}, &reply); err != nil {
return toStorageErr(err)
}
return nil
}
// CreateFile - create file.
func (n networkStorage) AppendFile(volume, path string, buffer []byte) (err error) {
reply := GenericReply{}