Data Access Method and Apparatus, and System
AssigneeHuawei Cloud Computing Technologies Co., Ltd.
InventorsZhiting Lu, Xin Fang
Life of this patent
Estimating the term…
Abstract
A data access method includes receiving a file creation request, where the file creation request carries a first file name and a first file identifier of a parent directory of a first file; obtaining metadata of the parent directory that is of the first file and that corresponds to the first file identifier; creating the first file in the parent directory based on the metadata of the parent directory of the first file, and allocating a second file identifier to the first file, where the first file is a file or a directory in the directory tree; and recording a correspondence between the second file identifier and the first file name into a file index table.
Claims20
A method implemented by an object storage service node, wherein the method comprises:
- receiving a file creation request comprising a first file name and a first file identifier of a parent directory of a first file;
- obtaining first metadata of the parent directory;
- creating, based on the first metadata, the first file in the parent directory, wherein the first file is a file or a directory in a directory tree;
- allocating a second file identifier to the first file;
- and
- recording, in a file index table, a correspondence between the second file identifier and the first file name.
A method implemented by a file storage client, wherein the method comprises:
- receiving, from an application, a file creation instruction for a first file, wherein the first file is a file or a directory in a directory tree;
- obtaining, from a mapping relationship table, a first file identifier of a parent directory of the first file;
- sending, to an object storage service node, a file creation request comprising a first file name and the first file identifier;
- receiving, from the object storage service node, a second file identifier;
- and
- recording, in the mapping relationship table, a correspondence between the second file identifier and the first file name.
An apparatus in an object storage service node and comprising:
- one or more memories configured to store instructions;
- and
- one or more processors coupled to the one or more memories, wherein when executed by the one or more processors, the instructions cause the apparatus to:
- receive a file creation request comprising a first file name and a first file identifier of a parent directory of a first file;
- obtain first metadata of the parent directory;
- create, based on the first metadata, the first file in the parent directory, wherein the first file is a file or a directory in a directory tree;
- allocate a second file identifier to the first file;
- and
- record, in a file index table, a correspondence between the second file identifier and the first file name.
Dependencies are inferred from the claim text.