Method, device and computer program product for managing a file system

By receiving file system events and dynamically managing file system operations using counters and triggering strategies, the inefficiency of time-based strategies is solved, enabling more flexible and efficient file system management and improving the reliability of data recovery.

CN114817130BActive Publication Date: 2026-02-06EMC IP HLDG CO LLC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110082266.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-21
Publication Date
2026-02-06
Estimated Expiration
2041-01-21

AI Technical Summary

Technical Problem

Existing time-based file system management strategies are inefficient in some scenarios, potentially leading to data loss or resource waste.

Method used

By receiving file system events, and using counters and triggering policies to dynamically manage file system operations, more granular management can be achieved, including receiving events, determining counter values, and generating target action instructions to execute corresponding operations.

Benefits of technology

It improves the flexibility and efficiency of file system management, reduces resource waste, and enhances the reliability of data recovery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114817130B_ABST
    Figure CN114817130B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to a method, device and computer program product for managing a file system. The method comprises: receiving an event published by the file system, the event being associated with an operation on an object in the file system; determining a value of a counter corresponding to the event based on execution information of the operation; determining a target action corresponding to the value of the counter based on a trigger policy associated with the counter, the trigger policy defining at least one action triggerable by the counter; and generating an indication for the file system to perform the target action. In this way, more granular file system management can be provided.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present disclosure relate to the field of computer, and more specifically, to a method, device and computer program product for managing a file system. BACKGROUND

[0002] In the process of managing a file system, people specify a series of management policies by configuring some time-based policies. For example, people can configure periodic file backup, creating snapshot, deleting expired backup or deleting expired snapshot, etc. However, time-based management policies can be inefficient in some scenarios. For example, if some important data is modified multiple times in a short time, and the period of creating snapshot can be too long, this can result in that the data can not be recovered when a failure occurs. Or, if the period of creating snapshot is too short, this can result in unnecessary waste of resources. SUMMARY

[0003] Embodiments of the present disclosure provide a scheme for managing a file system.

[0004] According to a first aspect of the present disclosure, a method for managing a file system is provided. The method comprises: receiving an event published by a file system, the event being associated with an operation on an object in the file system; determining a value of a counter corresponding to the event based on execution information of the operation; determining a target action corresponding to the value of the counter based on a trigger policy associated with the counter, the trigger policy defining at least one action triggerable by the counter; and generating an indication for the file system to perform the target action.

[0005] According to a second aspect of the present disclosure, an electronic device is provided. The device comprises: at least one processing unit; at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the device to perform actions comprising: receiving an event published by a file system, the event being associated with an operation on an object in the file system; determining a value of a counter corresponding to the event based on execution information of the operation; determining a target action corresponding to the value of the counter based on a trigger policy associated with the counter, the trigger policy defining at least one action triggerable by the counter; and generating an indication for the file system to perform the target action.

[0006] In a third aspect of the present disclosure, a computer program product is provided. The computer program product is stored in a non-transitory computer storage medium and comprises machine executable instructions that, when run in a device, cause the device to perform any of the steps of the method described according to the first aspect of the present disclosure.

[0007] The following presents a summary of the disclosure in order to provide a basic understanding of some aspects of the disclosure. This summary is not an extensive overview of the disclosure. It is not intended to identify key / critical elements of the disclosure or to delineate the scope of the disclosure. Its sole purpose is to present some concepts of the disclosure in a simplified form as a prelude to the more detailed description that is presented later. BRIEF DESCRIPTION OF DRAWINGS

[0008] The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings in which like reference characters refer to like elements throughout.

[0009] Figure 1 FIG. 1 illustrates a schematic diagram of an example environment in which embodiments of the present disclosure can be implemented;

[0010] Figures 2A-2B FIG. 2 illustrates a schematic diagram of a process of event processing according to some embodiments of the present disclosure;

[0011] Figure 3 FIG. 3 illustrates a flowchart of a process of managing a file system according to embodiments of the present disclosure; and

[0012] Figure 4 FIG. 4 illustrates a schematic block diagram of an example device that can be used to implement embodiments of the present disclosure. DETAILED DESCRIPTION

[0013] Preferred embodiments of the present disclosure will be described herein below with reference to the accompanying drawings. While the preferred embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be embodied in various forms without being limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure will be thorough and complete, and will fully convey the scope of the present disclosure to those skilled in the art.

