[Bugs] [Bug 1524252] New: quick-read: Discard cache for fallocate, zerofill and discard ops
bugzilla at redhat.com
bugzilla at redhat.com
Mon Dec 11 04:22:52 UTC 2017
https://bugzilla.redhat.com/show_bug.cgi?id=1524252
Bug ID: 1524252
Summary: quick-read: Discard cache for fallocate, zerofill and
discard ops
Product: GlusterFS
Version: mainline
Component: quick-read
Assignee: sprabhu at redhat.com
Reporter: sprabhu at redhat.com
CC: bugs at gluster.org
Blocks: 1523599
While testing a patch for RFE to add fallocate support to vfs_glusterfs in
samba-rhgs, I hit a problem with the read cache created by quick-read not being
invalidated in case of glfs_fallocate() or glfs_discard().
To reproduce:
1) untar the attached reproducer.
2) Build the test programs with make all
3) Edit fields in Makefile to set hostname, volume and/or filename/logfile name
for test.
4) Run test with make test.
The command writes a 2Kb file with pattern 0x11 for each byte written to the
file.
The second call to t_readv first calls discard on half the file. It then reads
the file and checks the bytes on the file for 0 in the first half and 1s on the
second half.
Expected:
# make test
./t_write vm140-111 gv0 test211 log
./t_readv vm140-111 gv0 test211 log
Success
Actual Result:
# make test
./t_write vm140-111 gv0 test211 log
./t_readv vm140-111 gv0 test211 log
char at position 0 not zeroed out
make: *** [test] Error 251
Attached patch invalidates the cache in quick-read when fallocate, discard or
zerofill operations are called.
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=0hfRkRjfDU&a=cc_unsubscribe
More information about the Bugs
mailing list