mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
fix(objnode): file delete lock
Signed-off-by: tangdeyi <tangdeyi@oppo.com>
This commit is contained in:
parent
41e860990b
commit
50fc530c80
@ -114,6 +114,9 @@ func (o *ObjectNode) errorResponse(w http.ResponseWriter, r *http.Request, err e
|
||||
if err == syscall.EDQUOT || err == syscall.ENOSPC {
|
||||
ec = DiskQuotaExceeded
|
||||
}
|
||||
if err == syscall.EPERM {
|
||||
ec = FileDeleteLock
|
||||
}
|
||||
if ec1, ok := err.(*ErrorCode); ok && ec == nil {
|
||||
ec = ec1
|
||||
}
|
||||
|
||||
@ -131,6 +131,7 @@ var (
|
||||
InvalidMaxPartNumber = &ErrorCode{"InvalidRequest", "the total part numbers exceed limit.", http.StatusBadRequest}
|
||||
InvalidMinPartNumber = &ErrorCode{"InvalidRequest", "you must specify at least one part.", http.StatusBadRequest}
|
||||
DiskQuotaExceeded = &ErrorCode{"DiskQuotaExceeded", "Disk Quota Exceeded.", http.StatusBadRequest}
|
||||
FileDeleteLock = &ErrorCode{"FileDeleteLock", "Operation not permitted.", http.StatusBadRequest}
|
||||
)
|
||||
|
||||
func HttpStatusErrorCode(code int) *ErrorCode {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user