mirror of
https://github.com/pgsty/minio.git
synced 2026-08-09 07:43:29 +03:00
xl/CreateFile: handle errFileNameTooLong error properly (#1523)
When errFileNameTooLong error is returned from posix, xl.CreateFile() treats the error specially by returning the same error immediately. Fixes #1501
This commit is contained in:
@@ -105,6 +105,14 @@ func (xl XL) writeErasure(volume, path string, reader *io.PipeReader, wcloser *w
|
||||
"volume": volume,
|
||||
"path": path,
|
||||
}).Errorf("CreateFile failed with %s", err)
|
||||
|
||||
// treat errFileNameTooLong specially
|
||||
if err == errFileNameTooLong {
|
||||
xl.cleanupCreateFileOps(volume, path, append(writers, metadataWriters...)...)
|
||||
reader.CloseWithError(err)
|
||||
return
|
||||
}
|
||||
|
||||
createFileError++
|
||||
|
||||
// We can safely allow CreateFile errors up to len(xl.storageDisks) - xl.writeQuorum
|
||||
|
||||
Reference in New Issue
Block a user