File attribute setting method, client, storage server, device, and system

The method of obtaining results by sending batch settings requests to the storage server asynchronous or synchronously, solves the problem of inefficient file attribute setting, and realizes the conservation of network resources and the optimization of storage resources.

WO2025140215A1PCT designated stage expired Publication Date: 2025-07-03HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/141978
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-27
Filing Date
2024-12-24
Publication Date
2025-07-03

AI Technical Summary

Technical Problem

In the prior art, frequent transfer of file attribute setting commands between the client and the storage server leads to high consumption of network resources and low efficiency of setting file attributes. Especially in multi-level directory and large directory scenarios, the client consumes too much storage resources and computing resources.

Method used

By sending a setting request to the storage server, the client instructs the storage server to set the file attributes of multiple files in batches, reduces the number of transmission setting commands, and obtains the setting results synchronously or asynchronously, and releases the session channel to handle other tasks.

Benefits of technology

It reduces network resource consumption between the client and the storage server, improves file attribute setting efficiency, and reduces the consumption of storage resources and computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024141978_03072025_PF_FP_ABST
    Figure CN2024141978_03072025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed are a file attribute setting method, a client, a storage server, a device, and a system, which relate to the field of computers. The method comprises: a client sending a setting request to a storage server, and the storage server setting file attributes of a plurality of files; and the client receiving a setting response, wherein the setting response is used for indicating the result of setting the file attributes of the plurality of files on the basis of the setting request. Therefore, the client does not need to send a plurality of file attribute setting commands, and the file attributes of the plurality of files are set on the basis of one setting command, thus realizing batch setting of file attributes, and reducing the number of setting commands transmitted between the client and the storage server, thereby reducing the network resource consumption and improving the file attribute setting efficiency. In addition, the client does not need to send a Readdir command word to acquire a file list, and does not need to store the file list and traverse the file list to send a setting command for each file, thereby reducing the consumption of storage resources and computation resources of the client.
Need to check novelty before this filing date? Find Prior Art

Description

File attribute setting method, client, storage server, device and system

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on December 27, 2023, with application number 202311834432.8 and application name “File attribute setting method, client, storage server, device and system”, all of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of computers, and in particular to a file attribute setting method, client, storage server, device, and system. Background Art

[0003] Currently, clients can mount shared files on storage servers and remotely access shared files on storage servers over the network. Clients can perform operations such as querying and setting attributes on files. Typically, a client sends a Readdir command to a storage server to obtain a list of files. The client then performs operations such as querying and setting attributes on each file. As the number of files increases, the amount of data transmitted between the client and the storage server also increases, consuming a large amount of network resources and inefficiently setting file attributes. Furthermore, in multi-level and large directory scenarios, the client caches and traverses the file list, consuming a large amount of the client's storage and computing resources. Summary of the Invention

[0004] The present application provides a file attribute setting method, client, storage server, device and system, thereby improving the efficiency of file attribute setting and reducing the consumption of network resources as well as client storage resources and computing resources.

[0005] In a first aspect, a file attribute setting method is provided, which is executed by a client and includes: the client sends a setting request to a storage server, instructing the storage server to set the file attributes of multiple files, and then receiving a setting response, which is used to indicate the setting results of the file attributes of the multiple files based on the setting request.

[0006] Compared to setting file attributes for only one file using a single set command, setting the file attributes of multiple files requires sending multiple set commands, which consumes more network resources and reduces the efficiency of file attribute setting. The solution provided by this application eliminates the need for the client to send multiple file attribute setting commands. Instead, the client can set the file attributes of multiple files using a single set command, enabling batch setting of file attributes. This reduces the number of set commands transmitted between the client and the storage server, thereby reducing network resource consumption and improving file attribute setting efficiency. Furthermore, the client does not need to send a Readdir command to obtain a file list, nor does it need to store the file list. Instead, it traverses the file list and sends a set command for each file, thus reducing the client's storage and computing resources.

[0007] In a possible implementation, the setting request includes a recursive setting parameter, where the recursive setting parameter is used to instruct setting file attributes of the first file and file attributes of multiple levels of sub-files contained in the first file.

[0008] In another possible implementation, the setting request includes an identifier of a first file among the multiple files.

[0009] In this way, a recursive setting parameter is added to the setting request, instructing the storage server to set the file attributes of the first file and the file attributes of the multiple sub-files contained in the first file. This enables batch setting of file attributes, reduces the number of setting commands transmitted between the client and the storage server, thereby reducing network resource consumption and improving the efficiency of file attribute setting.

[0010] In another possible implementation, the setup request further includes either a synchronous flag or an asynchronous flag. The synchronous flag is used to instruct the storage server to feed back the setup response in a synchronous manner. The asynchronous flag is used to instruct the storage server to feed back the setup response in an asynchronous manner.

[0011] Therefore, the storage server can feed back a setting response in a synchronous or asynchronous manner, so that the client can know the setting result.

[0012] In another possible implementation, the result is set to indicate success or failure.

[0013] In this way, the client can know the setting result. If the setting fails, the setting request is sent again.

[0014] In another possible implementation, the result is set to indicate a recheck.

[0015] If the storage server has not yet completed setting the file attributes of multiple files, the client determines through a set response that the file attributes of multiple files have not yet been set, and then the client waits for the storage server to set the file attributes. This frees up the client's session channel to handle other tasks, improving resource utilization.

[0016] In another possible implementation, the setting request includes a synchronization identifier; the setting response includes a task identifier and a first error code, and the first error code is used to indicate a recheck; after receiving the setting response, the method further includes: sending a setting status query request, the setting status query request includes the task identifier; receiving a setting status query response, the setting status query response is used to indicate the setting results of the file attributes of multiple files based on the setting request.

[0017] Thus, while the client is waiting for the storage server to set the file attributes of multiple files, the client sends a setup status query request to the storage server to obtain the progress of the storage server setting the file attributes of the multiple files. If the storage server successfully sets the file attributes of the multiple files, the setup status query response indicates success. If the storage server fails to set the file attributes of the multiple files, the setup status query response indicates failure. The setup status query request includes a task identifier, which allows the storage server to determine the progress of the file attribute setting task indicated by the task identifier.

[0018] In another possible implementation, the setting result is used to indicate waiting for the setting result of the file attributes of the plurality of files by the storage server.

[0019] In another possible implementation, the setting request includes an asynchronous identifier; the setting response includes a task identifier and a first error code, and the first error code is used to indicate waiting; after receiving the setting response, the method further includes: receiving a callback message, the callback message includes the task identifier and the setting result, and the setting result includes either success or failure; sending a callback response, and the callback response is used to indicate a callback success or a callback failure.

[0020] This allows the client to free up the session channel to handle other tasks when communicating with the storage server asynchronously, improving resource utilization. The client asynchronously monitors tasks and then receives callback messages to inform the client of the configuration results. If the configuration fails, the client resends the configuration request.

[0021] In another possible implementation, the callback message also includes a verification code; sending a callback response includes: when the verification of the task identifier according to the verification code is successful, sending a callback response; after receiving the callback message, the method also includes: when the verification of the task identifier according to the verification code fails, sending a second error code.

[0022] By verifying the task identifier, the accuracy of the callback response is ensured to avoid information errors that may lead to task confusion.

[0023] In another possible implementation, the method further includes: sending a setting cancellation request, where the setting cancellation request is used to indicate cancellation of the task corresponding to the setting request; and receiving a setting cancellation response, where the setting cancellation response is used to indicate a successful cancellation or a failed cancellation.

[0024] If the client waits a long time for the storage server to respond with the configuration results, the client can proactively send a configuration cancellation request, instructing the storage server to cancel the file attribute settings for multiple files. This prevents the client and storage server from occupying the session channel for a long time and wasting resources. After canceling the file attribute settings, the client can also re-initiate a file attribute configuration request, instructing the storage server to re-set the file attributes.

[0025] In a second aspect, a file attribute setting method is provided, which is executed by a storage server and includes: the storage server receives a setting request from a client and sets the file attributes of multiple files according to the setting request; and sends a setting response to the client, where the setting response is used to indicate the setting results of the file attributes of the multiple files based on the setting request.

[0026] Compared to setting file attributes for only one file based on a single setting command, setting file attributes for multiple files requires receiving multiple setting commands, resulting in a large consumption of network resources and reduced efficiency in setting file attributes. The solution provided by this application eliminates the need for the storage server to receive multiple file attribute setting commands. Instead, it sets file attributes for multiple files based on a single setting command, enabling batch setting of file attributes. This reduces the number of setting commands transmitted between the client and the storage server, thereby reducing network resource consumption and improving file attribute setting efficiency.

[0027] In a possible implementation, setting the file attributes of multiple files according to the setting request specifically includes: querying all sub-files under the file; and setting all the queried sub-files according to the file attributes.

[0028] In another possible implementation, the setting request includes a recursive setting parameter and a file identifier of a first file among multiple files. The recursive setting parameter is used to indicate setting file attributes of the first file and file attributes of multiple levels of sub-files contained in the first file.

[0029] In this way, the storage server sets the file attributes of the first file and the file attributes of the multiple sub-files contained in the first file according to the recursive setting parameters added in the setting request. This enables batch setting of file attributes, reduces the number of setting commands transmitted between the client and the storage server, and thus reduces network resource consumption and improves the efficiency of file attribute setting.

