quick-read: prune cache on write/[f]truncate
Cache needs to be pruned on write and [f]truncate. The lack of this is causing Samba ping-pong test to return wierd 'data increment' values during startup. Change-Id: I9cd6a839bcd02de738d78638211b78f382f58e0a BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5033 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
This commit is contained in:
parent
9a1a4e6399
commit
27b457fad2
@ -621,6 +621,46 @@ wind:
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
qr_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *iov,
|
||||
int count, off_t offset, uint32_t flags, struct iobref *iobref,
|
||||
dict_t *xdata)
|
||||
{
|
||||
qr_inode_prune (this, fd->inode);
|
||||
|
||||
STACK_WIND (frame, default_writev_cbk,
|
||||
FIRST_CHILD (this), FIRST_CHILD (this)->fops->writev,
|
||||
fd, iov, count, offset, flags, iobref, xdata);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
qr_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset,
|
||||
dict_t *xdata)
|
||||
{
|
||||
qr_inode_prune (this, loc->inode);
|
||||
|
||||
STACK_WIND (frame, default_truncate_cbk,
|
||||
FIRST_CHILD (this), FIRST_CHILD (this)->fops->truncate,
|
||||
loc, offset, xdata);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
qr_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
|
||||
dict_t *xdata)
|
||||
{
|
||||
qr_inode_prune (this, fd->inode);
|
||||
|
||||
STACK_WIND (frame, default_ftruncate_cbk,
|
||||
FIRST_CHILD (this), FIRST_CHILD (this)->fops->ftruncate,
|
||||
fd, offset, xdata);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
qr_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags,
|
||||
fd_t *fd, dict_t *xdata)
|
||||
@ -1066,6 +1106,9 @@ struct xlator_fops fops = {
|
||||
.readdirp = qr_readdirp,
|
||||
.open = qr_open,
|
||||
.readv = qr_readv,
|
||||
.writev = qr_writev,
|
||||
.truncate = qr_truncate,
|
||||
.ftruncate = qr_ftruncate
|
||||
};
|
||||
|
||||
struct xlator_cbks cbks = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user