[0014] The term "comprising" and variations thereof as used herein are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements is not necessarily limited to those elements, but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted in an overly literal sense unless expressly so defined herein. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0015] In the process of managing a file system, people expect to improve the stability of the file system or improve the efficiency of the file system through some management operations. As discussed above, people can define some time-based management policies. However, the time-based management policies can be inefficient in some scenarios. For example, if some important data is modified multiple times in a short time, and the period for creating a snapshot can be too long, this can cause the data to be unable to be recovered when a failure occurs. Or, if the period for creating a snapshot is too short, this can cause unnecessary waste of resources.

[0016] According to an embodiment of the present disclosure, a scheme for managing a file system is provided. In the scheme, first, an event published by the file system is received, where the event is associated with an operation on an object in the file system. Subsequently, a value of a counter corresponding to the event is determined based on execution information of the operation. Accordingly, a target action corresponding to the value of the counter is determined based on a trigger policy associated with the counter, and an indication is generated for the file system to perform the target action. In this way, embodiments of the present disclosure can provide more fine-grained management of the file system. In addition, embodiments of the present disclosure improve the flexibility of managing the file system.

[0017] The scheme of the present disclosure will be described below with reference to the accompanying drawings.

[0018] Figure 1 An example environment 100 in which embodiments of the present disclosure can be implemented is shown. As shown, the environment 100 includes a client 110, a file system 120, and an event management device 130. As shown, the client 110 can send an operation request 115 to the file system 120, for example, requesting to access an object in the file system 120, creating an object, requesting to delete an object in the file system 120, requesting to modify an object in the file system 120, etc. The object may, for example, include one or more folders or one or more files in the file system 120. Figure 1 Figure 1

[0019] In some implementations, the file system 120 can be deployed with a common event publishing module CEP. The CEP module can publish a corresponding event based on receiving the operation request 115 or the operation request 115 being executed.

[0020] In some implementations, the CEP module can publish a first type of event (pre event) in response to receiving the operation request 115. Figure 2A A schematic diagram of a process of processing the first type of event is shown according to an embodiment of the present disclosure.

[0021] As Figure 2A ​​As shown, at 222, the client 110 can send an operation request to the file system 120, for example, requesting to delete a specific file in the file system 120.

[0022] At 224, the file system 120 can send a first type of event published via the CEP module to the event management device 130. The event management device 130 can be, for example, a Common Event Publishing Agent (CEPA) server.

[0023] At 226, the event management device 130 can forward the received first type of event to the content management device 210 for determining whether the operation request can be performed by the content management device 210. The content management device 210 can be, for example, a Content / Quota Management (CQM) device.

[0024] At 228, the content management device 210 can send an indication to the event management device 130 about whether the performance is allowed.

[0025] At 220, the event management device 130 further forwards the indication to the file system 120.

[0026] At 232, the file system 120 determines whether to perform the operation request based on the indication and sends a performance result to the client 110.

[0027] In some implementations, the CEP module can also publish a second type of event (post event) in response to receiving that the operation request 115 has been successfully performed in the file system 120. Alternatively or additionally, the CEP module can also publish a third type of event (post error event) in response to that the operation request 115 has failed in the file system 120. The processing procedures of the second type of event and the third type of event are similar. Figure 2B A schematic diagram showing a procedure of processing the second type or the third type of event according to an embodiment of the present disclosure is shown.

[0028] As Figure 2B shown, at 242, the client 110 can send an operation request to the file system 120, for example, requesting to modify a specific file in the file system 120.

[0029] At 224, the file system 120 can send a second type or a third type of event published via the CEP module to the event management device 130 when the operation request is successfully performed or failed.

[0030] At 226, the event management device 130 can forward the received second or third type of event to the content management device 210 for auditing by the content management device 210 without receiving an additional indication from the content management device 210.

[0031] The first type of event (pre event), the second type of event (post event), and the third type of event (post error event) discussed above can also be referred to as base CEP events.

[0032] With continued reference to Figure 1 , Figure 1 As shown, the file system 120 can publish corresponding events 125 before an operation request is executed, after the operation request is successfully executed, or after the operation request fails. In some implementations, the events 125 can be generated based on the three different types of base events discussed above.

[0033] In some implementations, a set of events corresponding to different operation requests can be defined. For example, a file delete event can be defined based on the first type of event (pre event). Exemplarily, an example of the file delete event can be represented as:

[0034] Event = "0x20"

[0035] path = "\\vdm_air2_c48.vita.ad\CHECK$\vdm_air2_fs1\folder1\onebyone\Kz

[0036] MW8FYp" flag = "0x2" protocol = "0" server = "VDM_AIR2_C48"

