Directory Tree Deletion Without Per-File Open-Close Overhead

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional methods for deleting large numbers of files in a directory tree involve significant overhead due to the need to open, mark for deletion, and close each file, which is particularly problematic with low-latency storage media like NVME, increasing latency for the operating system and users.

Innovation Solution

A file system operation that allows for the deletion of a directory tree without opening each file, utilizing a directory tree delete attribute and performing security checks to authorize the deletion, with the option for foreground or deferred deletion methods.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the conventional approach of opening, marking for deletion, and closing each file is used to delete files in a directory tree, then security checks and file operations can be performed on each file, but the latency and overhead increase significantly when deleting large numbers of files

Engineering Contradiction:
Improvesecurity check completenessVSAvoiddeletion latency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the file deletion process into two distinct phases: a security validation phase that performs comprehensive security checks on all files in the directory tree, and a deletion execution phase that actually deletes the files. This segmentation allows security checks to be performed thoroughly without requiring each file to be opened and closed individually during the deletion process, thereby reducing latency while maintaining security completeness.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary security validation on all files in the directory tree before actual deletion occurs. The system validates security tokens, checks access control lists, and confirms deletion authorization for all target files in advance. This preliminary action ensures that when deletion is executed, it can proceed efficiently without repeated security checks during the actual file removal process.

Inventive Principle:
Principle #10Preliminary action

2Ease of operation

If each file in a directory tree is opened, marked for deletion, and closed individually, then proper file handling and security validation can be performed, but the overhead for opening and closing files increases significantly

Engineering Contradiction:
Improvefile handling correctnessVSAvoidoperating system overhead
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The patent extracts the essential file handling requirements from the conventional open-mark-close process. Instead of requiring each file to be opened and closed individually, the system extracts and validates the necessary security and authorization information (tokens, access control lists) during a preliminary validation phase. This extraction allows the actual deletion to proceed without the overhead of repeated file opening and closing operations, while still ensuring proper file handling correctness.

Inventive Principle:
Principle #2Taking out (Extraction)

3Reliability

If comprehensive security checks are performed on each file during deletion, then authorization can be verified, but the time and resources required for validation increase

Engineering Contradiction:
Improveauthorization verificationVSAvoiddeletion speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent performs comprehensive security validation and authorization verification as a preliminary action before actual file deletion. The system validates security tokens, checks access control lists, and confirms deletion authorization for all files in the directory tree during an initial validation phase. Once validation is complete and authorization is confirmed, the actual deletion process can proceed rapidly without repeated security checks, thereby maintaining high reliability while improving deletion speed.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12499089B2Directory tree delete as a supported file system operation
Publication Date: 2025.12.16 MICROSOFT TECHNOLOGY LICENSING LLC
  • US12499089B2 patent drawing
  • US12499089B2 patent drawing
  • US12499089B2 patent drawing

AI summary

The system described herein introduces a file system operation that enables a file system to delete a directory tree without the overhead associated with opening each file in the directory tree, marking the file for deletion, and closing the file. Accordingly, the file system is able to delete directories and files in the directory tree independent of communicating with, and being transparent to, filter drivers in the operating system. The file system operation is implemented via a directory tree delete attribute included in a request for deletion of a directory tree. The file system can perform the file system operation in a foreground manner or in a deferred manner based on the directory tree delete attribute respectively specifying foreground deletion or deferred deletion. By operating on files and directories in a single invocation, the file system can optimize overheads related to security checks and data transfer across a user-to-kernel boundary.