Skip to content

Fix data corruption at oplock break handler

Sachin Prabhu linux-cifs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Add oplock_break to smb_version_operationsfs/cifs/cifsglob.h fs/cifs/cifsproto.h fs/cifs/file.c +2 more+106 -528 replies
2/2cifs: Wait for writebacks to complete before attempting write.fs/cifs/cifsfs.c fs/cifs/cifsglob.h fs/cifs/cifsproto.h +5 more+158 -90 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/2] Fix data corruption at oplock break handler

Fix data corruption at oplock break handler.

To avoid data corruption, we have to avoid changing the oplock value for a particular file until existing writer threads have quit. For that reason, we move the set_oplock_value to the oplock_break handler. Since the values used for the oplock break vary according to the protocol versions, we need to have protocol specific oplock_break handlers.

I have successfully tested this against a reproducer we have for both SMB1 and SMB2.

Sachin Prabhu (2):
Add oplock_break to smb_version_operations
cifs: Wait for writebacks to complete before attempting write.

 fs/cifs/cifsfs.c    | 14 +++++++++-
 fs/cifs/cifsglob.h  |  9 +++++--
 fs/cifs/cifsproto.h |  5 ++++
 fs/cifs/file.c      | 69 ++++++++++++-------------------------------------
 fs/cifs/misc.c      | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++--
 fs/cifs/smb1ops.c   | 65 ++++++++++++++++++++++++++++++++++++++++++++++
 fs/cifs/smb2misc.c  | 18 ++++++++++---
 fs/cifs/smb2ops.c   | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 264 insertions(+), 61 deletions(-)
Signature · 1 line
1.8.4.2