[0037] share = "vdm_air2_fs1" clientIP = "10.229.86.47" serverIP = "10.229.94.159"

[0038] sourceID = "0" timeStamp = "0x5F3116660009332A"

[0039] userSid = "S-1-5-21-3745703139-2415706905-3042037632-1105"

[0040] ownerSid = "S-1-5-21-843271493-1212945995-848348500-544"

[0041] fileSize="0x10003C" bytesRead="0x0" bytesWritten="0x0"

[0042] desiredAccess="0x0" createDispo="0x0" ntStatus="0x0"

[0043] relativePath=\VDM_AIR2_C48\vdm_air2_fs1\folder1\onebyone\KzMW8FYp

[0044] "0x20" may, for example, represent the identity of the event 125, e.g., indicating that the event 125 is a file delete event.

[0045] It should be appreciated that any other suitable type of event can also be defined based on the underlying CEP event. Examples thereof include, but are not limited to, a create file event, a delete file event, a write file event, a read file event, a rename file event, a set file access permission event, a set file security attribute event, a close folder event, a create folder event, a delete folder event, an open folder event, a rename folder event, a set folder security attribute event, a set folder access permission event, etc.

[0046] It should be appreciated that one or more of the above events can be defined based on the underlying CEP event as needed by the control policy. For example, the open folder event can be defined based on a second type of event (post event) such that the event is issued only after the folder is opened.

[0047] With continued reference to Figure 1 , the event management device 130 can receive the events 125 issued by the file system 120. In some implementations, counters corresponding to different events can also be set in the event management device 130, such that the different events 125 received are counted.

[0048] When the value of the counter satisfies a certain condition, the event management device 130 may, for example, generate an indication 135 for the file system 120 to perform a predetermined action, and send the indication 135 to the file system 120. The detailed process of generating the indication 135 will be described with reference to Figure 3 .

[0049] Figure 3 A flowchart of a process 300 of managing a file system according to some embodiments of the present disclosure is shown. The process 300 may, for example, be implemented by the event management device 130 shown in Figure 1 .

[0050] As Figure 3 shown, at block 302, the event management device 130 receives an event 125 published by the file system 120, where the event 125 is associated with an operation on an object in the file system 120.

[0051] As discussed above with reference to Figure 1 the file system 120 may, for example, publish events associated with different operations based on underlying CEP events via the CEP module, examples of which include but are not limited to: a create file event, a delete file event, a write file event, a read file event, a rename file event, a set file access permission event, a set file security attribute event, a close folder event, a create folder event, a delete folder event, an open folder event, a rename folder event, a set folder security attribute event, a set folder access permission event, etc.

[0052] At block 304, the event management device 130 determines a value of a counter corresponding to the event 125 based on the execution information of the operation. In some implementations, the event management device 130 can determine the execution information of the operation based on an event type of the event 125.

[0053] In some implementations, the event 125 is a pre-event based on a first type of event, i.e., the event type indicates that the event 125 is published in response to receiving a request 115 associated with the operation. Accordingly, the event management device 130 can obtain the execution information from the content management device 210, where the execution information indicates whether the operation is allowed to be executed. Specifically, as described with reference to step 228, the event management device 130 can receive an indication from the content management device 210 whether the operation is allowed to be executed.

[0054] Additionally, in response to determining that the execution information indicates that the operation is allowed to be executed, the event management device 130 can increment the counter to determine the value of the counter. For example, taking a delete file event as an example, if the value of the counter corresponding to the event is previously 0, the event management device 130 can increment the value of the counter by 1 upon receiving an indication that the delete operation is allowed to be executed.

[0055] In some implementations, the event 125 can also be issued based on a second type of event (post event) or a third type of event (post error event). Accordingly, the execution information can include, for example, an execution status of the operation, which the event management device 130 can determine based on the event type, where the execution status indicates that the operation is executed successfully or failed. Illustratively, when it is determined that the received event 125 is based on the second type of event (post event), the event management device 130 can determine, based on the event type, that the operation is executed successfully. When it is determined that the received event 125 is based on the third type of event (post error event), the event management device 130 can determine, based on the event type, that the operation is executed failed.

[0056] Accordingly, the event management device 130 can increment the counter corresponding to the event 125. Illustratively, for example, when a file creation event based on the second type of event is received, the event management device 130 can increment the counter for the file creation event by 1.

[0057] At block 306, the event management device 130 determines, based on a trigger policy associated with the counter, a target action corresponding to the value of the counter, where the trigger policy defines at least one action that can be triggered by the counter.