[0030] In another possible implementation, the setting request includes a synchronization flag; and sending a setting response includes sending a setting response when the timer has not timed out, the setting response indicating success or failure of setting file attributes of the multiple files according to the setting request. The synchronization flag instructs the storage system to synchronously return the setting response.

[0031] In another possible implementation, the setting request includes a synchronization identifier; sending a setting response includes: when a timer times out, sending a setting response, the setting response is used to instruct to recheck the setting results of the file attributes of multiple files based on the setting request.

[0032] By setting a timer, the storage server can provide timely feedback on the configuration response. If the storage server completes setting file attributes for multiple files and the timer hasn't expired, it will promptly provide feedback on success or failure. If the storage server fails to complete setting file attributes for multiple files and the timer has expired, it will promptly provide feedback on the configuration waiting state. This allows the client to promptly obtain the status of the file attribute settings, preventing the session channel between the client and the storage server from being occupied for extended periods. This allows the client to free up the session channel for other tasks, improving resource utilization.

[0033] In another possible implementation, the setting response includes a task identifier and a first error code, and the first error code is used to indicate a recheck; after sending the setting response, the method also includes: receiving a setting status query request, the setting status query request includes the task identifier; sending a setting status query response, the setting status query response is used to indicate the setting results of the file attributes of multiple files based on the setting request.

[0034] Thus, after the client waits for the storage server to set the file attributes of multiple files, it sends a setup status query request to the storage server. The storage server, based on the setup status query request sent by the client, provides feedback on the progress of the storage server setting the file attributes of the multiple files. If the storage server successfully sets the file attributes of the multiple files, the setup status query response indicates success. If the storage server fails to set the file attributes of the multiple files, the setup status query response indicates failure. The setup status query request includes a task identifier, which allows the storage server to determine the progress of the task indicated by the task identifier.

[0035] In another possible implementation, the setting status query request also includes a verification code; sending a setting status query response includes: when the verification of the task identifier according to the verification code is successful, sending a setting status query response; the method also includes: when the verification of the task identifier according to the verification code fails, sending a second error code.

[0036] Through task identification, the accuracy of setting status query responses is ensured to avoid information errors that may lead to task confusion.

[0037] In another possible implementation, the set request includes an asynchronous flag; the set response indicates waiting for a result of setting file attributes of the multiple files based on the set request; after sending the set response, the method further includes: sending a callback message, the callback message including the task flag and the result of setting the file attributes of the multiple files, the setting result including either success or failure; and receiving a callback response, the callback response indicating a success or failure of the callback. The asynchronous flag indicates that the storage system returns the set response asynchronously.

[0038] Therefore, when the client and the storage server communicate asynchronously, the client releases the session channel to handle other tasks and asynchronously monitors the task. Then, the storage server sends a callback message to inform the client of the setting result. If the setting fails, the setting request is sent again.

[0039] In another possible implementation, the method further includes: receiving a setting cancellation request, the setting cancellation request being used to indicate cancellation of the task corresponding to the setting request; canceling the task corresponding to the setting request according to the setting cancellation request; and sending a setting cancellation response, the setting cancellation response being used to indicate a successful cancellation or a failed cancellation.

[0040] If the client waits a long time for the storage server to respond with the configuration results, the client can proactively send a configuration cancellation request. The storage server cancels the file attribute settings for multiple files, preventing the client and storage server from occupying the session channel for a long time and wasting resources. After canceling the file attribute settings, the client can also re-initiate a file attribute setting request to instruct the storage server to re-execute the file attribute settings.

[0041] In a third aspect, a client is provided, comprising modules for executing the file attribute setting method of the first aspect or any possible embodiment of the first aspect. For example, the communication module is configured to send a setting request to a storage server, instructing the storage server to set file attributes for multiple files; the communication module is further configured to receive a setting response indicating the result of setting the file attributes for the multiple files according to the setting request.

[0042] In a possible implementation, the setting request includes a recursive setting parameter and an identifier of a first file among the multiple files. The recursive setting parameter is used to indicate setting file attributes of the first file and file attributes of multiple levels of sub-files contained in the first file.

[0043] In another possible implementation, the setting request further includes either a synchronous flag or an asynchronous flag.

[0044] In another possible implementation, the result is set to indicate success or failure.

[0045] In another possible implementation, the result is set to indicate a recheck.

[0046] In another possible implementation, the setting request includes a synchronization identifier; the setting response includes a task identifier and a first error code, and the first error code is used to indicate a recheck; the communication module is also used to send a setting status query request, and the setting status query request includes the task identifier; receive a setting status query response, and the setting status query response is used to indicate the setting results of the file attributes of multiple files based on the setting request.

[0047] In another possible implementation, the setting result is used to indicate waiting for the setting result of the storage system.

[0048] In another possible implementation, the setting request includes an asynchronous identifier; the setting response includes a task identifier and a first error code, and the first error code is used to indicate waiting; the communication module is also used to receive a callback message, the callback message includes the task identifier and the setting result, and the setting result includes either success or failure; and send a callback response, and the callback response is used to indicate callback success or callback failure.

[0049] In another possible implementation, the callback message also includes a verification code; when the communication module sends a callback response, it is specifically used to: send a callback response when the verification of the task identifier is successful according to the verification code; the communication module is also used to send a second error code when the verification of the task identifier fails according to the verification code.

[0050] In another possible implementation, the communication module is further configured to send a setting cancellation request, which is used to indicate cancellation of the task corresponding to the setting request; and receive a setting cancellation response, which is used to indicate a successful cancellation or a failed cancellation.

[0051] In a fourth aspect, a storage server is provided, comprising modules for executing the file attribute setting method of the second aspect or any possible design of the second aspect. For example, a communication module is configured to receive a setting request from a client; a processing module is configured to set the file attributes of multiple files based on the setting request; and the communication module is further configured to send a setting response to the client, the setting response indicating the result of setting the file attributes of the multiple files based on the setting request.

[0052] In a possible implementation, when the processing module sets the file attributes of the multiple files according to the setting request, it is specifically configured to query all sub-files under the files; and set all the queried sub-files according to the file attributes.

[0053] In another possible implementation, the setting request includes recursive setting parameters and an identifier of the first file among multiple files; when the processing module sets the file attributes of multiple files, it is specifically used to: set the file attributes of the first file and the file attributes of the multi-level sub-files contained in the first file.

[0054] In another possible implementation, the setting request includes a synchronization identifier; when the communication module sends a setting response, it is specifically used to: send a setting response when the timer has not timed out, and the setting response is used to indicate the success or failure of setting the file attributes of multiple files based on the setting request.

[0055] In another possible implementation, the setting request includes a synchronization identifier; when the communication module sends a setting response, it is specifically used to: send a setting response when the timer times out, and the setting response is used to indicate a recheck of the setting results of the file attributes of multiple files based on the setting request.

[0056] In another possible implementation, the setting response includes a task identifier and a first error code, and the first error code is used to indicate a re-check; the communication module is also used to receive a setting status query request, and the setting status query request includes the task identifier; and send a setting status query response, and the setting status query response is used to indicate the setting results of the file attributes of multiple files based on the setting request.

[0057] In another possible implementation, the setting status query request also includes a verification code; when the communication module sends a setting status query response, it is specifically used to: when the verification of the task identifier according to the verification code is successful, send the setting status query response; the communication module is also used to send a second error code when the verification of the task identifier according to the verification code fails.

[0058] In another possible implementation, the setting request includes an asynchronous identifier; the setting response is used to indicate waiting for the setting results of the file attributes of multiple files based on the setting request; the communication module is also used to send a callback message, the callback message includes the task identifier and the setting results of the file attributes of multiple files, the setting result includes either success or failure; receive the callback response, the callback response is used to indicate the success or failure of the callback.

[0059] In another possible implementation, the communication module is further used to receive a setting cancellation request, which is used to indicate the cancellation of the task corresponding to the setting request; the processing module is further used to cancel the task corresponding to the setting request according to the setting cancellation request; the communication module is further used to send a setting cancellation response, which is used to indicate a successful cancellation or a failed cancellation.

[0060] In a fifth aspect, a computer device is provided, which includes at least one processor and a memory, wherein the memory is used to store a set of computer instructions; when the processor executes the set of computer instructions as a client in the first aspect or any possible implementation of the first aspect, the operating steps of the file attribute setting method in the first aspect or any possible implementation of the first aspect are executed; when the processor executes the set of computer instructions as a storage server in the second aspect or any possible implementation of the second aspect, the operating steps of the file attribute setting method in the second aspect or any possible implementation of the second aspect are executed.

[0061] In a sixth aspect, a communication system is provided, comprising a client and multiple storage servers, wherein the client is connected to the multiple storage servers. The client is configured to execute the steps of the method for setting file attributes according to the first aspect or any possible implementation of the first aspect. The storage servers are configured to execute the steps of the method for setting file attributes according to the second aspect or any possible implementation of the second aspect.

[0062] In the seventh aspect, a computer-readable storage medium is provided, comprising: computer software instructions; when the computer software instructions are executed in a computer device, the computer device executes the operating steps of the method described in the first aspect or any possible implementation of the first aspect; or, executes the operating steps of the method described in the second aspect or any possible implementation of the second aspect.

