File attribute setting method and device
By implementing batch attribute settings for multiple objects on the NAS server side, the problems of low attribute setting efficiency and high network resource consumption in the existing technology are solved, the efficiency and flexibility of attribute setting of NAS servers are improved, and network resources are reduced Consumption.
Patent Information
- Application Number
- CN202311199286.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-06-08
- Filing Date
- 2023-09-15
- Publication Date
- 2024-12-10
AI Technical Summary
In a network file system, when users need to set attributes for a large number of directories or files, the existing technology is inefficient and consumes a lot of network resources, and they need to send a large number of query requests and attribute setting requests through the client.
The NAS server can set batch attributes of files and subdirectories in the target directory based on the attribute setting request of the NAS client, including owner attributes, read-only attributes, hidden attributes, time attributes and permission attributes, which improves the efficiency of attribute setting and reduces the Network resource consumption.
Through batch setting commands, the NAS server can complete the attribute setting of multiple objects in a single request, which improves the efficiency and flexibility of attribute setting, reduces network resource consumption, and supports synchronous and asynchronous settings to enhance the reliability of response messages and accuracy.
Smart Images

Figure CN119106019A_ABST
Abstract
Description
[0001] This application claims the priority of the Chinese patent application filed with the China Patent Office on June 8, 2023, with application number 202310677768.1 and invention name “A NAS operation method for batch setting file attributes”, the entire contents of which are incorporated by reference in this application. Technical Field
[0002] The present application relates to the field of computers, and in particular to a method and device for setting file attributes. Background Art
[0003] With the development of Internet technology, the network file system (NFS) has played an important role in distributed computing, cloud storage, and data sharing. The network file system is a network protocol for sharing files and file systems, allowing files and directories to be shared between different hosts.
[0004] In a network file system, a user can set the properties of directories and files in a network attached storage (NAS) server through a client. Currently, when a user sets the properties of directories and files in a NAS server through a client, it is necessary to perform property setting operations on the directories and files in the NAS server separately, that is, the client needs to first query the directory or file to be set, and then set the properties of the queried file or directory.
[0005] Therefore, currently when a user needs to set properties for a large number of directories or files in a network attached storage server, the user needs to send a large number of query requests and property setting requests through the client, resulting in low efficiency in setting properties of the network attached storage server. At the same time, a large number of property setting requests cause a large amount of network resources to be consumed. Summary of the invention
[0006] The present application provides a method for setting file attributes, in which a NAS server can batch set attributes for files and subdirectories under a target directory based on an attribute setting request sent by a NAS client, thereby improving the file attribute setting efficiency of the NAS server. The present application also provides a file attribute device, a computing device, a computing device cluster, a computer-readable storage medium, and a computer program product corresponding to the file attribute setting method.
[0007] In a first aspect, the present application provides a method for setting file attributes, which can be executed by a network attached storage NAS server, or by a component of the NAS server, such as a processor, chip or chip system of the NAS server, or by a logic module or software that can implement all or part of the NAS server functions. The method provided in the first aspect includes: the network attached storage NAS server receives an attribute setting request sent by a client, wherein the attribute setting request is used to indicate a target directory and a target attribute, and the target directory includes multiple objects, the objects are files or subdirectories, and the subdirectories are such as folders. The NAS server sets attributes for multiple objects under the target directory according to the target attributes, and the target attributes include one or more of the following: owner attribute, read-only attribute, hidden attribute, time attribute and permission attribute. The NAS server sends a response message of the attribute setting request to the client.
[0008] In the present application, the NAS server can complete the batch setting of attributes of multiple objects in the NAS server based on a single request sent by the NAS client. Compared with the current NAS client performing a large number of directory queries and setting operations (needing to send a setting request for each subdirectory and file separately, and the NAS server performs separate settings for each setting request), the first aspect of the present application improves the efficiency of the NAS server's attribute setting by performing batch setting of attributes for multiple objects in the target directory based on the attribute batch setting command, while reducing the consumption of network resources. The multiple objects here include: multiple files, multiple directories, or a collection of files and directories.
[0009] In a possible implementation, the number of objects for which the NAS server sets attributes according to the target attributes is less than the total number of objects in the target directory. That is, the NAS server may also set attributes according to the target attributes for only a portion of the objects in the target directory. Specifically, the NAS server determines an attribute setting range, and sets attributes according to the target attributes for multiple objects within the attribute setting range.
[0010] In this application, the NAS server can perform batch attribute settings on some directories and files under the target directory, that is, the NAS server can set the attributes of files or directories based on the setting range of the batch attribute settings, thereby improving the flexibility of the NAS server in performing batch attribute settings.
[0011] In a possible implementation, the NAS client can pre-set the attribute setting range in the NAS server. Specifically, the NAS client configures the attribute inheritance relationship of different objects in the NAS server, and the attribute inheritance relationship includes the inheritance relationship between the upper-level directory and the lower-level directory, and the inheritance relationship between the upper-level directory and the file. The NAS server determines the attribute setting range based on the configured attribute inheritance relationship.
[0012] In this application, the NAS server can determine the attribute setting range based on the attribute inheritance relationship between directories at different levels, and only perform batch attribute setting on directories and files within the attribute setting range, thereby improving the flexibility of the NAS server in performing batch attribute setting.
[0013] In a possible implementation, the property setting request is also used to indicate to the NAS server the property setting modes of the multiple objects, and the property setting modes include synchronous setting modes and asynchronous setting modes. In the synchronous setting mode, the NAS server needs to return a response message to the property setting request within the corresponding setting time.
[0014] In this application, the NAS client can indicate to the NAS server the attribute setting method of multiple objects under the target directory through the attribute setting request, thereby improving the richness of the attribute batch setting method.
[0015] In a possible implementation, the setting mode of the attribute setting request is synchronous setting, and when the NAS server completes the attribute setting of multiple objects under the target directory within the setting time, the response message is used to indicate to the client that the attribute setting is completed. At this time, the response message includes the setting result of the attribute setting.
[0016] In the present application, during the process of synchronous setting of attribute batch settings between the NAS client and the NAS server, if the NAS server completes the attribute batch setting within the setting time corresponding to the synchronous setting method, it can indicate the completion of the attribute setting to the NAS server through a response message, thereby improving the reliability of the response message under the synchronous setting method.
[0017] In a possible implementation, the setting mode of the attribute setting request is synchronous setting. When the NAS server fails to complete the attribute setting of multiple objects under the target directory within the setting time, the response message is used to indicate to the client that the attribute setting is abnormal. At this time, the response message includes a task identifier, verification information, and an error code, wherein the task identifier is used to indicate the target directory for batch attribute setting, the verification information is used to indicate to the NAS client the verification information required for the synchronous query request, and the error code is used to indicate the attribute setting is abnormal.
[0018] In the present application, during the process of synchronous setting of attribute batch settings between the NAS client and the NAS server, if the NAS server fails to complete the attribute batch setting within the setting time corresponding to the synchronous setting method, the NAS server can indicate the completion of the attribute setting to the NAS server through a response message, thereby improving the accuracy of the response message under the synchronous setting method.
[0019] In a possible implementation, the setting mode of the attribute setting request is synchronous setting. When the NAS server fails to complete the attribute setting of multiple objects under the target directory within the set time, the NAS server receives the synchronous query request sent by the client, generates a query response message based on the synchronous query request sent by the client, and sends the query response message to the client. The synchronous query request is used to query the attribute setting results of multiple objects under the target directory.
[0020] In the synchronous setting mode in the present application, when the NAS client receives a response message indicating that the attribute setting is abnormal, it can send a synchronous query request to the NAS server to query the setting results of the NAS server for batch attribute setting, thereby improving the attribute setting efficiency of the NAS server and reducing the consumption of network resources.
[0021] In a possible implementation, the setting mode of the attribute setting request is asynchronous setting, and the response message is used to indicate to the client that the attribute setting is abnormal. In this case, the response message includes a task identifier, verification information, and an error code, wherein the task identifier is used to indicate the target directory, the verification information is used to indicate to the NAS the verification information of the response message, and the error code is used to indicate that the attribute setting is abnormal. After receiving the response message, the NAS client starts the asynchronous message receiving task based on the response message.
[0022] In the present application, in the asynchronous setting mode, after the NAS server receives the attribute setting request, it directly sends a response message indicating the attribute setting exception to the NAS server, notifying the NAS server to start the asynchronous message receiving task, thereby improving the attribute setting efficiency of the NAS server and reducing the consumption of network resources.
[0023] In a possible implementation, the property setting request is set asynchronously. When the NAS server completes setting properties of multiple objects in the target directory, the NAS server actively sends an asynchronous message to the client. The asynchronous message is used to indicate to the client that the property setting is completed.
[0024] In the present application, in the asynchronous setting mode, after the NAS service completes the batch setting of attributes, it can send an asynchronous message to the NAS client, thereby notifying the NAS server that the batch setting of attributes is completed, thereby improving the efficiency of the NAS server in performing attribute setting and reducing the consumption of network resources.
[0025] In a possible implementation, when the task session where the attribute setting request is located is destroyed, the NAS server stops the attribute setting of multiple objects under the target directory. In the asynchronous setting mode, the asynchronous message receiving task of the NAS client will also be forcibly terminated when the task session is destroyed.
[0026] In the present application, when the task session in which the attribute setting request is located is destroyed, the NAS server can stop the attribute setting of multiple objects under the target directory, thereby improving the applicability of the attribute setting method of the present application in specific scenarios.
[0027] In a possible implementation manner, the permission attribute includes one or more of the following: read permission, write permission, delete permission, modify permission, and full control permission.
[0028] In the present application, the NAS server can batch set attributes of different permission attributes of multiple objects under the target directory in the NAS server based on the attribute setting request, thereby improving the application scope of the NAS server for setting permission attributes.
[0029] In a possible implementation manner, the NAS server receives a property setting request sent by the client through a network.
[0030] In the implementation of the present application, the NAS server receives the attribute setting request through the network, thereby performing batch setting of attributes of subdirectories and files under the target directory, thereby reducing the consumption of network resources.
[0031] In a second aspect, the present application provides a device for setting file attributes, which includes a transceiver unit and a processing unit. The transceiver unit is used to receive an attribute setting request sent by a client, and the attribute setting request is used to indicate a target directory and a target attribute. The target directory includes multiple objects, and the objects are files or subdirectories. The processing unit is used to set attributes of multiple objects under the target directory according to the target attributes. The target attributes include one or more of the following: owner attribute, read-only attribute, hidden attribute, time attribute, and permission attribute. The transceiver unit is also used to send a response message of the attribute setting request to the client.
[0032] In a possible implementation manner, the processing unit is further configured to: the number of objects for which attributes are set according to the target attributes is less than the total number of objects in the target directory.
[0033] In a possible implementation, the setting mode of the attribute setting request is synchronous setting. When the NAS server completes the attribute setting of multiple objects under the target directory within the setting time, the response message is used to indicate to the client that the attribute setting is completed.
[0034] In a possible implementation, the setting mode of the attribute setting request is synchronous setting. When the NAS server fails to complete the attribute setting of multiple objects under the target directory within the setting time, the response message is used to indicate to the client that the attribute setting is abnormal.
[0035] In one possible implementation, the setting method of the attribute setting request is synchronous setting. When the NAS server fails to complete the attribute setting of multiple objects under the target directory within the set time, the transceiver unit is also used to send a query response message to the client based on the synchronous query request sent by the client. The synchronous query request is used to query the attribute setting results of multiple objects under the target directory.
[0036] In a possible implementation, the property setting request is set in an asynchronous manner, and the response message is used to indicate to the client that the property setting is abnormal.
[0037] In a possible implementation, the property setting request is set asynchronously, and the transceiver unit is further configured to actively send an asynchronous message to the client when the NAS server completes setting the properties of multiple objects under the target directory, and the asynchronous message is used to indicate to the client that the property setting is completed.
[0038] In a possible implementation manner, the processing unit is further configured to stop setting the attributes of the multiple objects under the target directory when the task session in which the attribute setting request is located is destroyed.
[0039] In a possible implementation manner, the permission attribute includes one or more of the following: read permission, write permission, delete permission, modify permission, and full control permission.
[0040] In a possible implementation manner, the transceiver unit is specifically configured to receive a property setting request sent by a client through a network.
[0041] In a third aspect, the present application provides a computing device, comprising a processor, the processor being coupled to a memory, the processor being used to store instructions, and when the instructions are executed by the processor, the computing device executes the method described in the first aspect or any possible implementation of the first aspect.
[0042] In a fourth aspect, the present application provides a computing device cluster, which includes one or more computing devices, each of which includes a processor, the processor is coupled to a memory, and the processor is used to store instructions. When the instructions are executed by the processor, the computing device cluster executes the method described in the first aspect or any possible implementation method of the first aspect.
[0043] In a fifth aspect, the present application provides a computer-readable storage medium having instructions stored thereon. When the instructions are executed, the computer executes the method described in the first aspect or any possible implementation of the first aspect.
[0044] In a sixth aspect, the present application provides a computer program product, which includes instructions. When the instructions are executed, the computer implements the method described in the first aspect or any possible implementation method of the first aspect.
[0045] It can be understood that the beneficial effects that can be achieved by any of the file attribute setting devices, computing devices, computing device clusters, computer-readable media or computer program products provided above can refer to the beneficial effects in the corresponding methods and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A schematic diagram of the system architecture of a network file system provided in an embodiment of the present application;
[0047] Figure 2 A flowchart of a method for setting file attributes provided in an embodiment of the present application;
[0048] Figure 3 A schematic diagram of a process for setting file attributes in a synchronous setting mode provided in an embodiment of the present application;
[0049] Figure 4 A schematic diagram of a process for setting file attributes in an asynchronous setting mode provided in an embodiment of the present application;
[0050] Figure 5 A schematic diagram of a file attribute setting device provided in an embodiment of the present application;
[0051] Figure 6 A schematic diagram of the structure of a computing device provided in an embodiment of the present application;
[0052] Figure 7 A schematic diagram of the structure of a computing device cluster provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] The embodiments of the present application provide a method and device for setting file attributes, which are used to improve the efficiency of setting attributes of a network attached storage server.
[0054] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0055] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0056] First, some terms involved in the embodiments of the present application are introduced to facilitate technical personnel in this field to understand the technical solution.
[0057] The Network File System (NFS) is a system that allows files and directories to be shared between different hosts. NFS works through a client-server model, where clients can access files and directories on the server through an interface. NFS can be used on Unix and Linux systems, providing file sharing and data access capabilities. NFS allows multiple users to access shared files simultaneously, and supports reading, writing, and executing operations on files.
[0058] A network attached storage (NAS) server is a specially designed storage device for storing and sharing data. A NAS server connects to a computer network and runs a file system and related services. It can exist independently or as part of a storage server or storage array. A NAS server provides simplified file access and sharing over a network, allowing multiple users to access and share stored files and data over the network.
[0059] The following describes the file attribute setting method and device provided by the embodiment of the present application in conjunction with the accompanying drawings. First, the system architecture used by the file attribute setting method provided by the embodiment of the present application is introduced.
[0060] See also Figure 1 , Figure 1 A schematic diagram of the system architecture of a network file system provided in an embodiment of the present application. Figure 1 In the system architecture shown, the network file system 10 includes a NAS client 101 and a NAS server 102. The specific functions of each part of the network file system 10 are described below.
[0061] The NAS client 101 is used to access and operate files stored in the NAS server 102. Specifically, the user can read, write, and manage files stored in the NAS server 102 through the NAS client 101. The user can also perform batch attribute setting on the directories and files in the NAS server 102 through the NAS client 101. For example, the user sends a file attribute batch setting request to the NAS server 102 through the NAS client 101, and the file attribute batch setting request instructs the NAS server 102 to set the attributes of the subdirectories and files under the target directory according to the target attributes.
[0062] The NAS client 101 can also provide a user display interface. The user accesses and manages files in the NAS server 102 based on the user display interface provided by the NAS client 101. The user can also perform functions such as file search, file synchronization, file backup and file version control through the user display interface provided by the NAS client 101.
[0063] It should be noted that the NAS client 101 may be a software client installed on a terminal device such as a computer, a mobile phone, or a tablet computer, or may be an independent hardware client device, without specific limitation.
[0064] The NAS server 102 is used to provide file storage services for the NAS client 101. For example, the NAS server 102 allows users to store files on the internal storage of the server through the NAS client 101, and share them with other NAS clients connected to the same network through the network. The NAS server 102 can also provide services such as file search, file synchronization, file backup and file version control.
[0065] The NAS server 102 is also used to perform batch setting of file attributes according to the batch setting request for file attributes sent by the NAS client 101. Specifically, the NAS server 102 performs attribute setting on the subdirectories and files under the target directory in the NAS server 102 according to the target attributes according to the target directory and target attributes carried in the batch setting request for file attributes.
[0066] It should be noted that the NAS client 101 and the NAS server support multiple protocols for communication, such as the server message block (SMB) protocol and the network file system (NFS) protocol, wherein the SMB protocol is applied to Windows systems, and the NFS protocol is applied to Linux or Unix systems. The NAS client and NAS server under the SMB protocol may also be referred to as the SMB client and SMB server, respectively, and the NAS client and NAS server under the NFS protocol may also be referred to as the NFS client and NFS server, respectively.
[0067] The following is based on Figure 1 The network file system shown introduces the file attribute setting method provided by the embodiment of the present application.
[0068] See also Figure 2 , Figure 2 A flowchart of a method for setting file attributes provided in an embodiment of the present application. Figure 2 In the example shown, the file attribute setting method provided by the embodiment of the present application includes the following steps:
[0069] 201. The NAS client sends a property setting request to the NAS server, where the property setting request is used to indicate a target directory and target attributes.
[0070] The NAS client 101 sends a property setting request to the NAS server 102. The property setting request is a file property batch setting request. The property setting request includes a target directory and a target property. The property setting request is used to request batch property setting for multiple objects under the target directory in the NAS server 102. The target directory is used to indicate the directory in the NAS server 102 whose properties are to be set, and the target property is used to indicate the property to be set.
[0071] In the NAS server 102, the target directory includes one or more objects, and the objects include subdirectories and files. The subdirectories are, for example, folders in the NAS server 102 (the directories in the embodiment of the present application include, for example, directories in Linux; or, folders in Windows systems). It is understandable that the subdirectories may also include the next-level subdirectories and files in the subdirectories.
[0072] The target attributes include one or more of the following: file owner attribute, read-only attribute, hidden attribute, time attribute, and permission attribute. Among them, the file ownership attribute is used to identify the ownership of the file. In most operating systems, the file owner attribute is defined and managed by the user or user group. The read-only attribute marks the file as readable but not modifiable, that is, the user can view the file content but cannot edit or delete it. The read-only attribute can protect the integrity of the file and prevent accidental changes.
[0073] The hidden attribute can specify the hidden state of a file or directory. The hidden attribute is often used to hide system files or sensitive files. The time attribute can specify different timestamps of a file, including creation time, modification time, and access time. The creation time indicates the date and time when the file was created, the modification time indicates the date and time when the file was last edited or modified, and the access time indicates the date and time when the file was last accessed.
[0074] Permission attributes are used to specify the access rights level of files and directories. Permission attributes determine the operation permissions of files and directories for different users or user groups. Permission attributes include one or more of the following: read permission, write permission, delete permission, modify permission, and full control permission.
[0075] In a possible implementation, the attribute setting request sent by the NAS client 101 to the NAS server 102 includes one or more command words. Specifically, the attribute setting request sent by the NAS client 101 to the NAS server 102 includes a SETATTR command word, and the SETATTR command word is used to set the attributes of files and subdirectories in the target directory. The parameters in the SETATTR command word exist in the form of key-value pairs, where the key represents the attribute to be modified and the value represents the new value to be set.
[0076] For example, when the NAS client 101 requests to change the owner attributes of multiple objects under the target directory through the SETATTR command word, the SETATTR command word is "SETATTR (directory, owner = new owner)". For another example, when the NAS client 101 requests to change the read-only attributes of multiple objects under the target directory through the SETATTR command word, the SETATTR command word is "SETATTR (directory, permissions = read only)".
[0077] In a possible implementation, the property setting request is also used to indicate the setting mode of the property batch setting, and the setting mode includes a synchronous setting mode and an asynchronous setting mode. Specifically, the property setting request may also include a PATH SET command word, and the PATH SET command word is used to indicate the property setting mode. Among them, when the isSync field in the PATH SET command word is true, the setting mode indicated by the PATH SET command word is a synchronous setting mode, and when the isSync field is false, the setting mode indicated by the PATH SET command word is an asynchronous setting mode.
[0078] 202. The NAS server sets attributes for multiple objects under the target directory according to the target attributes.
[0079] After the NAS server 102 receives the attribute setting request sent by the client 101, the NAS server 102 sets the attributes of the multiple objects under the target directory according to the target attributes based on the attribute setting request. Since the multiple objects under the target directory include subdirectories and files, the NAS server 102 can perform batch attribute setting on the multiple subdirectories and files under the target directory according to the target attributes, that is, the NAS server 102 sets the attributes of the multiple subdirectories and files under the target directory to the target attributes.
[0080] For example, in an example of step 202, the NAS server 102 receives a property setting request sent by the client 101, the target directory of the property setting request is "Directory 1", the target attributes are "read-only" and "owner 1", and the NAS server 102 sets the read-only attribute of all objects in the target directory to "read-only" according to the target attributes based on the property setting request, and modifies the owner attribute of all objects in the target directory to "owner 1".
[0081] In a possible implementation, the number of objects for which the NAS server 102 sets attributes according to the target attributes is less than the total number of objects in the target directory. That is, the NAS server 102 may also set attributes according to the target attributes for only a portion of the objects in the target directory. Specifically, the NAS server 102 determines an attribute setting range for batch attribute setting, and the attribute setting range is used to indicate the files and directories for which attribute setting is required. The NAS server 102 sets attributes according to the target attributes for multiple objects within the attribute setting range.
[0082] For example, in an example of step 202, the attribute setting range determined by the NAS server 102 is the subdirectories and files of the target directory, and the third-level directories and files under the subdirectories. Therefore, the NAS server 102 sets the attributes of the subdirectories and files within the attribute setting range, and the third-level directories and files under the subdirectories according to the target attributes.
[0083] It should be noted that the NAS client 101 can pre-set the attribute setting range in the NAS server 102. Specifically, the NAS client 101 configures the attribute inheritance relationship of different objects in the NAS server 102. The attribute inheritance relationship includes the inheritance relationship between the upper-level directory and the lower-level directory, and the inheritance relationship between the upper-level directory and the file. The NAS server 102 determines the attribute setting range based on the configured attribute inheritance relationship.
[0084] For example, in another example of step 202, the NAS client 101 can pre-configure the subdirectories under the target directory in the NAS server 102 to inherit the properties of the target directory, and the files under the target directory inherit the properties of the target directory. At the same time, the third-level directories under the subdirectories are configured to inherit the properties of the subdirectories, and the files under the subdirectories inherit the properties of the subdirectories. At the same time, the fourth-level directories and files under the third-level directory are configured not to inherit the properties of the third-level directory. Therefore, under the configuration of the above-mentioned attribute inheritance relationship, the NAS server 102 can determine the attribute setting range as the subdirectories and files under the target directory, and the third-level directories and files under the subdirectories based on the attribute inheritance relationship.
[0085] 203. The NAS server sends a response message of the attribute setting request to the NAS client.
[0086] The NAS server 102 performs batch attribute settings of the target directory according to the attribute setting request, and sends a response message of the attribute setting request to the NAS client 101. Since the setting mode indicated by the attribute setting request includes a synchronous setting mode and an asynchronous setting mode, the response message of the attribute setting request sent by the NAS server 102 to the NAS client 101 is also different in different attribute setting modes.
[0087] When the setting mode is the synchronous setting mode, after the NAS server 102 receives the attribute setting request, if the NAS server 102 completes the attribute setting of multiple objects under the target directory within the setting time, the response message of the attribute setting request is used to indicate the completion of the attribute setting to the NAS client 101. If the NAS server 102 does not complete the attribute setting of multiple objects under the target directory within the setting time, the response message of the attribute setting request is used to indicate the abnormality of the attribute setting to the client. After the NAS server 102 sends the response message of the attribute setting request to the NAS client 101, the NAS client 101 needs to send a synchronous query request to the NAS server 102 to obtain the attribute setting result.
[0088] When the setting mode is the asynchronous setting mode, after the NAS server 102 receives the property setting request, the NAS server 102 directly sends a response message of the property setting request to the NAS client 101, and the response message of the property setting request is used to indicate to the client that the property setting is abnormal. After the NAS server 102 sends the response message of the property setting request to the NAS client 101, after the NAS server 102 completes the property setting, it can send an asynchronous message to the NAS client 101, and the asynchronous message is used to indicate that the property setting is completed.
[0089] The following are combined Figure 3 and Figure 4 The illustrated embodiment describes in detail the interaction process between the NAS client 101 and the NAS server 102 in the synchronous setting mode and the asynchronous setting mode in the embodiment of the present application.
[0090] See also Figure 3 , Figure 3 A flowchart of a method for setting file attributes in a synchronous setting mode provided in an embodiment of the present application. Figure 3 In the example shown, the process of the file attribute setting method provided in the embodiment of the present application includes the following steps:
[0091] 301. The NAS client sends a property setting request to the NAS server, where the property setting request indicates that the property setting mode is a synchronous setting mode.
[0092] In step 301 of this embodiment, the NAS client 101 and the NAS client 102 are the same as those described above. Figure 2 In step 201 of the illustrated embodiment, the steps performed by the NAS client 101 and the NAS server 102 are similar and will not be described in detail.
[0093] It should be noted that the property setting mode indicated by the property setting request in step 301 is a synchronous setting mode. For example, the "isSync" field in the PATH SET command word of the property setting request is true.
[0094] 302. The NAS server sets attributes of the target directory according to the target attributes based on the attribute setting request.
[0095] Step 302 in this embodiment is similar to the above Figure 2 The steps performed by the NAS server 102 in step 202 of the illustrated embodiment are similar and will not be described in detail.
[0096] 303. The NAS server sends a response message of the attribute setting request to the NAS client.
[0097] In the synchronous setting mode, when the NAS server 102 fails to complete the attribute setting of multiple objects under the target directory within the setting time, the NAS server 102 sends a response message of the attribute setting request to the NAS client 101, and the response message of the attribute setting request is used to indicate to the client that the attribute setting is abnormal. At this time, the response message of the attribute setting request includes a task identifier (query ID), verification information (verf) and an error code, wherein the task identifier is used to indicate the target directory for batch attribute setting, the verification information is used to indicate the verification information of the synchronous query request to the NAS server, that is, the NAS server 102 verifies the received synchronous query request message based on the verification information, and the error code is used to indicate the abnormal attribute setting.
[0098] In an example of a synchronous setting method in step 303, when the NAS server 102 fails to complete the attribute setting of multiple objects under the target directory within the setting time, the NAS server 102 sends a response message of the attribute setting request to the NAS client 101. Among them, the "query_id" field in the attribute setting request response message is the task identifier, the "verf" field is the verification information, and the "NFS4_PENDING" field is the error code.
[0099] In the synchronous setting mode, if the NAS server 102 completes the attribute setting of multiple objects under the target directory within the setting time, the response message of the attribute setting request is used to indicate the completion of the attribute setting to the NAS client 101. At this time, the response message of the attribute setting request includes the attribute setting result.
[0100] In another example of a synchronous setting method in step 303 , when the NAS server 102 completes setting the attributes of multiple objects under the target directory, the NAS server 102 sends a response message to the NAS client 101 .
[0101] 304. The NAS client sends a synchronization query request to the NAS server.
[0102] In the synchronous setting mode, after the NAS client 101 receives the response message sent by the NAS server 102, when the response message indicates that the attribute setting of the NAS service 102 is abnormal, the NAS client 101 periodically sends a synchronous query message to the NAS server 102. The synchronous query request is used to query the attribute setting result of the target directory, wherein the synchronous query message includes a task identifier (query ID) and verification information (verf), and the task identifier and verification information are the task identifier and verification information carried in the response message of the attribute setting request.
[0103] In an example of step 304, the NAS client 101 sends a synchronization query request to the NAS server 102. The "query_id" field of the synchronization query request message is the task identifier, and the "verf" field is the verification information. The task identifier in the synchronization query request is consistent with the task identifier and verification information in the response message of the attribute setting request.
[0104] 305. The NAS server sends a query response message to the NAS client.
[0105] In the synchronization setting mode, after the NAS server 102 receives the synchronization query request sent by the NAS client 101, the NAS server 102 sends a query response message to the NAS client 101 based on the query result. Specifically, the NAS server 102 compares the task identifier and verification information of the synchronization query request with the task identifier and verification information cached in the NAS server 102. If the comparison is successful, the NAS server 102 receives the synchronization query request sent by the NAS client 101. If the comparison fails, the NAS server 102 rejects the synchronization query request sent by the NAS client 101.
[0106] After the NAS server 102 receives the synchronization query request sent by the NAS client 101, the NAS server 102 sends a query response message to the NAS client 101. If the NAS server 102 completes the attribute setting of multiple objects under the target directory within the set time, the query response message is used to indicate the completion of the attribute setting to the NAS client 101. At this time, the query response message includes the attribute setting result.
[0107] In an example of step 305 , after the NAS client 101 sends a synchronization query request to the NAS server 102 , the NAS server 102 completes the attribute setting of multiple objects under the target directory, and the NAS server 102 sends a query response message to the NAS client 101 .
[0108] If the NAS server 102 fails to complete the attribute setting of the multiple objects under the target directory within the set time, the query response message is used to indicate the attribute setting abnormality to the NAS client 101. At this time, the query response message includes a task identifier (query ID), verification information (verf) and an error code.
[0109] It is understandable that after the NAS client 101 receives the query response message, if the attribute setting of the NAS server 102 is not completed, the NAS client 101 can continue to send a synchronization query request to the NAS server 102. Specifically, the NAS client 101 can send a synchronization query request to the NAS server 102 again based on the task identifier and verification information in the query response message.
[0110] from Figure 3 It can be seen from the illustrated embodiment that in the synchronous setting mode, the NAS client 101 can actively send a synchronous query request to the NAS server 102 to query the setting result of the file attribute.
[0111] See also Figure 4 , Figure 4 A flowchart of a method for setting file attributes in an asynchronous setting mode provided in an embodiment of the present application. Figure 4 In the example shown, the process of the file attribute setting method provided in the embodiment of the present application includes the following steps:
[0112] 401. The NAS client sends a property setting request to the NAS server, where the property setting request indicates that the property setting mode is an asynchronous setting mode.
[0113] In step 401 of this embodiment, the NAS client 101 and the NAS server 102 are the same as those described above. Figure 2 In step 201 of the illustrated embodiment, the steps performed by the NAS client 101 and the NAS server are similar and will not be described in detail.
[0114] It should be noted that the property setting mode indicated by the property setting request in step 401 is an asynchronous setting mode. For example, the "isSync" field in the PATH SET command word of the property setting request is false.
[0115] 402. The NAS server sets attributes of the target directory according to the target attributes based on the attribute setting request.
[0116] Step 302 in this embodiment is similar to the above Figure 2 The steps performed by the NAS server 102 in step 202 of the illustrated embodiment are similar and will not be described in detail.
[0117] 403. The NAS server sends a response message of the attribute setting request to the NAS client.
[0118] In the asynchronous setting mode, after the NAS server 102 receives the property setting request sent by the client 101, the NAS server 102 directly sends a response message of the property setting request to the NAS client 101, and the response message is used to indicate to the client that the property setting is abnormal. At this time, the response message of the property setting request includes a task identifier (query ID), verification information (verf) and an error code, wherein the task identifier is used to indicate the target directory, the verification information is used to indicate the verification information of the response message to the NAS client 101, that is, the NAS client verifies whether the asynchronous message is sent by the corresponding NAS server based on the verification information, and the error code is used to indicate that the property setting is abnormal.
[0119] In the asynchronous setting mode, after the NAS server 102 sends a response message of the attribute setting request to the NAS client 101, the NAS server 102 sets attributes for multiple objects under the target directory of the NAS server 102 according to the target attributes based on the attribute setting request. The action of the NAS server 102 setting attributes according to the attribute setting request is similar to the action performed by the NAS server 102 in step 202 of the above embodiment, and will not be described in detail.
[0120] It should be noted that, in the asynchronous setting mode, after the NAS client 101 receives the response message sent by the NAS server 102, the NAS client 101 starts the asynchronous message receiving task, which includes waiting to receive the asynchronous message sent by the NAS server 102 and matching and checking the asynchronous message sent by the NAS server 102.
[0121] 404. When the NAS server attribute setting is completed, an asynchronous message is sent to the NAS client.
[0122] In the asynchronous setting mode, when the NAS server 102 completes the attribute setting, the NAS server 102 actively sends an asynchronous message to the NAS client 101, and the asynchronous message is used to indicate that the attribute setting of multiple objects under the target directory is completed according to the target attribute. The asynchronous message includes a task identifier (query_id), verification information (verf) and a setting result (status).
[0123] It should be noted that, after the NAS client 101 receives the asynchronous message sent by the NAS server 102, the NAS client 101 compares the task identifier and verification information in the asynchronous message with the task identifier and verification information in the response message previously received by the NAS client 101. If the comparison is successful, the NAS client 101 determines that the attribute setting is completed. If the comparison fails, the NAS client 101 returns an attribute setting exception.
[0124] In a possible implementation, when the task session where the attribute setting request is located is destroyed, the NAS server 102 stops the attribute setting of multiple objects under the target directory. In the asynchronous setting mode, the asynchronous message receiving task of the NAS client 101 will also be forcibly terminated when the task session is destroyed.
[0125] from Figure 3 It can be seen from the illustrated embodiment that in the asynchronous setting mode, after completing the attribute setting, the NAS server 102 will actively send an asynchronous message to the client 101 to notify the attribute batch setting result.
[0126] Based on the above Figures 2 to 4 It can be seen from the illustrated embodiment that the NAS server in the embodiment of the present application can perform batch attribute setting for multiple objects in the target directory according to target attributes based on the batch attribute setting request, thereby improving the attribute setting efficiency of the NAS server and reducing the consumption of network resources.
[0127] Based on the above method embodiment, the embodiment of the present application further provides a device for setting file attributes. The device for setting file attributes provided by the embodiment of the present application is described in detail below.
[0128] See also Figure 5 , Figure 5 A schematic diagram of the structure of a device for setting file attributes provided in an embodiment of the present application. Figure 5 In the example shown, the file attribute setting device 500 is used to implement each step executed by the NAS server in the above embodiments. The file attribute setting device 500 includes a transceiver unit 501 and a processing unit 502 .
[0129] The transceiver unit 501 is used to receive a property setting request sent by a client, the property setting request is used to indicate a target directory and a target attribute, the target directory includes multiple objects, and the objects are files or subdirectories. The processing unit 502 is used to set the attributes of the multiple objects in the target directory according to the target attributes, and the target attributes include one or more of the following: owner attribute, read-only attribute, hidden attribute, time attribute, and permission attribute. The transceiver unit 501 is also used to send a response message of the property setting request to the client.
[0130] In a possible implementation manner, the processing unit 502 is further configured to: the number of objects for which attributes are set according to the target attributes is less than the total number of objects in the target directory.
[0131] In a possible implementation, the setting mode of the attribute setting request is synchronous setting. When the NAS server completes the attribute setting of multiple objects under the target directory within the setting time, the response message is used to indicate to the client that the attribute setting is completed.
[0132] In a possible implementation, the setting mode of the attribute setting request is synchronous setting. When the NAS server fails to complete the attribute setting of multiple objects under the target directory within the setting time, the response message is used to indicate to the client that the attribute setting is abnormal.
[0133] In one possible implementation, the property setting request is set in a synchronous manner. When the NAS server fails to complete the property setting of multiple objects under the target directory within the set time, the transceiver unit 501 is also used to send a query response message to the client based on the synchronous query request sent by the client. The synchronous query request is used to query the property setting results of multiple objects under the target directory.
[0134] In a possible implementation, the property setting request is set in an asynchronous manner, and the response message is used to indicate to the client that the property setting is abnormal.
[0135] In a possible implementation, the property setting request is set asynchronously, and the transceiver unit 501 is further configured to actively send an asynchronous message to the client when the NAS server completes setting the properties of multiple objects under the target directory, and the asynchronous message is used to indicate to the client that the property setting is completed.
[0136] In a possible implementation, the processing unit 502 is further configured to stop setting the attributes of the multiple objects under the target directory when the task session containing the attribute setting request is destroyed.
[0137] In a possible implementation manner, the permission attribute includes one or more of the following: read permission, write permission, delete permission, modify permission, and full control permission.
[0138] In a possible implementation manner, the transceiver unit 501 is specifically configured to receive a property setting request sent by a client through a network.
[0139] It should be understood that the division of the units in the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And the units in the device can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some units can also be implemented in the form of software calling through processing elements, and some units can be implemented in the form of hardware. For example, each unit can be a separately established processing element, or it can be integrated in a certain chip of the device. In addition, it can also be stored in the memory in the form of a program, and called and executed by a certain processing element of the device. The function of the unit. In addition, all or part of these units can be integrated together, or they can be implemented independently. The processing element described here can also be a processor, which can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each unit above can be implemented by an integrated logic circuit of hardware in the processor element or in the form of software calling through a processing element.
[0140] It is worth noting that, for the above method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited to the described order of actions. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required for the present application.
[0141] Other reasonable step combinations that can be thought of by those skilled in the art based on the above description also fall within the scope of protection of this application. Secondly, those skilled in the art should also be familiar with the fact that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by this application.
[0142] See also Figure 6 , Figure 6 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. Figure 6 As shown, the computing device 600 includes: a processor 601, a memory 602, a communication interface 603 and a bus 604. The processor 601, the memory 602 and the communication interface 603 are coupled via a bus (not marked in the figure). The memory 602 stores instructions. When the execution instructions in the memory 602 are executed, the computing device 600 executes the method executed by the NAS server in the above method embodiment.
[0143] The computing device 600 may be one or more integrated circuits configured to implement the above method, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (digital signal processors, DSP), or one or more field programmable gate arrays (FPGA), or a combination of at least two of these integrated circuit forms. For another example, when the unit in the device can be implemented in the form of a processing element scheduler, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call a program. For another example, these units can be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0144] The processor 601 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.
[0145] The memory 602 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. The volatile memory may be a 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 dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0146] The memory 602 stores executable program codes, and the processor 601 executes the executable program codes to respectively implement the functions of the transceiver unit 501 and the processing unit 502, thereby implementing the above-mentioned method for setting file attributes. That is, the memory 602 stores instructions for executing the above-mentioned method for setting file attributes.
[0147] The communication interface 603 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 600 and other devices or a communication network.
[0148] In addition to the data bus, the bus 604 may also include a power bus, a control bus, a status signal bus, etc. The bus may be a peripheral component interconnect express (PCIe) bus, or 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 may be divided into an address bus, a data bus, a control bus, etc.
[0149] See also Figure 7 , Figure 7 A schematic diagram of a computing device cluster provided in an embodiment of the present application. Figure 7 As shown, the computing device cluster 700 includes at least one computing device 600 .
[0150] like Figure 7 As shown, the computing device cluster 700 includes at least one computing device 600. The memory 602 in one or more computing devices 600 in the computing device cluster 700 may store the same instructions for executing the above-mentioned method for setting file attributes.
[0151] In some possible implementations, the memory 602 of one or more computing devices 600 in the computing device cluster 700 may also respectively store partial instructions for executing the method for setting the above file attributes. In other words, the combination of one or more computing devices 600 may jointly execute the instructions for executing the method for setting the above file attributes.
[0152] It should be noted that the memory 602 in different computing devices 600 in the computing device cluster 700 may store different instructions, which are respectively used to execute part of the functions of the above-mentioned file attribute setting device. That is, the instructions stored in the memory 602 in different computing devices 600 may implement the functions of one or more modules in the transceiver unit 501 and the processing unit 502.
[0153] In some possible implementations, one or more computing devices 600 in the computing device cluster 700 may be connected via a network, which may be a wide area network or a local area network.
[0154] In another embodiment of the present application, a computer-readable storage medium is provided, in which computer-executable instructions are stored. When a processor of a device executes the computer-executable instructions, the device executes the method executed by the NAS server in the above method embodiment.
[0155] In another embodiment of the present application, a computer program product is provided, the computer program product includes computer executable instructions, the computer executable instructions are stored in a computer readable storage medium. When the processor of the device executes the computer executable instructions, the device executes the method executed by the NAS server in the above method embodiment.
[0156] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0157] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0158] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0159] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0160] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A method for setting file attributes, characterized in that: include: A network attached storage NAS server receives a property setting request sent by a client, wherein the property setting request indicates a target directory and a target property, wherein the target directory includes a plurality of objects, and the objects are files or subdirectories; Based on the attribute setting request, the NAS server sets attributes for multiple objects under the target directory according to the target attributes, where the target attributes include one or more of the following: owner attribute, read-only attribute, hidden attribute, time attribute, and permission attribute; The NAS server sends a response message of the attribute setting request to the client.
2. The method according to claim 1, characterized in that The method further comprises: The number of objects for which attributes are set according to the target attributes is less than the total number of objects under the target directory.
3. The method according to claim 1 or 2, characterized in that: The setting mode of the attribute setting request is synchronous setting, and the method further includes: When the NAS server completes the attribute setting of the multiple objects under the target directory within the set time, the response message is used to indicate to the client that the attribute setting is completed.
4. The method according to claim 1 or 2, characterized in that: The setting mode of the attribute setting request is synchronous setting, and the method further includes: When the NAS server fails to complete the attribute setting of the multiple objects under the target directory within the set time, the response message is used to indicate to the client that the attribute setting is abnormal.
5. The method according to any one of claims 1 to 4, characterized in that The setting mode of the attribute setting request is synchronous setting. When the NAS server fails to complete the attribute setting of the multiple objects under the target directory within the setting time, the method further includes: The NAS server sends a query response message to the client based on the synchronous query request sent by the client, where the synchronous query request is used to query the attribute setting results of multiple objects under the target directory.
6. The method according to claim 1 or 2, characterized in that: The setting mode of the property setting request is asynchronous setting, and the response message is used to indicate to the client that the property setting is abnormal.
7. The method according to any one of claims 1, 2 and 6, characterized in that The setting mode of the attribute setting request is asynchronous setting, and the method further includes: When the NAS server completes the attribute setting of the multiple objects under the target directory, the NAS server actively sends an asynchronous message to the client, where the asynchronous message is used to indicate to the client that the attribute setting is completed.
8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: When the task session where the attribute setting request is located is destroyed, the NAS server stops the attribute setting of the multiple objects under the target directory.
9. The method according to any one of claims 1 to 8, characterized in that The permission attributes include one or more of the following: read permission, write permission, delete permission, modify permission, and full control permission.
10. The method according to any one of claims 1 to 9, characterized in that The method further comprises: The NAS server receives the attribute setting request sent by the client through the network.
11. A device for setting file attributes, characterized in that: include: A transceiver unit, configured to receive a property setting request sent by a client, wherein the property setting request is used to indicate a target directory and target properties, wherein the target directory includes multiple objects, and the objects are files or subdirectories; A processing unit, configured to set attributes of multiple objects under the target directory according to the target attributes based on the attribute setting request, wherein the target attributes include one or more of the following: an owner attribute, a read-only attribute, a hidden attribute, a time attribute, and a permission attribute; The transceiver unit is further configured to send a response message of the property setting request to the client.
12. The device according to claim 11, characterized in that The processing unit is also used for: The number of objects for which attributes are set according to the target attributes is less than the total number of objects under the target directory.
13. The device according to claim 11 or 12, characterized in that The setting mode of the attribute setting request is synchronous setting. When the NAS server completes the attribute setting of multiple objects under the target directory within the setting time, the response message is used to indicate to the client that the attribute setting is completed.
14. The device according to claim 11 or 12, characterized in that The setting mode of the attribute setting request is synchronous setting. When the NAS server fails to complete the attribute setting of the multiple objects under the target directory within the setting time, the response message is used to indicate to the client that the attribute setting is abnormal.
15. The device according to any one of claims 11 to 14, characterized in that The setting mode of the attribute setting request is synchronous setting. When the NAS server fails to complete the attribute setting of the multiple objects under the target directory within the setting time, the transceiver unit is further used to: Based on the synchronous query request sent by the client, a query response message is sent to the client, wherein the synchronous query request is used to query the attribute setting results of multiple objects under the target directory.
16. The device according to claim 11 or 12, characterized in that The setting mode of the property setting request is asynchronous setting, and the response message is used to indicate to the client that the property setting is abnormal.
17. The device according to any one of claims 11, 12 and 16, characterized in that The setting mode of the attribute setting request is asynchronous setting, and the transceiver unit is further used for: When the NAS server completes the attribute setting of the multiple objects under the target directory, it actively sends an asynchronous message to the client, where the asynchronous message is used to indicate to the client that the attribute setting is completed.
18. The device according to any one of claims 11 to 17, characterized in that The processing unit is also used for: When the task session where the attribute setting request is located is destroyed, the attribute setting of the multiple objects under the target directory is stopped.
19. The device according to any one of claims 11 to 18, characterized in that The permission attributes include one or more of the following: read permission, write permission, delete permission, modify permission, and full control permission.
20. The device according to any one of claims 11 to 19, characterized in that The transceiver unit is specifically used for: The property setting request sent by the client is received through a network.
21. A computing device, characterized in that The electronic device comprises a processor coupled to a memory, wherein the processor is used to store instructions. When the instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 10.
22. A computing device cluster, characterized in that: The system comprises at least one computing device, wherein the computing device comprises a processor, wherein the processor is coupled to a memory, and the processor is used to store instructions. When the instructions are executed by the processor, the computing device cluster executes the method according to any one of claims 1 to 10.
23. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed, the computer is caused to perform the method according to any one of claims 1 to 10.
24. A computer program product, comprising instructions, characterized in that: When the instructions are executed, the computer implements the method according to any one of claims 1 to 10.
Citation Information
Cited By
File attribute setting method and apparatus
EP4708063A1
File attribute setting method and apparatus
WO2024250716A1
File attribute setting method, client, storage server, device, and system
WO2025140215A1