[0058] In some implementations, the event management device 130 can obtain a configured trigger policy. The trigger policy, for example, defines at least one trigger threshold and an action corresponding to the at least one trigger threshold. The event management device 130 can determine, based on a comparison of the value of the counter with the corresponding trigger threshold, the target action from the at least one action.

[0059] Taking the file deletion event as an example, the trigger policy can define, for example, one trigger threshold, e.g., 1, and the corresponding action can be, for example, to create a snapshot of the file. In this way, when the current value of the counter associated with the file deletion event is 1, the event management device 130 can determine that the value reaches the trigger threshold, thereby triggering the action corresponding to the trigger threshold, i.e., creating a snapshot of the file.

[0060] Taking the folder modification as another example, the trigger policy can define, for example, multiple trigger thresholds, e.g., 100 and 200. The trigger policy can also define a first trigger action when the number of folder modifications reaches 100, and a second trigger action when the number of folder modifications reaches 200.

[0061] Accordingly, the event management device 130 can compare the current value of the counter (e.g., 100) with the trigger threshold, and determine to perform the first trigger action. When the value of the counter continues to accumulate to 200, the event management device 130 will determine to perform the second trigger action. It should be appreciated that when the value of the counter is between the trigger thresholds (e.g., 150), the event management device 130 can determine not to perform any action.

[0062] In some implementations, for a counter configured with only one trigger threshold, the event management device 130 can reset the counter after the value of the counter reaches the trigger threshold.

[0063] At block 308, the event management device 130 generates an indication 135 for the file system to perform the target action.

[0064] In some implementations, the event management device 130 can generate the indication 135 according to the determined target action, and send the indication to the file system 120. In some implementations, the file system 120 can perform the target action according to the indication 135, thereby achieving dynamic management.

[0065] In some implementations, if the event 125 is a pre-event of the first type, the file system 120 can also determine whether to perform the operation request 115 according to the result of the execution of the target action.

[0066] Illustratively, the event 125 is a file deletion event, and the target action is to create a snapshot for the file. If the file system 120 determines that the creation of the snapshot for the file fails, the file system 120 can refuse to perform the action of deleting the file, although the file deletion request of the file system 120 has been allowed. Based on such a manner, the stability of the file system can be further improved.

[0067] In yet another example, the file system 120 may, for example, also delete the file in the case where it is determined that the file deletion request has been allowed, regardless of whether the target action is successfully performed.

[0068] Based on the schemes discussed above, embodiments of the present disclosure can perform more fine-grained file system management based on events. In addition, such a manner can also facilitate dynamic maintenance of management policies, and improve efficiency.

[0069] Figure 4A schematic block diagram of an example device 400 that can be used to implement embodiments of the present disclosure is shown. For example, an event management device 130 according to embodiments of the present disclosure can be implemented by device 400. As shown, device 400 includes a central processing unit (CPU) 401 that can perform various suitable actions and processes according to computer program instructions stored in a read-only memory (ROM) 402 or computer program instructions loaded from a storage unit 408 into a random access memory (RAM) 403. Various programs and data used by device 400 can also be stored in the RAM 403, as required. The CPU 401, ROM 402, and RAM 403 are connected to each other by a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0070] Various components in device 400 are connected to the I / O interface 405, including an input unit 406, such as a keyboard, mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a magnetic disk, optical disk, etc.; and a communication unit 409, such as a network card, modem, wireless communication transceiver, etc. The communication unit 409 allows device 400 to exchange information / data with other devices over a computer network, such as the Internet, and / or various telecommunication networks.

[0071] The various processes and processes described above, such as process 300, can be performed by processing unit 401. For example, in some embodiments, process 300 can be implemented as a computer software program that is tangibly embodied in a machine-readable medium, such as storage unit 408. In some embodiments, part or all of the computer program can be loaded and / or installed on device 400 via ROM 402 and / or communication unit 409. When the computer program is loaded into RAM 403 and executed by CPU 401, one or more actions of process 300 described above can be performed.

[0072] The present disclosure can be a method, apparatus, system, and / or computer program product. The computer program product can include a computer readable storage medium (or media) having computer readable program instructions thereon for performing various aspects of the present disclosure.

[0073] Computer readable storage media can be tangible storage media which can retain and store instructions for use by an instruction execution device. Computer readable storage media can be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer readable storage media include the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing. A computer readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.

[0074] Computer readable program instructions described herein can be downloaded to respective computing / processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and / or a wireless network. The network can comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and / or edge servers. A network adapter card or network interface in each computing / processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing / processing device.