[0063] In an eighth aspect, a computer program product is provided. When the computer program product runs on a computer, it enables the computer to execute the operating steps of the method described in the first aspect or any possible implementation of the first aspect; or, execute the operating steps of the method described in the second aspect or any possible implementation of the second aspect.

[0064] The technical effects brought about by any design method from the third aspect to the eighth aspect can be referred to the technical effects brought about by the first aspect to the second aspect or different design methods, and will not be repeated here.

[0065] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] FIG1 is a schematic diagram of a process for setting file attributes provided by the present application;

[0067] FIG2 is a schematic diagram of the architecture of a communication system provided by the present application;

[0068] FIG3 is a flow chart of a method for setting file attributes provided by the present application;

[0069] FIG4 is a schematic diagram of the operation of a file attribute setting command provided by the present application;

[0070] FIG5 is a schematic diagram of a synchronous feedback setting response provided by the present application;

[0071] FIG6 is a schematic diagram of an asynchronous feedback setting response provided by the present application;

[0072] FIG7 is a schematic diagram of canceling file attribute settings provided by the present application;

[0073] FIG8 is a schematic diagram of the structure of a client provided by this application;

[0074] FIG9 is a schematic structural diagram of a storage server provided by the present application;

[0075] FIG10 is a schematic structural diagram of a computer device provided in this application. DETAILED DESCRIPTION

[0076] To facilitate understanding, the main terms involved in this application are first explained.

[0077] Network Attached Storage (NAS): A data-centric technology that connects storage devices to a network to provide dedicated data and file services. NAS decouples storage servers from application servers, allowing clients to access data over the network without requiring application server intervention. This frees up bandwidth, improves storage performance, reduces total cost of ownership, and protects investment. NAS can also refer to a dedicated data storage device, also known as a network storage server or storage server.

[0078] The NAS described in this application can be designed based on a client / server (C / S) architecture. The client installs the NAS client software, the server installs the NAS server software, and the client mounts the file directory on the server, allowing the client to access the server's file system in different languages, operating systems, and folders. Alternatively, the client can be referred to as a local computer, local device, local computer, or local device. The server can be referred to as a remote computer, remote device, storage server, or network storage server. The client can also be referred to as a NAS client. The server can also be referred to as a NAS server.

[0079] Network attached storage includes storage devices (such as disk arrays, CD / DVD drives, tape drives, or removable storage media), operating systems, and file systems.

[0080] Clients and network-attached storage support multiple protocols (such as Network File System (NFS), Common Internet File System (CIFS), File Transfer Protocol (FTP), Hypertext Transfer Protocol (HTTP), etc.) and various operating systems.

[0081] The client accesses the network attached storage to perform file operations on the files. For example, the file operations include creating a file, writing a file, reading a file, relocating a file, deleting a file, truncating a file, querying file attributes, and setting file attributes.

[0082] A file is a collection of information stored on a computer device. Files can be text documents, images, videos, audio files, programs, and more. Files typically have a file extension that indicates the file type. For example, a picture saved in JPEG format has a .jpg file extension.

[0083] File folder: A data structure used to organize and manage disk files.

[0084] A folder is a directory on a computer's disk that stores electronic files in separate folders. A folder provides a path to a specific disk location and can have an extension, but it doesn't function as a file extension. Folders facilitate file sharing and protection.

[0085] To store files in an organized and categorized manner, files are organized into directories, also known as folders. Folders typically adopt a multi-level structure (e.g., a tree structure). In this structure, each disk has a root folder, which contains several files and folders. Folders can contain not only files but also folders below them. This multi-level folder structure not only categorizes and stores files of different types and functions, but also facilitates file retrieval and allows files in different folders to have the same file name.

[0086] File attributes: File attributes are information that describes a file. They are not the file's content. File attributes are used to find and organize files. They classify files into different file types and define their properties for easy storage and transfer.

[0087] Common file attributes include system attributes, hidden attributes, permission attributes, and archive attributes.

[0088] For example, file attributes include name, identifier, type, location, size, protection, time, date, and user ID. Name: The file name, used to uniquely identify the file. Identifier: Used to uniquely identify the file. The identifier is usually a number and is a machine-readable file name. Location: The storage location of the file. Size: The file size (in bytes, words, or blocks) and the maximum size that may be allowed. Protection: Permission attributes such as read, write, execute files, access control lists (ACLs), mode attributes, etc. Time, date, and user ID: Information related to file creation, last modification, and last use.

[0089] Typically, when a client sets file attributes, it obtains a file list, traverses the files, queries the file attributes of each file, and sends the new file attributes to the storage server to set the file attributes.

[0090] For example, Figure 1 is a schematic diagram of a process for setting file attributes provided by the present application. As shown in Figure 1, the client sends a Readdir command to the storage server to obtain a file list (step 110); the storage server sends a file list to the client (step 120). The client sends an Open command or a Getattr command to the storage server to query file attributes (step 130); the storage server sends file attributes to the client (step 140). The client sends a Setattr command to the storage server to set file attributes (step 150); the storage server sets file attributes and sends a response to the client (step 160). The client sends a Close command to the storage server to close the setting of file attributes (step 170); the storage server closes the setting of file attributes and sends a response to the client (step 180).

[0091] However, the above file attribute setting process needs to be performed for each file. After the client obtains the file attributes of each file, it may also need to perform summary calculations to summarize the file attributes of multiple files.

[0092] To address the issues of consuming a large amount of network resources between the client and a storage server to transmit file attribute setting commands when a client sets file attributes for multiple files, as well as the low efficiency of file attribute setting, this application provides a file attribute setting method in which a client sends a setting request to a storage server, instructing the storage server to set file attributes for multiple files. That is, the storage server can set file attributes for multiple files based on a single file attribute setting command.

[0093] Thus, compared to setting the file attributes of only one file using a single setting command, setting the file attributes of multiple files requires sending multiple setting commands, resulting in significant network resource consumption and reduced file attribute setting efficiency. The solution provided by this application eliminates the need for the client to send multiple file attribute setting commands. Instead, the client can set the file attributes of multiple files using a single setting command, enabling batch file attribute setting. This reduces the number of setting commands transmitted between the client and the storage server, thereby reducing network resource consumption and improving file attribute setting efficiency. Furthermore, the client does not need to send a Readdir command to obtain a file list, nor does it need to store the file list. Instead, it traverses the file list and sends a setting command for each file, thus reducing the client's storage and computing resources.

[0094] The word file has different meanings in different operating systems. In some operating systems, for example In the file system, a file is a data file that records content. Files include text documents, images, videos, audio files, programs, and so on. Files typically have a file extension that indicates the file type. For example, a picture saved in JPEG format has a file extension of .jpg. A directory, also known as a folder, describes the index location of a file in the file system.

[0095] However, in some other operating systems, such as In the , directory is also used to describe the path of a file; however, file can refer to data that records content (such as text documents, pictures, videos, audio, programs, etc.), or it can refer to a directory. For the sake of convenience, unless otherwise specified, the file in the embodiments of this application uses this meaning.

[0096] For example, in the path / root / media / spring.jpg, / root, / root / media, and spring.jpg are all called files. This embodiment further uses descriptions such as file and subfile to distinguish the hierarchical relationship between files. / root / media and spring.jpg are both subfiles of / root, and spring.jpeg is a subfile of / root / media.

[0097] This application does not limit the type and function of the server. For example, server types include blade servers, tower servers, cabinet servers, and rack servers. In another example, the server may include a storage server with storage capabilities or a computing server with computing capabilities, where the computing server also has storage capabilities.

[0098] The following describes in detail the implementation of the file attribute setting provided by this application with reference to the accompanying drawings.

[0099] The solution provided in this application can be applied to communication systems such as cluster networks, super-node interconnected networks, etc. For example, high performance computing (HPC) networks or high availability (HA) networks.

[0100] For example, FIG2 is a schematic diagram of the architecture of a communication system provided by the present application. As shown in FIG2 , the communication system 200 includes a client 210 and multiple servers 220 .

[0101] The server 220 may be a computing node that provides computing functions. A computing node may also be referred to as a computing server. Multiple servers that provide computing functions may constitute a computing cluster. For example, the server 220 may include computing units with computing capabilities, such as a central processing unit (CPU), a graphics processing unit (GPU), a data processing unit (DPU), a neural processing unit (NPU), and an embedded neural-network processing unit (NPU), to provide high-performance computing.

[0102] The server 220 may also be a storage node that provides storage functions, and the storage node may also be referred to as a storage server. Multiple servers that provide storage functions may constitute a storage cluster. For example, the server 220 may include one or more controllers, a network card, and multiple hard disks. The hard disk is used to store data. The hard disk may be a magnetic disk or other types of storage media, such as a solid-state drive or a shingled magnetic recording hard disk. The network card is used to communicate with the computing node or with the client 210. The controller is used to write data to the hard disk or read data from the hard disk according to the read / write data request sent by the computing node. During the process of reading and writing data, the controller needs to convert the address carried in the read / write data request into an address that the hard disk can recognize.

