Bug 1381968

Summary: md-cache: Invalidate cache entry in case of OPEN with O_TRUNC
Product: Red Hat Gluster Storage Reporter: Soumya Koduri <skoduri>
Component: md-cacheAssignee: Soumya Koduri <skoduri>
Status: CLOSED ERRATA QA Contact: surabhi <sbhaloth>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rhgs-3.2CC: jthottan, rhinduja, rhs-bugs, rjoseph
Target Milestone: ---Keywords: Triaged
Target Release: RHGS 3.2.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: glusterfs-3.8.4-4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-23 06:08:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1382266, 1391448, 1391450, 1391451    
Bug Blocks: 1351528, 1380742    

Description Soumya Koduri 2016-10-05 12:49:54 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Soumya Koduri 2016-10-05 12:52:16 UTC
Sorry. By mistake the bug got filed before I filled up description. 

Description of problem:

In case if there is open() done on a file with O_TRUNC posix flag passed, the backend server truncates the file, resulting in change of size of the file. This case needs to be handled by md-cache and should invalidate its cache-entry accordingly.

Comment 3 Soumya Koduri 2016-10-06 07:48:22 UTC
Patch posted upstream for review - 

http://review.gluster.org/15618

Comment 8 surabhi 2016-11-23 12:06:39 UTC
As discussed with Soumya, executed pynfs test suite with latest build and the OPEN test is passed without any issues.

Moving the BZ to verified.

Comment 10 errata-xmlrpc 2017-03-23 06:08:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2017-0486.html