[0075] Computer readable program instructions for carrying out operations of the present disclosure can be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate array (FPGA), or programmable logic array (PLA) can execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present disclosure.

[0076] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0077] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0078] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0079] The flow diagrams and the block diagrams in the drawings are presented to illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flow diagrams and the block diagrams can represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logic functions. In some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flow diagrams, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and

[0080] The foregoing description of the various embodiments has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the various embodiments to the precise form disclosed. Many modifications and variations are possible in light of the above teaching. It is intended that the scope of the various embodiments be limited not with this detailed description, but rather by the claims appended hereto. The terminology used herein was chosen to best explain the principles of the various embodiments, the practical application, or technical improvement over technologies found in the marketplace, or to enable others skilled in the art to understand the various embodiments disclosed herein.

Claims

1. A method of managing a file system, comprising: receiving an event published by a file system, the event being associated with an operation on an object in the file system; determining a value of a counter corresponding to the event based on execution information of the operation; determining a target action corresponding to the value of the counter based on a trigger policy associated with the counter, the trigger policy defining at least one action triggerable by the counter; and generating an indication for the file system to perform the target action; wherein the event is published by the file system prior to performing the operation on the object in the file system; and wherein the method further comprises: performing the target action in the file system after generating the indication; and performing the operation on the object in the file system based on a result of performing the target action.

2. The method of claim 1, further comprising: determining the execution information of the operation based on an event type of the event.

3. The method of claim 2, wherein the event type indicates that the event is published in response to receiving a request associated with the operation, and determining the execution information comprises: obtaining the execution information, the execution information indicating whether the operation is allowed to be performed.

4. The method of claim 3, wherein determining the value of the counter corresponding to the event comprises: in response to determining that the execution information indicates that the operation is allowed to be performed, incrementing the counter to determine the value of the counter.

5. The method of claim 2, wherein the execution information comprises an execution status of the operation, and wherein determining the execution information of the operation comprises: determining the execution status of the operation based on the event type, the execution status indicating that the operation is performed successfully or failed.

6. The method of claim 1, wherein the at least one action corresponds to a respective trigger threshold of the counter, and determining the target action corresponding to the value of the counter comprises: determining the target action from the at least one action based on a comparison of the value and the respective trigger threshold.

7. The method of claim 1, further comprising: resetting the counter.

8. The method of claim 1, wherein the operation comprises at least one of the following operations on a file or a directory in the file system: a read operation, a create operation, a modify operation, or a delete operation.

9. An electronic device, comprising: at least one processing unit; at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, cause the device to perform actions comprising: receiving an event published by a file system, the event being associated with an operation on an object in the file system; determining a value of a counter corresponding to the event based on execution information of the operation; determine, based on a trigger policy associated with the counter, a target action corresponding to the value of the counter, the trigger policy defining at least one action triggerable by the counter; and generate an indication for the file system to perform the target action; wherein the event is published by the file system prior to performing the operation on the object in the file system; and wherein the action further comprises: performing the target action in the file system after generating the indication; and performing the operation on the object in the file system based on a result of the performing of the target action.

10. The device of claim 9, the action further comprising: determining, based on an event type of the event, execution information of the operation.

11. The device of claim 10, wherein the event type indicates that the event is published in response to receiving a request associated with the operation, and determining the execution information comprises: obtaining the execution information, the execution information indicating whether the operation is allowed to be performed.

12. The device of claim 11, wherein determining the value of the counter corresponding to the event comprises: in response to determining that the execution information indicates that the operation is allowed to be performed, incrementing the counter to determine the value of the counter.

13. The device of claim 10, wherein the execution information comprises an execution status of the operation, and wherein determining the execution information of the operation comprises: determining, based on the event type, the execution status of the operation, the execution status indicating that the operation is performed successfully or failed.

14. The device of claim 9, wherein the at least one action corresponds to a respective trigger threshold of the counter, and determining the target action corresponding to the value of the counter comprises: determining, based on a comparison of the value and the respective trigger threshold, the target action from the at least one action.

15. The device of claim 9, the action further comprising: resetting the counter.

16. The device of claim 9, wherein the operation comprises at least one of the following operations on a file or a directory in the file system: a read operation, a create operation, a modify operation, or a delete operation.

17. A computer program product stored in a non-transitory computer storage medium and comprising machine executable instructions that, when run in a device, cause the device to perform the method of any one of claims 1-8.

Citation Information

Patent Citations

  • System and method for communicating file system events using a publish-subscribe model

    US20060041593A1

  • System and method for triggering on platform usage

    US20190313218A1