# US 2023/0066840 A1 · Efficiently providing a guest context access to file content at a host context

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2023/0066840 A1
- Document ID: US20230066840A1
- Status: Published application
- Kind: A1
- Application number: 17/793,915
- Filed: 2021-01-27
- Published: 2023-03-02
- Earliest claimed: 2020-01-30
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Ping XIE; Scott BRENDER; Shaheed Gulamabbas CHAGANI; John Andrew STARKS; Arun U. KISHAN
- Web page: https://patentgrep.com/patent/US20230066840A1

## CPC

- G06F 16/122: {using management policies (point-in-time backing up or restoration of persistent data G06F11/1446; file migration policies for HSM systems G06F16/185)}
- G06F 16/188: Virtual file systems
- G06F 9/45533: {Hypervisors; Virtual machine monitors}
- G06F 16/148: {File search processing}
- G06F 21/53: by executing in a restricted environment, e.g. sandbox or secure virtual machine
- G06F 21/78: to assure secure storage of data (address-based protection against unauthorised use of memory G06F12/14; record carriers for use with machines and with at least a part designed to carry digital markings G06K19/00)
- G06F 2009/45583: {Memory management, e.g. access or allocation}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Using metadata for a contentless file to provide a guest context access to file content. Within a guest context, a file system is mounted from a container image which lacks a first file's content and which includes metadata defining properties of the first file and mapping data defining information for identifying a second file within another filesystem from which the first file's content is obtainable Based on the properties, a filesystem operation involving the first file is performed without switching to a host context, and a requested access to the first file's content is responded to. Responding includes, based on the mapping data, communicating a request for the host context to supply the first file's content and, after returning from a context switch, responding to the requested access by supplying content of the second file from guest memory page(s) which are mapped to host memory page(s) containing the second file's content.

## Claims

### Claim at position 1

1-15. (canceled)

### Claim 16

A method, implemented at a computer system that includes at least one processor, for using metadata for a contentless file to provide a guest context access to file content, the method comprising:
within a guest context at the computer system:
mounting a first filesystem namespace from a container image that includes (i) metadata defining one or more filesystem properties of a first file contained within the first filesystem namespace, the container image lacking content of the first file; and (ii) mapping data that includes information usable to identify a second file within a second filesystem namespace that is external to the guest context, and from which the content of the first file is obtainable;
based on the one or more filesystem properties of the first file, performing a filesystem operation involving the first file without switching to a host context at the computer system; and
based on the one or more filesystem properties of the first file, responding to a requested access to the content of the first file, including:
based on the mapping data, communicating, to the host context, a request for the host context to supply the content of the first file to the guest context; and
after returning from a context switch to the host context, responding to the requested access based at least on supplying content of the second file from one or more guest context memory pages, the one or more guest context memory pages mapped to one or more host context memory pages containing the content of the second file.

### Claim 17 (depends on 16)

The method of claim 16 comprising, within the host context: based on receiving the request from the guest context, identifying the second file within the second filesystem namespace; and based on identifying the second file within the second filesystem namespace, performing at least one of: identifying a mapping between the one or more host context memory pages and the one or more guest context memory pages, and configuring the one or more host context memory pages to contain the content of the second file; or mapping the one or more host context memory pages to the one or more guest context memory pages, and configuring the one or more host context memory pages to contain the content of the second file.

### Claim 18 (depends on 16)

The method of claim 16, wherein the guest context mounting the first filesystem namespace from the container image comprises the guest context reserving the one or more guest context memory pages for accessing the first file, wherein the guest context communicating the request for access to file content of the second file to the host context comprises the guest context initiating a page fault on the one or more guest context memory pages upon an attempted access to the first file, and wherein the host context identifying the second file within the second filesystem namespace is based on the mapping data.

### Claim 19 (depends on 16)

The method of claim 16, wherein the guest context communicating the request for access to the file content of the second file to the host context comprises the guest context sending a message to the host context, the message including the information usable to identify the second file within the second filesystem namespace.

### Claim 20 (depends on 19)

The method of claim 19, wherein the guest context sending the message to the host context comprises the guest context performing at least one of:
calling an application programming interface (API) of a network filesystem; or
calling an API of a container management system.

### Claim 21 (depends on 16)

The method of claim 16, wherein the information usable to identify the second file within the second filesystem namespace comprises at least one of a path within the second filesystem namespace, a file name identifier within the second filesystem namespace, a hash based on the second file, or a file record within the second filesystem namespace.

### Claim 22 (depends on 16)

The method of claim 16, wherein the second filesystem namespace is accessed by the host context from a source external to the computer system.

### Claim 23 (depends on 22)

The method of claim 22, wherein the one or more host context memory pages are filled with the file content of the second file by remote direct memory access.

### Claim 24 (depends on 16)

The method of claim 16, wherein the guest context is a virtual address backed virtual machine, wherein the one or more guest context memory pages are guest physical memory pages, and wherein the one or more host context memory pages are at least one of host physical memory pages or host virtual memory pages.

### Claim 25

A computer system that includes at least one processor and a computer readable media having stored thereon computer-executable instructions that are executable by the at least one processor to cause the computer system to perform a method for using metadata for a contentless file to provide a guest context access to file content, the method comprising, within a guest context at the computer system:
mounting a first filesystem namespace from a container image that includes (i) metadata defining one or more filesystem properties of a first file contained within the first filesystem namespace, the container image lacking content of the first file; and (ii) mapping data that includes information usable to identify a second file within a second filesystem namespace that is external to the guest context, and from which the content of the first file is obtainable;
based on the one or more filesystem properties of the first file, performing a filesystem operation involving the first file without switching to a host context at the computer system; and
based on the one or more filesystem properties of the first file, responding to a requested access to the content of the first file, including:
based on the mapping data, communicating, to the host context, a request for the host context to supply the content of the first file to the guest context; and
after returning from a context switch to the host context, responding to the requested access based at least on supplying content of the second file from one or more guest context memory pages, the one or more guest context memory pages mapped to one or more host context memory pages containing the content of the second file.

### Claim 26 (depends on 25)

The computer system of claim 25, further comprising, within the host context:
based on receiving the request from the guest context, identifying the second file within the second filesystem namespace; and
based on identifying the second file within the second filesystem namespace, performing at least one of:
identifying a mapping between the one or more host context memory pages and the one or more guest context memory pages, and configuring the one or more host context memory pages to contain the content of the second file; or
mapping the one or more host context memory pages to the one or more guest context memory pages, and configuring the one or more host context memory pages to contain the content of the second file.

### Claim 27 (depends on 25)

The computer system of claim 25, further comprising reserving the one or more guest context memory pages for accessing the content of the first file, and wherein communicating the request for the host context to supply the content of the first file to the guest context comprises initiating a page fault on the one or more guest context memory pages upon an attempted access to the content of the first file.

### Claim 28 (depends on 25)

The computer system of claim 25, wherein communicating the request for the host context to supply the content of the first file to the guest context comprises the guest context sending a message to the host context, the message including the information usable to identify the second file within the second filesystem namespace, the information usable to identify the second file within the second filesystem namespace comprising at least one of a path within the second filesystem namespace, a file name identifier within the second filesystem namespace, a hash based on the second file, or a file record within the second filesystem namespace.

### Claim 29 (depends on 25)

The computer system of claim 25, wherein the guest context is a virtual address backed virtual machine, wherein the one or more guest context memory pages are guest physical memory pages, and wherein the one or more host context memory pages are at least one of host physical memory pages or host virtual memory pages.

### Claim 30 (depends on 25)

The computer system of claim 25, wherein communicating the request for the host context to supply the content of the first file to the guest context triggers the context switch to the host context.

### Claim 31

A computer readable media having stored thereon computer-executable instructions that are executable by at least one processor to cause a computer system to perform a method for using metadata for a contentless file to provide a guest context access to file content, the method comprising, within a guest context at the computer system:
mounting a first filesystem namespace from a container image that includes (i) metadata defining one or more filesystem properties of a first file contained within the first filesystem namespace, the container image lacking content of the first file; and (ii) mapping data that includes information usable to identify a second file within a second filesystem namespace that is external to the guest context, and from which the content of the first file is obtainable;
based on the one or more filesystem properties of the first file, performing a filesystem operation involving the first file without switching to a host context at the computer system; and
based on the one or more filesystem properties of the first file, responding to a requested access to the content of the first file, including:
based on the mapping data, communicating, to the host context, a request for the host context to supply the content of the first file to the guest context; and
after returning from a context switch to the host context, responding to the requested access based at least on supplying content of the second file from one or more guest context memory pages, the one or more guest context memory pages mapped to one or more host context memory pages containing the content of the second file.

### Claim 32 (depends on 31)

The computer readable media of claim 31, further comprising, within the host context:
based on receiving the request from the guest context, identifying the second file within the second filesystem namespace; and
based on identifying the second file within the second filesystem namespace, performing at least one of:
identifying a mapping between the one or more host context memory pages and the one or more guest context memory pages, and configuring the one or more host context memory pages to contain the content of the second file; or
mapping the one or more host context memory pages to the one or more guest context memory pages, and configuring the one or more host context memory pages to contain the content of the second file.

### Claim 33 (depends on 31)

The computer readable media of claim 31, further comprising reserving the one or more guest context memory pages for accessing the content of the first file, and wherein communicating the request for the host context to supply the content of the first file to the guest context comprises initiating a page fault on the one or more guest context memory pages upon an attempted access to the content of the first file.

### Claim 34 (depends on 31)

The computer readable media of claim 31, wherein communicating the request for the host context to supply the content of the first file to the guest context comprises the guest context sending a message to the host context, the message including the information usable to identify the second file within the second filesystem namespace, the information usable to identify the second file within the second filesystem namespace comprising at least one of a path within the second filesystem namespace, a file name identifier within the second filesystem namespace, a hash based on the second file, or a file record within the second filesystem namespace.

### Claim 35 (depends on 31)

The computer readable media of claim 31, wherein the guest context is a virtual address backed virtual machine, wherein the one or more guest context memory pages are guest physical memory pages, and wherein the one or more host context memory pages are at least one of host physical memory pages or host virtual memory pages.
