Project

General

Profile

Bug #11009

delete_on_close should be acted on earlier

Added by Gordon Ross 5 months ago. Updated 4 months ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

During testing of SMB durable handles, we discovered files that still exist when the test expected them to have been deleted.

Steps to Reproduce:
This was found when running smbtorture's durable handle delete-on-close tests.
It's easiest to test this in combination with the durable handles work.

smbtorture ... smb2.durable-open.delete_on_close1
smbtorture ... smb2.durable-open.delete_on_close2

Expected Results:
pass
Actual Results:
fail

History

#1

Updated by Gordon Ross 5 months ago

  • Description updated (diff)
  • Status changed from New to In Progress

The SMB server doesn't actually delete files that have been marked "delete on close" until we destroy the ofile object associated with that file. That happens long after the last close, when cleaning up resources associated with an SMB request. We should perform the delete earlier when the last ofile is closed.

#2

Updated by Gordon Ross 5 months ago

Testing: Easiest verification is with (later) durable handles.
Fix in production since early 2016

#3

Updated by Electric Monk 4 months ago

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

git commit 49d8359737352b52625c23836d8a4be4ae8e55dd

commit  49d8359737352b52625c23836d8a4be4ae8e55dd
Author: Matt Barden <matt.barden@nexenta.com>
Date:   2019-06-08T03:01:40.000Z

    11009 delete_on_close should be acted on earlier
    Reviewed by: Gordon Ross <gwr@nexenta.com>
    Approved by: Garrett D'Amore <garrett@damore.org>

Also available in: Atom PDF