[0103] Figure 2 is only a schematic diagram. The embodiments of the present application do not limit the number of devices included in the communication system. For example, the communication system may include multiple clients. A client can connect to multiple servers and mount directories of different servers. Different clients establish connections with different servers and mount directories of different servers. The same server can also be mounted on different clients. Optionally, the communication system may also include other devices, such as network devices (such as switches and routers). Multiple servers are connected via network devices and transmit data via the network devices.

[0104] The client 210 communicates with multiple servers 220 via a network 230. The network 230 may be an intranet (eg, a local area network (LAN)) or the Internet.

[0105] This application does not limit the protocol for communication between the client and the server. In some embodiments, the client and the server communicate based on the Server Message Block (SMB) protocol. The client can be an SMB client with a Windows operating system, and the server can be an SMB server with a Windows operating system.

[0106] In other embodiments, the client and the server communicate based on the NFS protocol. The client may be an NFS client with a Linux / Unix operating system, and the server may be an NFS server with a Linux / Unix operating system.

[0107] In this application, the client 210 is used to send a file attribute setting command to the server, and the server sets the file attributes of multiple files according to the file attribute setting command to achieve batch setting of file attributes. The server 220 is used to provide the function and interface for batch setting of device file attributes.

[0108] Next, the file attribute setting is described in detail with reference to the accompanying drawings.

[0109] FIG3 is a flow chart of a method for setting file attributes provided by the present application. The client may be the client shown in FIG1 . The server may be a storage server in the storage cluster described in FIG1 . As shown in FIG3 , the method includes the following steps.

[0110] Step 310: The client sends a setting request.

[0111] The client responds to the file attribute setting operation by sending a setting request to the storage server. In some embodiments, the user can operate the client interface, and the client responds to the file attribute setting command input by the user. For example, as shown in Figure 4 (a), the user enters the file attribute setting command on the client interface. As shown in Figure 4 (b), the user selects the file attribute setting command on the client interface.

[0112] The client responds to the file attribute setting command input by the user and recognizes that the file attributes of multiple files are to be set. The setting request is used to instruct the setting of the file attributes of the multiple files.

[0113] This application does not limit the file type and organizational structure of the multiple files. For example, the multiple files may include at least one of pictures, videos, audios, word documents, portable document formats (PDF), and folders.

[0114] In some embodiments, the multiple files include multiple files at the same level, that is, the multiple files do not have a nested relationship. The setting request is used to instruct setting file attributes of multiple files at the same level.

[0115] In some other embodiments, the multiple files include multiple nested files, that is, the multiple files have a nested relationship. The setting request is used to instruct setting file attributes of multiple-level files.

[0116] Multiple files include parent files and multiple levels of child files. A file can include at least one of a file and a folder. A folder can be a type of file. A folder can contain not only files but also folders at the next level. Multiple files can form a multi-level structure of files. For example, multiple files include a first file and a first folder. If the first folder can also include a second folder, the first folder and the second folder have a nested relationship, the first folder is the parent file of the second folder, and the second folder is a child file of the first folder. The second folder includes the second file. The second folder and the second file have a nested relationship, the second folder is the parent file of the second file, and the second file is a child file of the second folder.

[0117] The setting request may include a recursive setting parameter. The recursive setting parameter is used to indicate that the file attributes of multiple files should be set. Alternatively, the recursive setting parameter is used to indicate that the file attributes of a file and its multiple sub-files should be set. Alternatively, the recursive setting parameter is used to indicate that the file attributes of a directory and its sub-items should be set.

[0118] In some embodiments, the setup request also includes file identifiers and file attributes of multiple files, i.e., the file identifiers and file attributes of the multiple files are listed in the setup request. The file identifier uniquely identifies a file. The file identifier includes, but is not limited to, the file's creation time, modification time, ownership information, and permission information. The file attributes may include attribute values ​​of the file attributes. This allows the storage server to modify the attribute values ​​of the files indicated by the file identifiers to the attribute values ​​of the file attributes included in the setup request.

[0119] In other embodiments, the setting request also includes a file identifier and file attributes of a first file among the multiple files. The client sends the file identifier and file attributes of the first file among the multiple files to the storage server. The storage server sets the file attributes of the first file and the multi-level sub-files contained in the first file based on the recursive setting parameters and the file attributes of the first file. That is, after the file attributes of the first file and the multi-level sub-files of the first file are set, the file attributes of the first file and the multi-level sub-files of the first file are the same, and the file attributes of the first file and the multi-level sub-files of the first file are all the attribute values ​​of the file attributes of the first file included in the setting request.

[0120] Step 320: The storage server receives the setting request sent by the client.

[0121] Clients can directly access storage servers over the network using protocols such as NFS, CIFS, FTP, and HTTP. That is, clients can send configuration requests to storage servers over the network. The storage servers receive configuration requests from clients over the network.

[0122] Step 330: The storage server sets file attributes of the multiple files.

[0123] The set request includes a recursive set parameter, and the storage server determines to set file attributes of multiple files.

[0124] In some embodiments, the set request includes file identifiers and file attributes of multiple files, as well as recursive setting parameters. The storage server sets the file attributes of the multiple files stored by the storage server one by one, that is, sets the file attributes of the files stored by the storage server to the file attributes indicated by the set request. For example, the set request includes a first attribute value of the file attribute of the file, the storage server obtains the file attribute of the file indicated by the file identifier stored by the storage server, and a second attribute value of the file attribute, and modifies the second attribute value of the file attribute to the first attribute value.

[0125] In other embodiments, the setting request includes a file identifier and file attributes of a first file among multiple files, as well as recursive setting parameters. The storage server sets the file attributes of the first file stored on the storage server, as well as the file attributes of multiple subfiles in the first file, one by one. The file attributes of the first file and the file attributes of the multiple subfiles in the first file are set to the file attributes of the first file indicated by the setting request. The file attributes of the first file and the file attributes of the multiple subfiles in the first file are the same.

[0126] For example, if the setting request includes a first attribute value of a file attribute of a first file, the storage server sets the file attribute of the first file and the file attributes of multiple sub-files in the first file to the first attribute value.

[0127] Step 340: The storage server sends a setup response.

[0128] If no back channel is established when the client and storage server establish a connection, the storage server can send a setup response to the client synchronously. If the storage server sends the setup response asynchronously, it sends an error code to the client. For example, the error code might be NFS4ERR_CB_PATH_DOWN.

[0129] When the client establishes a link with the storage server, a reverse channel is created. The storage server can send a setup response to the client in a synchronous or asynchronous manner.

[0130] Optionally, the setting request includes either a synchronous identifier or an asynchronous identifier. The storage server determines a method for feeding back a setting response according to the synchronous identifier or the asynchronous identifier.

[0131] When a setup request includes a synchronization flag, the storage server determines, based on the synchronization flag, to send a setup response to the client synchronously. The setup response indicates the result of setting file attributes for multiple files based on the setup request. The setup result indicates success, failure, or recheck. For example, the setup response may include a success parameter, a failure parameter, or a recheck parameter.

[0132] When a setup request includes an asynchronous flag, the storage server determines whether to send a setup response to the client synchronously or asynchronously based on the asynchronous flag. The setup result indicates success, failure, or pending. For example, the setup response may include a success parameter, a failure parameter, or a pending parameter.

[0133] If the storage server successfully sets the file attributes of the multiple files according to the setting request, the storage server may send a success parameter to the client.

[0134] When the storage server is performing file attribute setting and there are a large number of files, the storage server can send a re-query parameter to the client to inform the client to query the setting status of the file attribute setting. The client then sends a setting status query request to the storage server to obtain the setting result of the file attribute setting.

[0135] When the storage server is setting file attributes and there are a large number of files, the storage server can send a wait parameter to the client, instructing the client to wait for the storage server to feedback the setting results of the file attributes, so that the client can asynchronously monitor the setting results of the file attributes.

[0136] This reduces the number of channels occupied by clients and storage servers for sessions and improves the utilization of network resources.

[0137] In some embodiments, the storage server may encounter an error while setting file attributes of multiple files, resulting in a failure in setting the file attributes. The storage server may then feed back a failure parameter to the client.

[0138] For example, a storage server might encounter a file error while setting attributes for multiple files. The storage server can then report an error code to the client. This error code can be the error code for the setattr command defined in NFSv4.2, indicating an error encountered while recursively setting attributes. File errors can include the storage server not having permission to set attributes for multiple files or the storage server not storing multiple files.

[0139] For example, a storage server might encounter a system failure while setting file attributes for multiple files. The storage server can then return an error code to the client. For example, the error code might be NFS4ERR_BAD_STATEID. System failures include storage server failures, software failures, and errors in the command word included in the setting request.

[0140] The following embodiment describes a solution for the storage server to send a setting response to the client in a synchronous or asynchronous manner.

[0141] Step 350: The client receives a setting response sent by the storage server.

[0142] The client receives the set response and determines a set result based on the set response. If the storage server successfully sets the file attributes of the multiple files, the set result indicates success, and the client determines that the file attributes of the multiple files have been set successfully. If the storage server fails to set the file attributes of the multiple files, the set result indicates failure, and the client determines that the file attributes of the multiple files have been set unsuccessfully.

