diff options
| author | N Balachandran <nbalacha@redhat.com> | 2015-12-16 21:09:22 +0530 |
|---|---|---|
| committer | gluster-ant <bugzilla-bot@gluster.org> | 2015-12-16 21:09:22 +0530 |
| commit | 82e48772c641a0298bb3da5fa9e9094dde6bfe21 (patch) | |
| tree | aa5b24f98c274a6005428ed6903f21e4ba2fab68 /cli/src/cli-cmd-parser.c | |
| parent | 326f40898f5cd029276bba72a2b715f3961f0758 (diff) | |
cluster/dht : Ftruncate on migrating file fails with EINVAL
What:
If dht_open is called on a migrating file after the inode_ctx is set,
subsequent FOPs on that fd do not open the fd on the dst subvol.
This is seen when the open-ftruncate-close sequence is repeatedly
called on a migrating file.
A second call to the sequence described above causes dht_truncate_cbk
to call dht_truncate2 as the dht_inode_ctx was already set by the first
call. As dht_rebalance_in_progress_check is not called, the fd is not
opened on the dst subvol.
On a distributed-replicate volume, this causes AFR to
open the fd using afr_fix_open, but with the wrong flags, causing
posix_ftruncate to fail with EINVAL.
The fix: We require fd specific information to make a decision while
handling migrating files.
Set the fd_ctx to indicate the fd has been opened on the dst subvol
and check if it has been set while processing Phase1/Phase2 checks
in the FOP callback functions.
Change-Id: I43cdcd8017b4a11e18afdd210469de7cd9a5ef14
BUG: 1284823
Signed-off-by: N Balachandran <nbalacha@redhat.com>
Reviewed-on: http://review.gluster.org/12985
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'cli/src/cli-cmd-parser.c')
0 files changed, 0 insertions, 0 deletions
