summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/src/fuse-resolve.c
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2014-08-28 12:33:01 -0400
committerKaleb KEITHLEY <kkeithle@redhat.com>2014-09-02 04:30:47 -0700
commit1d4ef0b891899e3a6dbc8c2087e73cee6f5a7fbe (patch)
treeffecc156761ac38cbd2ed48d8fc0af0b7dac26f1 /xlators/mount/fuse/src/fuse-resolve.c
parentf0ddba7e0913db505f1295e9b3b7d35ead9c4407 (diff)
mount/fuse: Handle fd resolution failuresv3.4.6beta1
Backport from http://review.gluster.org/#/c/8402, BZ 1126048 Problem: Even when the fd resolution failed, the fop is continuing on the new graph which may not have valid inode. This lead to NULL layout subvols in dht which lead to crash in fsync after graph migration. Fix: - Remove resolution error handling in FUSE_FOP as it was only added to handle fd migration failures. - check in fuse_resolve_done for fd resolution failures and fail the fop right away. - loc resolution failures are already handled in the corresponding fops. - Return errno from state->resolve.op_errno in resume functions. - Send error to fuse on frame allocation failures. - Removed unused variable state->resolved - Removed unused macro FUSE_FOP_COOKIE Change-Id: I3f3129b9b4fc34ff1fe07218e6924a027346a95e BUG: 1123289 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/8562 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/mount/fuse/src/fuse-resolve.c')
-rw-r--r--xlators/mount/fuse/src/fuse-resolve.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/xlators/mount/fuse/src/fuse-resolve.c b/xlators/mount/fuse/src/fuse-resolve.c
index 8565ce0..2eea7da5 100644
--- a/xlators/mount/fuse/src/fuse-resolve.c
+++ b/xlators/mount/fuse/src/fuse-resolve.c
@@ -653,19 +653,6 @@ fuse_resolve (fuse_state_t *state)
}
-static int
-fuse_resolve_done (fuse_state_t *state)
-{
- fuse_resume_fn_t fn = NULL;
-
- fn = state->resume_fn;
-
- fn (state);
-
- return 0;
-}
-
-
/*
* This function is called multiple times, once per resolving one location/fd.
* state->resolve_now is used to decide which location/fd is to be resolved now
@@ -689,7 +676,7 @@ fuse_resolve_all (fuse_state_t *state)
} else if (state->resolve_now == &state->resolve2) {
- fuse_resolve_done (state);
+ fuse_fop_resume (state);
} else {
gf_log ("fuse-resolve", GF_LOG_ERROR,