[0143] Therefore, this application defines a standard protocol command word, namely, a standard command word for batch setting file attributes. The client no longer needs to send a large number of command words (Readdir, file attribute query, and file attribute setting). Instead, a single setting command can be used to set the file attributes of multiple files, enabling batch setting of file attributes. This reduces the number of setting commands transmitted between the client and the storage server, thereby reducing network resource consumption and improving file attribute setting efficiency. Furthermore, the client no longer needs to send the Readdir command word to obtain a file list, nor does it need to store the file list. Instead, it traverses the file list and sends a setting command for each file, thereby reducing the client's storage and computing resources.

[0144] The following describes in detail how the storage server responds to settings in synchronous and asynchronous ways.

[0145] The storage server can send a setup response synchronously in the following two ways.

[0146] In a first possible implementation manner, the storage server feeds back a setting response according to the setting result of the file attribute setting.

[0147] The storage server needs to wait for the result of setting the file attributes of the multiple files. Before the storage server receives the result, it will not send a setting response to the client. After the storage server completes setting the file attributes of the multiple files, it receives the result and sends a setting response to the client. The setting response indicates the result of setting the file attributes of the multiple files according to the setting request. The setting result can indicate success or failure. For example, after the client executes step 310, i.e., after the client sends the setting request to the storage server, the storage server sets the file attributes of the multiple files according to the setting request. The client does not execute step 350 until the storage server receives the result and sends a setting response to the client.

[0148] However, the storage server and client always occupy a channel (slot) in a session, which reduces the number of available channels. If the client and the storage server maintain multiple file attribute setting tasks, multiple channels will be occupied. In severe cases, the client may have no channels available.

[0149] In a second possible implementation, the storage server may respond to the setting based on a timer. The timer duration can be set as needed and is not limited by this application. The shorter the timer duration, the more timely the storage server's response to the setting; conversely, the longer the timer duration, the slower the storage server's response to the setting.

[0150] Figure 5 is a schematic diagram of a synchronous feedback configuration response provided by this application. Unlike the file attribute configuration shown in Figure 3 above, the storage server does not need to wait for the configuration results of multiple files' file attributes; instead, the configuration response is fed back based on the duration of the timer. The configuration response is used to indicate success, failure, or recheck.

[0151] In some embodiments, when the timer has not timed out, the storage server completes setting the file attributes of multiple files and obtains a setting result, then the storage server sends a setting response to the client, and the setting result may indicate success or failure.

[0152] For example, as shown in FIG5(a), based on the method flow shown in FIG3, step 360 is further included. For example, after receiving the setting request, the storage server starts a timer, i.e., executing step 360. Furthermore, the storage server sets the file attributes of the multiple files. If the timer has not timed out, the storage server obtains the setting result, and then sends a setting response to the client. The storage server sending the setting response to the client includes sending the setting response to the client if the timer has not timed out.

[0153] In other embodiments, when the timer times out, the storage server has not yet completed setting the file attributes of the multiple files, that is, the storage server has not obtained the setting result. The storage server then sends a setting response to the client, and the setting result may indicate a recheck.

[0154] For example, as shown in FIG5( b ), based on the method flow shown in FIG3 , the method further includes step 360 and step 370 to step 3120 .

[0155] For example, after receiving the setting request, the storage server starts a timer, i.e., executes step 360. Then, the storage server executes steps 330 to 350, i.e., the storage server sets the file attributes of multiple files. If the timer expires and the storage server has not received the setting result, the storage server sends a setting response to the client, which may indicate a recheck.

[0156] The storage server sends a setup response to the client, including when the timer times out. The setup response includes a task identifier and an error code. The task identifier indicates the file attribute setup task that the storage server is executing based on the setup request. Optionally, the setup response may also include a checksum, which may be determined based on the time the setup request was received. For example, the task identifier may be rsr_callback_id, the error code may be NFS4_PENDING, and the checksum may be rsr_recursiveverf. When rsr_callback_id=0, rsr_recursiveverf=0, and the error code is NFS4_OK, it indicates that the storage server has successfully set the file attributes of multiple files; when rsr_callback_id=0, rsr_recursiveverf=0, and the error code is the error code of setattr or NFS4ERR_BAD_STATEID, it indicates that the storage server has failed to set the file attributes of multiple files; when rsr_callback_id=1, rsr_recursiveverf=1, and the error code is NFS4_OK or PENDING, it indicates that the storage server instructs the client to recheck the setting results of the file attributes of multiple files.

[0157] For explanations of steps 310 to 350 , please refer to the above description.

[0158] After the client receives the set response, it determines that the storage server has not yet completed setting the file attributes of the multiple files according to the re-check indicated in the set response. The client waits for the storage server to set the file attributes of the multiple files and re-queries the setting status of the file attributes. That is, the client waits and executes step 370.

[0159] Step 370: The client sends a setting status query request.

[0160] The setting status query request includes a task identifier. The value of the task identifier included in the setting status query request can be the same as the value of the task identifier included in the setting response.

[0161] Optionally, after receiving the setup response, the client can also start a timer. When the client's timer times out, the client sends a setup status query request. The length of the client's timer can be set as needed and is not limited by this application.

[0162] Step 380: The storage server receives the setting status query request sent by the client.

[0163] The storage server determines whether the task identifier included in the setting status query request is the same as the task identifier stored in the storage server. If the task identifier included in the setting status query request is the same as the task identifier stored in the storage server, the storage server queries the file attribute setting task indicated by the task identifier and sends a setting status query response, that is, executes step 390.

[0164] If the task ID included in the status query request is different from the task ID stored on the storage server, the storage service client returns the error code NFS4ERR_BAD_STATEID or the setattr error code defined in NFSv4.2 to the client.

[0165] Optionally, the setting status query request also includes a verification code.

[0166] The storage server may also verify the task identifier according to the verification code. When the verification of the task identifier according to the verification code is successful, a setting status query response is sent, and step 390 is executed.

[0167] When the task identifier verification fails according to the verification code, it indicates that the storage server may encounter an error in setting the file attributes of the multiple files, and step 3110 is executed to send an error code.

[0168] For example, the verification code is the time at which the storage server received the setup request. The setup status query request includes a task identifier and a verification code. The storage server determines that the task identifier included in the setup status query request is the same as the task identifier stored on the storage server, and that the verification code included in the setup status query request is the same as the time at which the setup request was received stored on the storage server, and thus determines that the verification is successful.

[0169] In another example, the storage server determines that the task identifier included in the setup status query request is the same as the task identifier stored on the storage server, but the verification code included in the setup status query request is different from the time the setup request was received stored on the storage server, thus determining that the verification has failed. The storage server then sends an error code, executing step 3110. The error code is NFS4ERR_BAD_STATEID or a setattr error code defined in NFSv4.2.

[0170] For another example, the storage server determines that the task identifier included in the setting status query request is different from the task identifier stored in the storage server, and the verification code included in the setting status query request is different from the reception time of the setting request stored in the storage server. The storage server determines that the verification fails and discards the setting status query request.

[0171] Step 390: The storage server sends a setting status query response.

[0172] The Set Status Query Response indicates the result of setting the file attributes of multiple files according to the Set Request. The Set Status Query Response indicates success, failure, or retrying.

[0173] If the storage server completes setting file attributes for multiple files, the result indicates success or failure. If the storage server fails to complete the setting, the result indicates a recheck. This frees up the channel between the client and the storage server for the file attribute setting task, allowing the client to use the freed channel to establish connections with the storage server for other tasks, improving network resource utilization.

[0174] Step 3100: The client receives a setting status query response sent by the storage server.

[0175] The setting result is used to indicate success, and the client determines that the file attributes of multiple files are set.

[0176] The setting result is used to indicate a failure. The client can resend the setting request to request the storage server to set the file attributes of multiple files.

[0177] The setting result indicates a recheck. If the client determines that the storage server has not yet completed setting the file attributes of the multiple files, the client can wait for the storage server to set the file attributes of the multiple files and then send a setting status query request again to query the setting status of the file attributes of the multiple files. In other words, the client and the storage server execute steps 370 to 3120 again.

[0178] Step 3110: The storage server sends an error code.

[0179] If the task identifier verification based on the check code fails, it indicates that the storage server may encounter an error when setting the file attributes of multiple files. The error code may be NFS4ERR_BAD_STATEID.

[0180] Step 3120: The client receives the error code sent by the storage server.

[0181] If the client receives an error code or a setting result indicating failure, and determines that the file attributes of multiple files are set incorrectly, the client can resend the setting request to request the storage server to set the file attributes of multiple files.

[0182] Therefore, the client obtains the setting results by querying the setting status of the file attributes of multiple files again, avoiding the channel (slot) on the session (slot) between the storage server and the client from being occupied all the time, thereby improving the utilization rate of the channel.

[0183] Next, the storage server sending a setup response in an asynchronous manner is described.

[0184] FIG6 is a schematic diagram of an asynchronous feedback setting response provided by the present application. The difference from the file attribute setting shown in FIG3 above is that the storage server does not need to wait for the setting results of the file attributes of multiple files, but directly feedbacks the setting response. The setting result is used to indicate waiting for the storage server to feedback the setting results of the file attributes of multiple files. The client starts asynchronous listening and listens for the storage server to feedback the setting results. The setting response may include a task identifier and an error code. The task identifier is used to indicate the file attribute setting task performed by the storage server according to the setting request. Optionally, the setting response may also include a check code, which may be determined based on the sending time of the setting request. For example, the task identifier may be rsr_callback_id, the error code may be NFS4_PENDING, and the check code may be rsr_recursiveverf. When rsr_callback_id = 1, rsr_recursiveverf = 1, and the error code is NFS4_OK or PENDING, it means that the storage server instructs the client to wait for the storage server to feedback the setting results of the file attributes of multiple files.

