Skip to content

cifs: cache invalidation fixes for cifs with cache=loose

Jeff Layton linux-cifs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4cifs: convert booleans in cifsInodeInfo to a flags fieldfs/cifs/cifsfs.c fs/cifs/cifsglob.h fs/cifs/file.c +1 more+17 -141 reply
2/4cifs: new helper function: cifs_revalidate_mappingfs/cifs/cifsfs.h fs/cifs/inode.c+11 -62 replies
3/4cifs: fix potential races in cifs_revalidate_mappingfs/cifs/cifsfs.h fs/cifs/cifsglob.h fs/cifs/file.c +1 more+49 -152 replies
4/4cifs: revalidate mapping prior to satisfying aio_read requestfs/cifs/cifsfs.c+16 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] cifs: cache invalidation fixes for cifs with cache=loose

This patchset fixes up some cache invalidation problems that can occur when cache=loose. The main point is to ensure that we revalidate the cache prior to satisfying a read.

At the same time, I added a fix for a potential problem that cropped up with NFS a while back, and to which CIFS is also vulnerable.

This was originally reported by Tetsuo Handa, and as far as I can tell this fixes his testcase, assuming that you also ensure that kernel oplocks are enabled.

Jeff Layton (4):
cifs: convert booleans in cifsInodeInfo to a flags field
cifs: new helper function: cifs_revalidate_mapping
cifs: fix potential races in cifs_revalidate_mapping
cifs: revalidate mapping prior to satisfying aio_read request

 fs/cifs/cifsfs.c   | 21 +++++++++++++---
 fs/cifs/cifsfs.h   |  2 ++
 fs/cifs/cifsglob.h |  6 +++--
 fs/cifs/file.c     | 16 ++++++------
 fs/cifs/inode.c    | 71 ++++++++++++++++++++++++++++++++++++++++++------------
 5 files changed, 86 insertions(+), 30 deletions(-)
Signature · 1 line
1.9.0