Project

General

Profile

Actions

Bug #13874

closed

SMB durable handle reclaim lease sometimes fails

Added by Gordon Ross almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

While investigating another problem we noticed that when more than one durable handle shares a lease, only one of them (the lease owner) can be reclaimed.

Actions #1

Updated by Gordon Ross almost 2 years ago

The error here is from something missed when leases were added.
In the function smb_dh_should_save, we need to look at the state of
the lease when a durable handle has a lease. When a DH has a lease,
the oplock "grant" is stored in the lease (ls_state) and when the DH
is an ordinary oplock, the "grant" is in f_oplock.og_state (simple fix).

Actions #2

Updated by Electric Monk almost 2 years ago

  • Gerrit CR set to 1548
Actions #3

Updated by Gordon Ross almost 2 years ago

Tested with the smbtorture test case "smb2.lease.durable_upgrade" (now passes)

Actions #4

Updated by Electric Monk almost 2 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 0ce4dc6f60780f39ce4f196fc1b9804379141eb7

commit  0ce4dc6f60780f39ce4f196fc1b9804379141eb7
Author: Gordon Ross <gordon.ross@tintri.com>
Date:   2021-07-15T19:43:31.000Z

    13874 SMB durable handle reclaim lease sometimes fails
    Reviewed by: Matt Barden <mbarden@tintri.com>
    Reviewed by: Prashanth Badari <prbadari@tintri.com>
    Reviewed by: Andrew Stormont <astormont@racktopsystems.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Garrett D'Amore <garrett@damore.org>

Actions

Also available in: Atom PDF