Shared Filesystem Metadata Caching with Version Validation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In virtualized computer systems, shared filesystems face challenges in efficiently handling metadata operations due to the latency and security risks associated with memory sharing between guests and hosts, particularly in paravirtualized environments where metadata queries often rely on communications with the hypervisor, leading to slower response times and potential security vulnerabilities.

Innovation Solution

A metadata caching system is implemented with a host, a guest, and a registration table, where the guest's storage controller retrieves and validates version identifiers from both its metadata cache and the host's registration table to determine if metadata is current, allowing for direct access and updates without invoking the host supervisor, thereby reducing latency and maintaining security by minimizing access to the hypervisor.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If metadata operations rely on communications with the hypervisor, then security is maintained through controlled access, but response time increases due to latency

Engineering Contradiction:
ImprovesecurityVSAvoidresponse time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent implements metadata caching in guest memory before operations are needed, pre-loading frequently accessed metadata so that subsequent operations can proceed without hypervisor communication. This preliminary action stores metadata locally in the guest's storage controller, allowing fast retrieval without invoking the hypervisor for each operation.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces a metadata cache as an intermediary layer between the guest filesystem operations and the hypervisor. This cache sits in guest memory and handles metadata requests locally, only communicating with the hypervisor when metadata needs to be updated or invalidated, thus reducing the frequency of security-checking hypervisor calls.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If guests access host memory directly for fast data sharing, then processing efficiency improves, but security risks increase due to potential vulnerabilities

Engineering Contradiction:
Improveprocessing efficiencyVSAvoidsecurity risks
Core Design Contradiction:
ProductivityVSObject-affected harmful factors

Solution Approach 1:

The patent creates a copy of metadata from host memory into guest memory's storage controller cache. This copy allows the guest to operate on local data without directly accessing host memory structures, maintaining security while enabling fast operations. The guest filesystem daemon communicates with its local cached copy rather than the host supervisor directly.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent segments metadata access into two distinct layers: a cached copy in guest memory for fast local operations, and the original in host memory for authoritative updates. This segmentation allows the guest to achieve high-speed access to its segment while the host retains control over the master segment, isolating security risks.

Inventive Principle:
Principle #1Segmentation

3Loss of time

If metadata is cached in guest memory, then operation latency is reduced, but data consistency may be compromised without proper validation

Engineering Contradiction:
Improveoperation latencyVSAvoiddata consistency
Core Design Contradiction:
Loss of timeVSReliability

Solution Approach 1:

The patent implements a feedback mechanism where the guest filesystem daemon monitors for metadata update notifications from the host. When the host updates metadata, it sends a notification to the guest daemon, which then invalidates or updates its local cache accordingly. This feedback loop ensures the cached metadata remains consistent with the host without requiring continuous polling.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent replaces the mechanical polling system (where the guest would continuously check for updates) with an event-driven notification system. The host supervisor notifies the guest filesystem daemon of metadata changes, allowing the guest to update its cache asynchronously and efficiently, maintaining consistency without the overhead of continuous checking.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS11237963B2Shared filesystem metadata caching
Publication Date: 2022.02.01 RED HAT INC
  • US11237963B2 patent drawing
  • US11237963B2 patent drawing
  • US11237963B2 patent drawing

AI summary

Shared filesystem metadata caching is disclosed. For example, a system includes a guest with a storage controller (SC) and a metadata cache on a host with a filesystem daemon (FSD), and a host memory storing a registration table (RT). The SC receives a first metadata request associated with a file stored in the host memory. A first version identifier (VID) of metadata associated with the file is retrieved from the metadata cache and validated against a corresponding second VID in the RT. Upon determining the first VID matches the second VID, the SC responds to the first metadata request based on the metadata. Upon determining the first VID fails to match the second VID, the SC requests the FSD to update the metadata. The first VID is updated to match the second VID and the SC responds to the first metadata request based on the updated metadata.