call-stub: remove fall-through in ftruncate
Change-Id: I58bf6b881ff63d627051bef1ab30bd0337ab65e2 BUG: 913544 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4564 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
This commit is contained in:
parent
4e15a0b418
commit
96c61c5512
@ -2487,6 +2487,7 @@ call_resume_unwind (call_stub_t *stub)
|
||||
case GF_FOP_FTRUNCATE:
|
||||
STUB_UNWIND (stub, ftruncate, &stub->args_cbk.prestat,
|
||||
&stub->args_cbk.poststat, stub->args_cbk.xdata);
|
||||
break;
|
||||
case GF_FOP_FSTAT:
|
||||
STUB_UNWIND (stub, fstat, &stub->args_cbk.stat,
|
||||
stub->args_cbk.xdata);
|
||||
|
24
tests/bugs/bug-913544.t
Normal file
24
tests/bugs/bug-913544.t
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
. $(dirname $0)/../include.rc
|
||||
. $(dirname $0)/../volume.rc
|
||||
|
||||
cleanup;
|
||||
|
||||
#simulate a split-brain of a file and do truncate. This should not crash the mount point
|
||||
TEST glusterd
|
||||
TEST pidof glusterd
|
||||
TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}0 $H0:$B0/${V0}1
|
||||
TEST $CLI volume set $V0 stat-prefetch off
|
||||
TEST $CLI volume start $V0
|
||||
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0
|
||||
cd $M0
|
||||
TEST touch a
|
||||
#simulate no-changelog data split-brain
|
||||
echo "abc" > $B0/${V0}1/a
|
||||
echo "abcd" > $B0/${V0}0/a
|
||||
TEST ! truncate -s 0 a
|
||||
TEST ls
|
||||
cd
|
||||
|
||||
cleanup
|
Loading…
x
Reference in New Issue
Block a user