[0185] This method differs from the file attribute setting method shown in Figure 5(b) above in that the client does not need to send a setting status query request, i.e., it does not need to execute steps 370 to 3120. The client asynchronously monitors the storage server for feedback on the setting results. As shown in Figure 6, the above method flow also includes the following steps 3130 to 3180.

[0186] Step 3130: The storage server sends a callback message.

[0187] After the storage server completes setting the file attributes of multiple files, it sends a callback message. The callback message includes a task identifier and a setting result. The task identifier indicates the file attribute setting task that the storage server executed based on the setting request. The setting result can be either success or failure.

[0188] If the storage server successfully sets the file attributes for multiple files, the result is set to indicate success. If the storage server fails to set the file attributes for multiple files, the result is set to indicate failure.

[0189] Step 3140: The client receives the callback message sent by the storage server.

[0190] The client determines whether the task identifier included in the callback message is the same as the task identifier stored in the client. If the task identifier included in the callback message is the same as the task identifier stored in the client, the client determines success or failure based on the setting result and sends a callback response, that is, executes step 3150.

[0191] The client receives a callback message indicating that the setting result failed and determines that the file attributes of multiple files were set incorrectly. The client can then resend the setting request to request the storage server to set the file attributes of multiple files.

[0192] Optionally, the callback message may also include a verification code.

[0193] The client may also verify the task identifier according to the verification code. When the verification of the task identifier according to the verification code is successful, a callback response is sent, and step 3150 is executed.

[0194] When the task identifier verification fails according to the verification code, step 3170 is executed to send an error code.

[0195] For example, the verification code is the time at which the client sent the setup request. The callback message includes the task identifier and the verification code. The client determines that the task identifier included in the callback message is the same as the task identifier stored on the client, and that the verification code included in the callback message is the same as the time at which the setup request was sent stored on the client. The client then determines that the verification is successful and proceeds to step 3150.

[0196] For another example, if the client determines that the task identifier included in the callback message is the same as the task identifier stored on the client, but the verification code included in the callback message is different from the time the setting request was received stored on the client, the client determines that the verification has failed. The client then sends an error code and terminates the file attribute setting task indicated by the task identifier, executing step 3170.

[0197] For another example, the client determines that the task identifier included in the callback message is different from the task identifier stored in the client, and the verification code included in the callback message is different from the reception time of the setting request stored in the client, determines that the verification fails, and discards the callback message.

[0198] Step 3150: The client sends a callback response.

[0199] Step 3160: The storage server receives the callback response sent by the client.

[0200] The callback response is used to indicate callback success or callback failure.

[0201] Step 3170: The client sends an error code.

[0202] When the task identifier verification based on the verification code fails, the error code sent by the client may be NFS4ERR_BAD_STATEID.

[0203] Step 3180: The storage server receives the error code sent by the client.

[0204] Optionally, the storage server may cancel the task of setting the file attributes and discard the setting result of the file attributes.

[0205] Therefore, the client asynchronously listens to the setting results and obtains the setting results, avoiding the channel (slot) on the session (slot) between the storage server and the client being occupied all the time, thereby improving the utilization of the channel.

[0206] The synchronous mode and the asynchronous mode are described below with reference to Table 1.

[0207] Table 1

[0208] As shown in Table 1, when the storage server synchronously responds to a setup response and the timer hasn't expired, the setup response sent to the client indicates success or failure. When the timer expires, the setup response sent to the client indicates a pending state. Furthermore, the storage server receives a setup status query request from the client and sends a setup status query response indicating success, failure, or a pending state. When the storage server asynchronously responds to a setup response, the setup response sent to the client indicates a pending state. Furthermore, the storage server sends a callback message to the client indicating success or failure and receives a callback response.

[0209] In another possible implementation, if the client waits for a long time for the storage server to feed back a setting response, the client may actively cancel the file attribute setting task. Then, the started setting task will be forcibly terminated along with the destruction of the session.

[0210] FIG7 is a schematic diagram of canceling a file attribute setting provided by the present application. As shown in FIG7 , the above method flow further includes the following steps 710 to 750 .

[0211] Step 710: The client sends a setting cancellation request.

[0212] In some embodiments, when the storage server returns a setting response in the first possible implementation of the synchronous mode, the storage server may be unable to return the setting response in a timely manner due to the large number of files and the storage server taking a long time to set the file attributes. In this case, the client may send a setting cancellation request to the storage server.

[0213] In other embodiments, the client receives a callback message and fails to verify the task identifier, as described in step 3140, and the client may send a setting cancellation request to the storage server.

[0214] A set cancellation request is used to cancel the task corresponding to the set request. The set cancellation request may include a task identifier.

[0215] Step 720: The storage server receives the setting cancellation request sent by the client.

[0216] Step 730: The storage server cancels the task corresponding to the setting request according to the setting cancellation request.

[0217] The storage server terminates the file attribute setting task indicated by the setting cancellation request including the task identifier, and terminates the setting of the file attributes of the plurality of files.

[0218] In some embodiments, the storage server may have already set file attributes for some of the multiple files, and canceling the task corresponding to the setting request according to the setting cancellation request may mean stopping the task of setting file attributes for the multiple files and not continuing to set attributes for the files for which attributes have not yet been set.

[0219] Step 740: The storage server sends a setting cancellation response.

[0220] Step 750: The client receives a setting cancellation response sent by the storage server.

[0221] The cancellation response is used to indicate whether the cancellation is successful or unsuccessful. If the storage server completes setting the file attributes of multiple files, it returns the error code NFS4_OK.

[0222] In this way, if the client waits a long time for the storage server to respond with the setting result, the client can proactively send a setting cancellation request, and the storage server will cancel the file attribute settings for multiple files. This prevents the client and storage server from occupying the channel for a long time and wasting resources. After canceling the file attribute settings, the client can also re-initiate a file attribute setting request to instruct the storage server to re-execute the file attribute settings.

[0223] The following is an example of the relevant command words (or operation words) for setting file attributes provided by this application.

[0224] 1. Operation word 1: RECURSIVE_SET – recursively set the attributes of a directory and its subitems

[0225] The RECURSIVE_SET operation word is used by the client to instruct the storage server to set the file attributes of a file and its multiple sub-files. RECURSIVE_SET can be set within, after, or before the setattr operation word.

[0226] The storage service receives the setattr operation word. If the setattr operation word does not include the RECURSIVE_SET operation word, the file attribute setting is performed according to the setattr operation word.

[0227] If the setattr operation word includes the RECURSIVE_SET operation word, the storage server determines to perform recursive setting on the file attributes of the file and its multi-level sub-files.

[0228] If the storage server completes the file attribute setting and the file attribute is successfully set, the value of rsr_callback_id can be 0 and the value of rsr_recursiversr_recursiveverf can be 0.

[0229] The client recognizes that both rsr_callback_id and rsr_recursiversr_recursiveverf are 0 and determines that the storage server has successfully set file attributes. If the storage server successfully sets the file attributes for multiple files, the result includes the success parameter NFS4_OK. The client determines that the file attributes are successful based on the success parameter. If the storage server fails to set the file attributes for multiple files, the result includes the failure parameter. The client determines that the file attributes failed based on the success parameter.

[0230] If the storage server has not completed the file attribute setting, the value of rsr_callback_id can be non-zero, and the value of rsr_recursiversr_recursiveverf can be non-zero. For example, the values ​​of rsr_callback_id and rsr_recursiversr_recursiveverf are both 1.

[0231] The client detects that the values ​​of rsr_callback_id and rsr_recursiversr_recursiveverf are both 1, indicating that the storage server has not completed the file attribute setting. Based on NFS4_OK, the file attribute setting is correct.

[0232] The above-mentioned meanings of the values ​​of rsr_callback_id and rsr_recursiversr_recursiveverf are merely examples and are not limited in this application. In practical applications, the values ​​of rsr_callback_id and rsr_recursiversr_recursiveverf may also be other values.

[0233] In addition, when the value of rsa_sync is true, it means that the storage server sends the setup response in a synchronous manner.

[0234] 1) The client waits for the storage server to feed back a setting response. After the storage server completes setting the file attributes of multiple files, the storage server obtains the setting result, and the client receives the setting response sent by the storage server.

[0235] 2) The storage server can set a response based on the timer feedback. If the timer does not expire, the storage server receives the setting result and sends a setting response to the client. The values ​​of rsr_callback_id and rsr_recursiversr_recursiveverf are both 0. The client successfully determines the file attributes based on the success parameters, or fails to determine the file attributes based on the success parameters.

[0236] When the timer expires, the storage server has not completed setting file attributes for multiple files. The storage server sends a set response to the client. The set response includes the error code NFS4ERR_PENDING, and the values ​​of rsr_callback_id and rsr_recursiversr_recursiveverf are both 1. The client decides whether to recheck or wait based on rsr_callback_id, rsr_recursiversr_recursiveverf, and the error code NFS4ERR_PENDING.

