nfs timeout error
This commit is contained in:
parent
7bb411e7a4
commit
f4f60df6b2
9 changed files with 13 additions and 11 deletions
|
@ -27,7 +27,7 @@ func onGetAttr(ctx context.Context, w *response, userHandle Handler) error {
|
||||||
return &NFSStatusError{NFSStatusNoEnt, err}
|
return &NFSStatusError{NFSStatusNoEnt, err}
|
||||||
}
|
}
|
||||||
if errors.Is(err, context.DeadlineExceeded) {
|
if errors.Is(err, context.DeadlineExceeded) {
|
||||||
return &NFSStatusError{NFSStatusJukebox, err}
|
return &NFSStatusError{timeoutStatus, err}
|
||||||
}
|
}
|
||||||
return &NFSStatusError{NFSStatusIO, err}
|
return &NFSStatusError{NFSStatusIO, err}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ func onRead(ctx context.Context, w *response, userHandle Handler) error {
|
||||||
return &NFSStatusError{NFSStatusNoEnt, err}
|
return &NFSStatusError{NFSStatusNoEnt, err}
|
||||||
}
|
}
|
||||||
if errors.Is(err, context.DeadlineExceeded) {
|
if errors.Is(err, context.DeadlineExceeded) {
|
||||||
return &NFSStatusError{NFSStatusJukebox, err}
|
return &NFSStatusError{timeoutStatus, err}
|
||||||
}
|
}
|
||||||
return &NFSStatusError{NFSStatusAccess, err}
|
return &NFSStatusError{NFSStatusAccess, err}
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,7 +160,7 @@ func getDirListingWithVerifier(ctx context.Context, userHandle Handler, fsHandle
|
||||||
return nil, 0, &NFSStatusError{NFSStatusAccess, err}
|
return nil, 0, &NFSStatusError{NFSStatusAccess, err}
|
||||||
}
|
}
|
||||||
if errors.Is(err, context.DeadlineExceeded) {
|
if errors.Is(err, context.DeadlineExceeded) {
|
||||||
return nil, 0, &NFSStatusError{NFSStatusJukebox, err}
|
return nil, 0, &NFSStatusError{timeoutStatus, err}
|
||||||
}
|
}
|
||||||
return nil, 0, &NFSStatusError{NFSStatusIO, err}
|
return nil, 0, &NFSStatusError{NFSStatusIO, err}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ func onReadLink(ctx context.Context, w *response, userHandle Handler) error {
|
||||||
return &NFSStatusError{NFSStatusNoEnt, err}
|
return &NFSStatusError{NFSStatusNoEnt, err}
|
||||||
}
|
}
|
||||||
if errors.Is(err, context.DeadlineExceeded) {
|
if errors.Is(err, context.DeadlineExceeded) {
|
||||||
return &NFSStatusError{NFSStatusJukebox, err}
|
return &NFSStatusError{timeoutStatus, err}
|
||||||
}
|
}
|
||||||
|
|
||||||
return &NFSStatusError{NFSStatusAccess, err}
|
return &NFSStatusError{NFSStatusAccess, err}
|
||||||
|
|
|
@ -39,7 +39,7 @@ func onRemove(ctx context.Context, w *response, userHandle Handler) error {
|
||||||
return &NFSStatusError{NFSStatusAccess, err}
|
return &NFSStatusError{NFSStatusAccess, err}
|
||||||
}
|
}
|
||||||
if errors.Is(err, context.DeadlineExceeded) {
|
if errors.Is(err, context.DeadlineExceeded) {
|
||||||
return &NFSStatusError{NFSStatusJukebox, err}
|
return &NFSStatusError{timeoutStatus, err}
|
||||||
}
|
}
|
||||||
return &NFSStatusError{NFSStatusIO, err}
|
return &NFSStatusError{NFSStatusIO, err}
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ func onRemove(ctx context.Context, w *response, userHandle Handler) error {
|
||||||
return &NFSStatusError{NFSStatusAccess, err}
|
return &NFSStatusError{NFSStatusAccess, err}
|
||||||
}
|
}
|
||||||
if errors.Is(err, context.DeadlineExceeded) {
|
if errors.Is(err, context.DeadlineExceeded) {
|
||||||
return &NFSStatusError{NFSStatusJukebox, err}
|
return &NFSStatusError{timeoutStatus, err}
|
||||||
}
|
}
|
||||||
return &NFSStatusError{NFSStatusIO, err}
|
return &NFSStatusError{NFSStatusIO, err}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ func onRename(ctx context.Context, w *response, userHandle Handler) error {
|
||||||
return &NFSStatusError{NFSStatusNoEnt, err}
|
return &NFSStatusError{NFSStatusNoEnt, err}
|
||||||
}
|
}
|
||||||
if errors.Is(err, context.DeadlineExceeded) {
|
if errors.Is(err, context.DeadlineExceeded) {
|
||||||
return &NFSStatusError{NFSStatusJukebox, err}
|
return &NFSStatusError{timeoutStatus, err}
|
||||||
}
|
}
|
||||||
return &NFSStatusError{NFSStatusIO, err}
|
return &NFSStatusError{NFSStatusIO, err}
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ func onRename(ctx context.Context, w *response, userHandle Handler) error {
|
||||||
return &NFSStatusError{NFSStatusNoEnt, err}
|
return &NFSStatusError{NFSStatusNoEnt, err}
|
||||||
}
|
}
|
||||||
if errors.Is(err, context.DeadlineExceeded) {
|
if errors.Is(err, context.DeadlineExceeded) {
|
||||||
return &NFSStatusError{NFSStatusJukebox, err}
|
return &NFSStatusError{timeoutStatus, err}
|
||||||
}
|
}
|
||||||
return &NFSStatusError{NFSStatusIO, err}
|
return &NFSStatusError{NFSStatusIO, err}
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ func onRename(ctx context.Context, w *response, userHandle Handler) error {
|
||||||
return &NFSStatusError{NFSStatusAccess, err}
|
return &NFSStatusError{NFSStatusAccess, err}
|
||||||
}
|
}
|
||||||
if errors.Is(err, context.DeadlineExceeded) {
|
if errors.Is(err, context.DeadlineExceeded) {
|
||||||
return &NFSStatusError{NFSStatusJukebox, err}
|
return &NFSStatusError{timeoutStatus, err}
|
||||||
}
|
}
|
||||||
return &NFSStatusError{NFSStatusIO, err}
|
return &NFSStatusError{NFSStatusIO, err}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ func onSetAttr(ctx context.Context, w *response, userHandle Handler) error {
|
||||||
return &NFSStatusError{NFSStatusNoEnt, err}
|
return &NFSStatusError{NFSStatusNoEnt, err}
|
||||||
}
|
}
|
||||||
if errors.Is(err, context.DeadlineExceeded) {
|
if errors.Is(err, context.DeadlineExceeded) {
|
||||||
return &NFSStatusError{NFSStatusJukebox, err}
|
return &NFSStatusError{timeoutStatus, err}
|
||||||
}
|
}
|
||||||
return &NFSStatusError{NFSStatusAccess, err}
|
return &NFSStatusError{NFSStatusAccess, err}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ func onWrite(ctx context.Context, w *response, userHandle Handler) error {
|
||||||
return &NFSStatusError{NFSStatusNoEnt, err}
|
return &NFSStatusError{NFSStatusNoEnt, err}
|
||||||
}
|
}
|
||||||
if errors.Is(err, context.DeadlineExceeded) {
|
if errors.Is(err, context.DeadlineExceeded) {
|
||||||
return &NFSStatusError{NFSStatusJukebox, err}
|
return &NFSStatusError{timeoutStatus, err}
|
||||||
}
|
}
|
||||||
return &NFSStatusError{NFSStatusAccess, err}
|
return &NFSStatusError{NFSStatusAccess, err}
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,6 +80,8 @@ func (n NFSProcedure) String() string {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const timeoutStatus = NFSStatusIO
|
||||||
|
|
||||||
// NFSStatus (nfsstat3) is a result code for nfs rpc calls
|
// NFSStatus (nfsstat3) is a result code for nfs rpc calls
|
||||||
type NFSStatus uint32
|
type NFSStatus uint32
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue