Bug 202785
Summary: | CIFS: fsx domapread or doread test failed | ||
---|---|---|---|
Product: | File System | Reporter: | Xiaoli Feng (fengxiaoli0714) |
Component: | CIFS | Assignee: | fs_cifs (fs_cifs) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | ||
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 5.0.0+ | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Xiaoli Feng
2019-03-06 11:57:34 UTC
Fixed patch: commit 6dfbd84684700cb58b34e8602c01c12f3d2595c8 Author: Pavel Shilovsky <piastryyy@gmail.com> Date: Mon Mar 4 17:48:01 2019 -0800 CIFS: Fix read after write for files with read caching When we have a READ lease for a file and have just issued a write operation to the server we need to purge the cache and set oplock/lease level to NONE to avoid reading stale data. Currently we do that only if a write operation succedeed thus not covering cases when a request was sent to the server but a negative error code was returned later for some other reasons (e.g. -EIOCBQUEUED or -EINTR). Fix this by turning off caching regardless of the error code being returned. The patches fixes generic tests 075 and 112 from the xfs-tests. Cc: <stable@vger.kernel.org> Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> |