[0237] The client waits for a while and executes operation word 2 to query the progress of the file attribute setting. If the client receives the error code NFS4ERR_PENDING again, it executes operation word 2 again to query the progress of the file attribute setting.

[0238] 2. Operation word 2: RECURSIVE_SET_STATUS – query the setting results of the recursive setting directory and its subitems

[0239] The RECURSIVE_SET_STATUS operation word is used by the client to query the status of a recursive setting (properties of a directory and its subitems) task.

[0240] If the storage server completes setting the attributes of the directory and its subitems, it returns NFS4_OK. For example, the value of rssr_status is NFS4_OK.

[0241] If the storage server encounters any error while setting the attributes of a directory and its subitems, an error code is returned. This application does not extend or modify the error code, and the error code is consistent with the error code that may appear in the setattr operation word.

[0242] If the storage server has not yet completed setting the attributes of the directory and its subitems, it returns NFS4_PENDING. For example, the value of rssr_status is NFS4_PENDING.

[0243] 3. Operation word 3: RECURSIVE_SET_CANCEL – The client cancels the task of setting file attributes.

[0244] When the client needs to cancel the task of setting file attributes, it can send the RECURSIVE_SET_CANCEL operation word. The value of rsca_stateid can be the task ID of the task to be canceled.

[0245] The value of rsc_stateid comes from the response message of RECURSIVE_SET, for example, the task ID included in the response of the set status query.

[0246] If the storage server fails to cancel the task, it returns NFS4ERR_DELAY and the value of rscr_status is NFS4ERR_DELAY. After the client cancels the failed response, it delays and resends the setup request.

[0247] If the storage server completes setting the attributes of the directory and its subitems, it returns NFS4_OK. The value of rscr_status is NFS4_OK.

[0248] 4. Operation word 4: CB_RECURSIVE_SET_NOTIFY – recursively set the attributes of a directory and its subitems. Task result callback (used asynchronously, server to client)

[0249] The CB_RECURSIVE_SET_NOTIFY operation word is used by the storage server to call back the client, that is, the storage server notifies the client of the result of recursively setting the attributes of the directory and its subitems.

[0250] If the storage server completes setting the attributes of the directory and its subitems, it returns NFS4_OK. The value of crsnr_status is NFS4_OK.

[0251] If the storage server encounters any error while setting the attributes of a directory and its subitems, an error code is returned. This application does not extend or modify the error code, and the error code remains consistent with the error code that may appear in the setattr operation word.

[0252] It is understandable that in order to implement the functions in the above embodiments, the client and server (such as a storage server) include hardware structures and / or software modules corresponding to the execution of each function. It should be readily apparent to those skilled in the art that, in combination with the units and method steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0253] In the above, in conjunction with Figures 1 to 7, the locking method and lock recovery method provided by the present application are described in detail. The following will be combined with Figures 8 to 9 to describe the device provided by the present application. These devices can be used to implement the functions of the client or the storage server in the above method embodiments, and thus can also achieve the beneficial effects of the above method embodiments. In this embodiment, the device can be a device as shown in Figures 3, 5, 6 or 7, or it can be a module (such as a chip) applied to the server or a module (such as a chip) applied to the client.

[0254] As shown in Figure 8, the client 800 includes a communication module 810, a processing module 820, and a storage module 830. The client 800 is used to implement the functions of the client in the method embodiments shown in Figures 3, 5, 6, or 7 above.

[0255] The communication module 810 is configured to send a setting request, where the setting request is used to instruct to set file attributes of multiple files. For example, the communication module 810 is configured to execute step 310 in FIG. 3 .

[0256] The communication module 810 is further configured to receive a setting response, where the setting response indicates the result of setting the file attributes of the plurality of files according to the setting request. For example, the communication module 810 is configured to execute step 350 in FIG3 .

[0257] Optionally, the communication module 810 is further configured to send a setting status query request, where the setting status query request includes a task identifier. For example, the communication module 810 is configured to execute step 370 in FIG5 .

[0258] Optionally, the communication module 810 is further configured to receive a setting status query response, the setting status query response being used to indicate a setting result of setting the file attributes of the plurality of files according to the setting request. For example, the communication module 810 is configured to execute step 3100 in FIG5 .

[0259] Optionally, the communication module 810 is further configured to receive a callback message, the callback message including the task identifier and the setting result, the setting result including either success or failure. For example, the communication module 810 is configured to execute step 3140 in FIG6 .

[0260] Optionally, the communication module 810 is further configured to send a callback response, where the callback response is used to indicate a callback success or callback failure. For example, the communication module 810 is configured to execute step 3150 in FIG6 .

[0261] Optionally, the processing module 820 is configured to verify the task identifier.

[0262] Optionally, the communication module 810 is further configured to send a setting cancellation request, where the setting cancellation request is used to instruct to cancel the task corresponding to the setting request. For example, the communication module 810 is configured to execute step 710 in FIG. 7 .

[0263] Optionally, the communication module 810 is further configured to receive a setting cancellation response, where the setting cancellation response is used to indicate whether the cancellation is successful or failed. For example, the communication module 810 is configured to execute step 750 in FIG. 7 .

[0264] The storage module 830 is used to store the setting result and the file identifier so that the client can query the progress of the file attribute setting while waiting for the server to execute the file attribute setting.

[0265] As shown in Figure 9, the storage server 900 includes a communication module 910, a processing module 920, and a storage module 930. The storage server 900 is used to implement the functions of the storage server in the method embodiments shown in Figures 3, 5, 6, or 7 above.

[0266] The communication module 910 is configured to receive a setting request, where the setting request is used to instruct to set file attributes of multiple files. For example, the communication module 910 is configured to execute step 320 in FIG. 3 .

[0267] The communication module 910 is further configured to send a setting response, where the setting response indicates the result of setting the file attributes of the plurality of files according to the setting request. For example, the communication module 910 is configured to execute step 340 in FIG. 3 .

[0268] The processing module 920 is configured to set the file attributes of the plurality of files according to the setting request. For example, the processing module 920 is configured to execute step 330 in FIG3 .

[0269] Optionally, the communication module 910 is further configured to receive a setting status query request, where the setting status query request includes a task identifier. For example, the communication module 910 is configured to execute step 390 in FIG5 .

[0270] Optionally, the communication module 910 is further configured to send a setting status query response, the setting status query response being used to indicate a setting result of setting the file attributes of the plurality of files according to the setting request. For example, the communication module 910 is configured to execute step 390 in FIG5 .

[0271] Optionally, the communication module 910 is further configured to send a callback message, the callback message including the task identifier and the setting result, the setting result including either success or failure. For example, the communication module 910 is configured to execute step 3130 in FIG6 .

[0272] Optionally, the communication module 910 is further configured to receive a callback response, where the callback response indicates a success or failure of the callback. For example, the communication module 910 is configured to execute step 3160 in FIG6 .

[0273] Optionally, the processing module 920 is configured to verify the task identifier.

[0274] Optionally, the communication module 910 is further configured to receive a setting cancellation request, where the setting cancellation request is used to instruct to cancel the task corresponding to the setting request. For example, the communication module 910 is configured to execute step 720 in FIG. 7 .

[0275] Optionally, the communication module 910 is further configured to send a setting cancellation response, where the setting cancellation response is used to indicate a cancellation success or a cancellation failure. For example, the communication module 910 is configured to execute step 740 in FIG. 7 .

[0276] The processing module 920 is configured to cancel the task corresponding to the setting cancellation request according to the setting cancellation request. For example, the processing module 920 is configured to execute step 730 in FIG7 .

[0277] The storage module 930 is used to store files, file attributes and setting results so that the server can feed back the setting results to the client.

[0278] It should be understood that the client 800 and storage server 900 of the embodiment of the present application can be implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), and the PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. When the method shown in Figures 3, 5, 6, or 7 is implemented by software, and each module thereof can also be a software module, the client 800 and storage server 900 and each module thereof can also be a software module.

[0279] According to the embodiment of the present application, the client 800 and the storage server 900 may correspond to executing the method described in the embodiment of the present application, and the above-mentioned and other operations and / or functions of each unit in the client 800 and the storage server 900 are respectively for implementing the corresponding processes of each method in Figure 3, Figure 5, Figure 6 or Figure 7. For the sake of brevity, they will not be repeated here.

[0280] FIG10 is a schematic diagram of the structure of a computer device 1000 provided in this application. As shown in FIG10 , computer device 1000 includes a processor 1010, a bus 1020, a memory 1030, a communication interface 1040, and a memory 1050 (also referred to as a main memory unit). Processor 1010, memory 1030, memory 1050, and communication interface 1040 are connected via bus 1020.

[0281] It should be understood that in this embodiment, the processor 1010 may be a CPU, or may be other general-purpose processors, digital signal processors (DSPs), ASICs, FPGAs, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0282] The processor may also be a graphics processing unit (GPU), a neural network processing unit (NPU), a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the present application.

[0283] Communication interface 1040 is used to enable communication between computer device 1000 and external devices or components. In the present application, when computer device 1000 is used to implement the client functions shown in Figures 3, 5, 6, or 7, communication interface 1040 is used to send setting requests. When computer device 1000 is used to implement the storage server functions shown in Figures 3, 5, 6, or 7, communication interface 1040 is used to receive setting requests so that processor 1010 can set file attributes of multiple files based on the setting requests.

