Fix data corruption at oplock break handler
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 8 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | Add oplock_break to smb_version_operationsfs/ fs/ fs/ +2 more | +106 | 8 replies | |
| 2/2 | cifs: Wait for writebacks to complete before attempting write.fs/ fs/ fs/ +5 more | +158 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
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