[0284] The bus 1020 may include a path for transmitting information between the above-mentioned components (such as the processor 1010, the memory 1050, and the storage 1030). In addition to the data bus, the bus 1020 may also include a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are labeled as bus 1020 in the figure. The bus 1020 may be a Peripheral Component Interconnect Express (PCIe) bus, an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), etc. The bus 1020 can be divided into an address bus, a data bus, a control bus, etc.

[0285] As an example, computer device 1000 may include multiple processors. The processor may be a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and / or computing units for processing data (e.g., computer program instructions).

[0286] It is worth noting that FIG10 only takes the computer device 1000 including 1 processor 1010 and 1 memory 1030 as an example. Here, the processor 1010 and the memory 1030 are respectively used to indicate a type of device or equipment. In a specific embodiment, the number of each type of device or equipment can be determined according to business requirements.

[0287] Memory 1050 may be a volatile memory pool or a nonvolatile memory pool, or may include both volatile and nonvolatile memory. Nonvolatile memory may be read-only memory (ROM), programmable ROM (PROM), erasable programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM). Memory 1050 is used to store file attributes, setting results, and the like.

[0288] The memory 1030 may correspond to a storage medium used to store information such as files, file attributes, and setting results in the above method embodiments, for example, a disk such as a mechanical hard disk or a solid-state drive.

[0289] The computer device 1000 may be a general-purpose device or a dedicated device. For example, the computer device 1000 may be an edge device (e.g., a box carrying a chip with processing capabilities). Alternatively, the computer device 1000 may also be a server or other device with computing capabilities.

[0290] It should be understood that the computer device 1000 according to this embodiment may correspond to the client 800 and the storage server 900 in this embodiment, and may correspond to executing the corresponding subject in any method in Figure 3, Figure 5, Figure 6 or Figure 7, and the above-mentioned and other operations and / or functions of each module in the client 800 and the storage server 900 are respectively for realizing the corresponding processes of each method in Figure 3, Figure 5, Figure 6 or Figure 7, which will not be repeated here for the sake of brevity.

[0291] The method steps in this embodiment can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and storage medium can be located in an ASIC. In addition, the ASIC can be located in a computing device. Of course, the processor and storage medium can also exist as discrete components in a computing device.

[0292] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the process or function described in the embodiments of the present application is performed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device or other programmable device. The computer program or instruction can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer program or instruction can be transmitted from one website, computer, server or data center to another website, computer, server or data center via wired or wireless means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, a hard disk, or a tape; it can also be an optical medium, such as a digital video disc (DVD); it can also be a semiconductor medium, such as a solid state drive (SSD). The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A method for setting file attributes, characterized in that, Including: Sending a setting request to a storage system, the setting request being used to set file attributes of multiple files; Receiving a setting response, the setting response being used to indicate: according to the setting request, the setting result of the file attributes of the multiple files.

2. The method according to claim 1, wherein The setting request includes a recursive setting parameter, the recursive setting parameter being used to indicate setting the file attributes of the first file and the multi-level sub-files included in the first file.

3. The method according to claim 1 or 2, characterized in that, The setting request includes a file identifier of a first file among the multiple files.

4. The method according to any one of claims 1 to 3, characterized in that, The setting result is used to indicate success or failure.

5. The method according to any one of claims 1 to 3, characterized in that, The setting result is used to indicate recheck.

6. The method according to claim 5, wherein The setting request includes a synchronization identifier; the synchronization identifier is used to indicate that the storage system feeds back the setting response in a synchronous manner; the setting response includes a task identifier and a first error code, when the first error code is used to indicate recheck; After receiving the setting response, the method further includes: Sending a setting status query request, the setting status query request including the task identifier; Receiving a setting status query response, the setting status query response being used to indicate: according to the setting request, the setting result of the file attributes of the multiple files.

7. The method according to any one of claims 1 to 3, characterized in that, The setting result is used to indicate waiting for the setting result fed back by the storage system.

8. The method according to claim 7, characterized in that The setting request includes an asynchronous identifier; the asynchronous identifier is used to indicate that the storage system feeds back the setting response in an asynchronous manner; the setting response includes a task identifier and a first error code, when the first error code is used to indicate waiting; After receiving the setting response, the method further includes: Receiving a callback message, the callback message including a task identifier and a setting result of the file attributes of the multiple files, the setting result including any one of success or failure; Sending a callback response.

9. The method according to claim 8, characterized in that, The callback message further includes a check code; Sending a callback response, including: When the task identifier is successfully verified according to the check code, sending the callback response; After receiving the callback message, the method further includes: When the task identifier fails to be verified according to the check code, sending a second error code.

10. The method according to any one of claims 5-9, characterized in that, The method further includes: Sending a setting cancellation request to the storage system, the setting cancellation request being used to indicate canceling the task corresponding to the setting request; Receiving a setting cancellation response sent by the storage system, the setting cancellation response being used to indicate cancellation success or cancellation failure.

11. The method according to claim 6 or 8, characterized in that, The setting response includes a task identifier and a first error code NFS4_OK; or, the setting response includes a task identifier and a first error code PENDING.

12. A method for setting file attributes, characterized in that, Including: A storage system receives a setting request, the setting request being used to set file attributes of multiple files; Setting the file attributes of the multiple files according to the setting request; Sending a setting response, the setting response being used to indicate: according to the setting request, the setting result of the file attributes of the multiple files.

13. The method according to claim 12, wherein Setting the file attributes of the multiple files according to the setting request, specifically including: Querying all sub-files under the file; Setting all the queried sub-files according to the file attributes.

14. The method according to claim 12 or 13, characterized in that, The setting request includes a recursive setting parameter and a file identifier of a first file among the multiple files, where the recursive setting parameter is used to indicate setting the file attributes of the first file and the file attributes of multiple levels of sub-files included in the first file.

15. The method according to any one of claims 12 - 14, characterized in that, The setting request includes a synchronization identifier; the synchronization identifier is used to indicate that the storage system feeds back the setting response in a synchronous manner; The sending of the setting response includes: When the timer does not time out, send the setting response, which is used to indicate whether the setting of the file attributes of the multiple files is successful or failed according to the setting request.

16. The method according to any one of claims 12 - 14, characterized in that The setting request includes a synchronization identifier; The sending of the setting response includes: When the timer times out, send the setting response, which is used to indicate re-checking the setting result of the file attributes of the multiple files according to the setting request.

17. The method according to claim 16, wherein The setting response includes a task identifier and a first error code, where the first error code is used to indicate re-checking; After the sending of the setting response, the method further includes: Receiving a setting status query request, where the setting status query request includes the task identifier; Sending a setting status query response, which is used to indicate: the setting result of the file attributes of the multiple files according to the setting request.

18. The method according to claim 17, wherein The setting status query request further includes a check code; The sending of the setting status query response includes: When the task identifier is successfully verified according to the check code, send the setting status query response; The method further includes: When the task identifier is verified to be failed according to the check code, send a second error code.

19. The method according to any one of claims 12 - 14, characterized in that, The setting request includes an asynchronous identifier; the asynchronous identifier is used to indicate that the storage system feeds back the setting response in an asynchronous manner; the setting response is used to indicate waiting for the setting result of the file attributes of the multiple files according to the setting request; The setting response includes a task identifier and a first error code, where the first error code is used to indicate waiting; After the sending of the setting response, the method further includes: Sending a callback message, where the callback message includes the task identifier and the setting result of the file attributes of the multiple files, and the setting result includes either success or failure; Receiving a callback response.

20. The method according to any one of claims 16 - 19, characterized in that, The method further includes: Receiving a setting cancellation request, which is used to indicate canceling the task corresponding to the setting request; Canceling the task corresponding to the setting request according to the setting cancellation request; Sending a setting cancellation response, which is used to indicate whether the cancellation is successful or failed.

21. The method according to claim 17 or 19, characterized in that, The setting response includes a task identifier and a first error code NFS4_OK; or, the setting response includes a task identifier and a first error code PENDING.

22. A client, characterized in that, The client includes a module for performing the operation steps of the method according to any one of claims 1-11 above.

23. A storage server, characterized in that, The storage server includes a module for performing the operation steps of the method according to any one of claims 12-21 above.

24. A computer device, characterized in that, The computer device includes a memory and a processor, the memory is used for storing a set of computer instructions; when the processor executes the set of computer instructions, it performs the operation steps of the method described in any one of claims 1-11 above; or, it performs the operation steps of the method described in any one of claims 12-21 above.

25. A communication system, characterized in that, The communication system includes a client and multiple storage servers, the client mounts the multiple storage servers, the client is used for performing the operation steps of the method described in any one of claims 1-11 above, and the storage server is used for performing the operation steps of the method described in any one of claims 12-21 above.

Citation Information

Patent Citations

  • File attribute setting method, client, storage server, equipment and system

    CN120223704A

  • Method and device for protecting stored data

    CN103729265A

  • Data synchronization method and device, electronic equipment and storage medium

    CN110865985A

  • File permission control list management method and related components

    CN112351062A

  • File attribute setting method and device

    CN119106019A