WO2018121454A1 - 文件访问控制列表管理方法和相关装置和系统 - Google Patents

文件访问控制列表管理方法和相关装置和系统 Download PDF

Info

Publication number
WO2018121454A1
WO2018121454A1 PCT/CN2017/118146 CN2017118146W WO2018121454A1 WO 2018121454 A1 WO2018121454 A1 WO 2018121454A1 CN 2017118146 W CN2017118146 W CN 2017118146W WO 2018121454 A1 WO2018121454 A1 WO 2018121454A1
Authority
WO
WIPO (PCT)
Prior art keywords
acl
file
record
directory
index
Prior art date
Application number
PCT/CN2017/118146
Other languages
English (en)
French (fr)
Inventor
谢晓芹
方新
彭勇
张军伟
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2018121454A1 publication Critical patent/WO2018121454A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/119Details of migration of file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1748De-duplication implemented within the file system, e.g. based on file segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/1824Distributed file systems implemented using Network-attached Storage [NAS] architecture

Definitions

  • the present application relates to the field of computer technology, and in particular, to a file access control list management method and related devices and systems.
  • files in a file system are usually stored in storage components such as disk arrays.
  • file server such as a Network Attached Storage (NAS) server
  • NAS Network Attached Storage
  • the file server provides file system data access services for file clients (such as NAS Client).
  • the file system formats the storage medium of the disk array into a specific format, and stores metadata and content data separately.
  • the metadata of the file including the file size, file modification time and other attributes are stored in the metadata area.
  • the content data of the file is stored in the data area, and the location of the file content data can be found through the file metadata.
  • ACLs File Access Control Lists
  • R/W/X Read/write/execute
  • the file's ACL contains several access control entries (ACE, Access Control Entry).
  • Each ACE can contain content such as control type, user id, and mask.
  • the control type includes allowed and denied
  • the user identifier indicates a user or a certain type of user
  • the mask indicates the access authority of the corresponding user, which is generally represented by a mask. Therefore, ACL can give different permissions to different users in a fine-grained manner, giving users better control over file reading and writing and permission granting. Therefore, ACL has been generally supported by systems such as Linux, NTFS, and FreeBSD.
  • the entire file system maintains only one global ACL (system-level ACL).
  • the global ACL includes the ACLs of all files in the file system. Therefore, when the number of files in the entire file system is large, the number of file ACLs included in the global ACL will also become large, which may seriously affect the deduplication/access efficiency of the file ACL.
  • Embodiments of the present application provide a file access control list management method and related apparatus and system.
  • a first aspect of the embodiments of the present application provides a file ACL management method, including: when a file ACL needs to be set, the file server receives a first file ACL setting request from a file client.
  • the first file ACL setting request carries a file identifier.
  • the first file ACL setting request also carries an ACL of the file represented by the file identifier.
  • the file ACL can be called "file ACL" or "file level ACL”.
  • the file server searches for an ACL record containing the ACL of the file from a directory level ACL of the parent directory to which the file belongs. In the case where the first ACL record of the ACL containing the file is found from the directory level ACL, the file server establishes a reference to the first ACL record by the file.
  • the file server creates a second ACL record in the directory level ACL, and the file is created.
  • the ACL record in the directory level ACL of the parent directory is only allowed to be referenced by the file under the parent directory. Therefore, the number of files with which a reference relationship exists is usually relatively small, so the ACL records contained in the directory-granulated ACL are relatively less than the ACL records contained in the traditional global ACL, so it is necessary to traverse a single directory-level ACL. Time will be greatly shortened, which will greatly improve business processing efficiency and customer experience.
  • the reference to the ACL record is set up by the file, which means that the reference relationship between the file and the ACL record is established. Therefore, based on the reference of the created file to the ACL record, the ACL record referenced by the file can be obtained.
  • the specific implementation manner of establishing a reference to the ACL record of the file may be various, for example, the related index of the ACL record may be written into the metadata of the file, or the reference relationship table may be used to record the reference relationship of the file to the ACL record, and the like.
  • the first ACL record includes an ACL index
  • the establishing the reference to the first ACL record by the file includes: writing an ACL index included in the first ACL record to a element of the file In the data.
  • the second ACL record includes an ACL index
  • the establishing the reference to the second ACL record by the file includes: writing the ACL index included in the second ACL record to the element of the file In the data.
  • the ACL index included in the first ACL record is different from the ACL index included in the second ACL record.
  • the ACL indexes included in different ACL records in the directory-level ACL of the parent directory are not different from each other.
  • the ACL index can be used to find the ACL record containing the ACL index in the corresponding directory-level ACL.
  • the file server after receiving the first file ACL setting request from the file client, the file server searches for the ACL record of the ACL containing the file from the directory level ACL of the parent directory of the file. In the case that the first ACL record of the ACL of the file is found in the directory-level ACL, the file server establishes a reference to the first ACL record of the file, for example, the ACL index included in the first ACL record is written. In the metadata of the file, because the corresponding ACL record is not created in this case, the file ACL in the single directory is deduplicated to a certain extent.
  • the directory-level ACL of some embodiments of the present application is relatively small because the number of ACL records included in the directory-level ACL is relatively small compared to the traditional de-duplication access mechanism based on the global ACL.
  • the file ACL deduplication mechanism is beneficial to greatly improve the deduplication/access efficiency of the file ACL.
  • the method may further include: the file server calculating a fingerprint of an ACL of the file.
  • the ACL record of the ACL containing the file is searched from the directory-level ACL of the parent directory of the file, including: searching for an ACL record of the fingerprint of the ACL containing the file from the directory-level ACL.
  • the ACL record containing the fingerprint in the directory level ACL includes an ACL of the file.
  • the ACL fingerprint can be calculated using a digest-based encryption algorithm such as the MD5 algorithm/SHA1 algorithm, which can map tens of kilobytes of ACLs into, for example, 8-byte or 12-byte ACL fingerprints.
  • a digest-based encryption algorithm such as the MD5 algorithm/SHA1 algorithm, which can map tens of kilobytes of ACLs into, for example, 8-byte or 12-byte ACL fingerprints.
  • MD5 algorithm/SHA1 algorithm can map tens of kilobytes of ACLs into, for example, 8-byte or 12-byte ACL fingerprints.
  • the ACL fingerprint size is usually around a dozen bytes, and the ACL itself can reach tens of KB. Therefore, using the ACL fingerprint to search for it is beneficial to reduce the comparison overhead.
  • the method further includes: when the file is accessed, the file server receives a file access request from the file client that carries the file identifier; the file server is from the directory level Locating, in the ACL, the ACL record referenced by the file, in a case that the first ACL record referenced by the file is found in the directory level ACL, the file server uses the The ACL of the file controls access to the access request.
  • the file server after receiving the file access request from the file client, the file server reads the ACL index from the metadata of the file represented by the file identifier, and searches for the referenced by the file from the directory level ACL.
  • the file server uses the ACL of the file included in the first ACL record to perform access control on the file access request.
  • the mechanism for accessing the reference file ACL based on the directory-level ACL is advantageous. Improve the reference access efficiency of file ACLs.
  • the method may further include: when the file ACL of the file needs to be acquired, the file server may receive a file ACL acquisition request from the file client that carries the file identifier. The file server searches for the ACL record referenced by the file from the directory level ACL. And, in a case that the first ACL record referenced by the file is found from the directory level ACL, the file server sends a file ACL to the file client for responding to the file ACL acquisition request. Get the response. The file ACL obtains an ACL carrying the file included in the first ACL record.
  • the file server after receiving the file ACL obtaining request from the file client, the file server searches for the ACL record referenced by the file from the directory level ACL of the corresponding parent directory, and finds the ACL record from the directory level ACL.
  • the file server sends a file ACL acquisition response carrying the file ACL included in the first ACL record to the file client.
  • this mechanism for obtaining file ACLs based on directory-level ACLs is beneficial to greatly improve files. ACL acquisition efficiency.
  • the method may further include: when the file ACL needs to be updated, the file server receives a second file ACL setting request from the file client.
  • the second file ACL setting request carries the file identifier.
  • the second ACL setting request also carries an update ACL of the file.
  • the file server searches for an ACL record containing the updated ACL of the file from the directory level ACL.
  • the file server replaces the current reference of the file with other ACL records with the file pair.
  • a reference to the third ACL record For example, the file server may replace the existing ACL index in the metadata of the file by using the ACL index included in the third ACL record, thereby replacing the current reference of the file with other ACL records with The file references the third ACL record.
  • a fourth ACL record is created in the directory level ACL, where the fourth ACL record is included There is an update ACL of the file, and the current reference of the file to other ACL records is replaced by the file reference to the fourth ACL record.
  • the file server may replace the existing ACL index in the metadata of the file by using the ACL index included in the fourth ACL record, thereby replacing the current reference of the file with other ACL records with The file references the fourth ACL record.
  • the method may further include: when a hard link of the file needs to be created, the file server receives a hard link creation request from the file client that carries the file identifier.
  • the file server searches for the ACL record referenced by the ACL from the directory-level ACL; and finds, by using the directory-level ACL, the first ACL record that includes the read ACL index.
  • the file server writes the ACL of the file included in the first ACL record into the metadata of the file, and releases the reference to the first ACL record by the file (for example, by deleting
  • the ACL index included in the first ACL record in the metadata of the file is used to release the reference to the first ACL record by the file, and a hard link of the file is created.
  • the file server after receiving the hard link creation request from the file client, the file server searches for the ACL record referenced by the file from the directory level ACL of the parent directory of the file, from the directory level ACL. If the first ACL record referenced by the file is found, the file server writes the ACL of the file included in the first ACL record into the metadata of the file, and releases the file pair. A reference to the first ACL record.
  • the mechanism for obtaining related file ACLs based on directory-level ACLs is beneficial. Improve the efficiency of file ACL acquisition, and thus greatly improve the efficiency of hard link creation.
  • searching for the ACL record referenced by the file from the directory level ACL may include, for example, reading an ACL index from metadata of the file, and searching from the directory level ACL includes the ACL record of the ACL index.
  • the ACL record that includes the ACL index in the directory-level ACL is an ACL record referenced by the file.
  • the method may further include: when the file needs to perform directory migration, the file server may receive a file migration request from the file client that carries the directory identifier of the target parent directory and the file identifier.
  • the file server reads the ACL index from the metadata of the file after migrating the file from the parent directory to the target parent directory.
  • the file server searches for an ACL record containing the ACL index from the directory level ACL.
  • the file server reads an ACL fingerprint from the first ACL record that is found;
  • the directory-level ACL of the target parent directory searches for an ACL record containing the read ACL fingerprint.
  • the file server is replaced by the ACL index included in the fifth ACL record.
  • An existing ACL index in the metadata of the file is replaced by the ACL index included in the fifth ACL record.
  • the file server is in the directory level ACL of the target parent directory.
  • creating a sixth ACL record where the sixth ACL record includes an ACL of the file included in the first ACL record, and the sixth ACL record further includes an ACL index, and the sixth ACL record is used.
  • the ACL index included in the ACL record replaces the existing ACL index in the metadata of the file.
  • the file server migrates the file from its current parent directory to the target parent directory, and reads the corresponding ACL from the directory level ACL of the source directory.
  • the ACL record containing the read ACL fingerprint is searched from the directory-level ACL of the target parent directory, and the fifth ACL fingerprint containing the read is found in the directory-level ACL of the target parent directory.
  • the file server replaces the existing ACL index in the metadata of the file by using the ACL index included in the fifth ACL record, because the directory of the target parent directory is no longer in this case.
  • the ACL records are created in the ACL.
  • the file ACLs in the single directory are deduplicated to a certain extent.
  • the ACLs of different files in the same directory are the same, only one ACL can be reserved in the directory-level ACL of the corresponding parent directory. Record that the same ACLs with the same ACL can be found in the directory-level ACL through the ACL index, and the corresponding ACLs of these different files can be implemented. use.
  • the file-level file ACL deduplication mechanism is beneficial to greatly improve the file. ACL deduplication efficiency.
  • the method may further include: when the file needs to perform directory migration, the file server receives a file migration request from the file client that carries the directory identifier of the target parent directory and the file identifier, After the file server migrates the file from the parent directory to the target parent directory, the ACL index is read from the metadata of the file; the file server searches from the directory level ACL to include the ACL record of the ACL index.
  • the file server reads the ACL of the file from the first ACL record that is found, in the case that the first ACL record of the ACL index is found in the directory level ACL; Find the ACL record of the ACL containing the file from the directory-level ACL of the target parent directory.
  • the file server replaces the file by using the ACL index included in the fifth ACL record.
  • the existing ACL index in the metadata is not limited to the metadata.
  • the file server creates a sixth ACL in the directory level ACL of the target parent directory.
  • the sixth ACL record includes an ACL of the file included in the first ACL record
  • the sixth ACL record further includes an ACL index
  • the file server uses the sixth ACL record
  • the ACL index contained in the file replaces the existing ACL index in the metadata of the file.
  • the method further includes: if the cleanup trigger condition of the directory level ACL is satisfied, the file server searches from the directory level ACL for not being in the parent directory.
  • the ACL record referenced by any file in the case that the X ACL records that are not referenced by any file in the parent directory are searched from the directory level ACL, the file server records the X ACL records from the ACL record. Released in the directory-level ACL.
  • the cleanup triggering condition may include at least one of the following conditions: the number of ACL records of the directory level ACL reaches a quantity threshold, the directory level ACL cleanup instruction, and the directory level ACL cleanup timer arrive.
  • the release of the invalid ACL record in the directory-level ACL is beneficial to improve the access efficiency of the file ACL in the directory-level ACL.
  • a second aspect of the embodiments of the present application provides a file server, which may include: a communication unit, a searching unit, and a processing unit.
  • a communication unit configured to receive a first file ACL setting request from a file client, where the first file ACL setting request carries a file identifier, and the first file ACL setting request further carries a file represented by the file identifier ACL.
  • the searching unit is configured to search for an ACL record containing the ACL of the file from among the directory level ACLs of the parent directory to which the file belongs.
  • a processing unit configured to establish, by the searching unit, a reference to the first ACL record, where the first ACL record of the ACL that includes the file is found from the directory level ACL And in the case that the search unit does not find any ACL record including the ACL of the file from the directory level ACL, create a second ACL record in the directory level ACL.
  • the second ACL record includes an ACL of the file, and a reference to the second ACL record is established by the file.
  • the first ACL record includes an ACL index
  • the processing unit establishing the reference to the first ACL record by the processing unit may include: using an ACL index included in the first ACL record Write to the metadata of the file.
  • the second ACL record includes an ACL index
  • the processing unit establishing the reference to the second ACL record by the processing unit includes: writing an ACL index included in the second ACL record Enter the metadata of the file.
  • the ACL index included in the first ACL record is different from the ACL index included in the second ACL record.
  • the file server further includes: a calculating unit, configured to calculate a fingerprint of the ACL of the file.
  • the locating unit searches for the ACL record of the ACL that includes the file from the directory-level ACL of the parent directory of the file, and may include: searching for the ACL of the ACL that includes the file from the directory-level ACL.
  • the communication unit is further configured to receive a file access request from the file client that carries the file identifier.
  • the searching unit may be further configured to search for the ACL record referenced by the file from the directory level ACL.
  • the processing unit may be further configured to use the first ACL to record the file included in the file when the searching unit searches for the first ACL record referenced by the file from the directory level ACL.
  • the ACL performs access control on the access request.
  • the communication unit is further configured to receive a hard link creation request from the file client that carries the file identifier.
  • the searching unit may be further configured to search for the ACL record referenced by the file from the directory level ACL.
  • the processing unit may be further configured to: when the searching unit searches for the first ACL record referenced by the file from the directory level ACL, the file included in the first ACL record The ACL is written in the metadata of the file, and the reference to the first ACL record is released from the file (for example, the ACL included in the first ACL record existing in the metadata of the file may be deleted) Indexing to unreference the file for the first ACL record), creating a hard link to the file.
  • the searching, by the searching unit, searching the ACL record of the file reference from the directory level ACL may include: reading an ACL index from the metadata of the file, from the directory level ACL. Find the ACL record that contains the ACL index.
  • the ACL record that includes the ACL index in the directory-level ACL is an ACL record referenced by the file.
  • the communication unit is further configured to receive a second file ACL setting request from a file client.
  • the second file ACL setting request carries the file identifier.
  • the second ACL setting request also carries an update ACL of the file.
  • the searching unit is further configured to search, from the directory level ACL, an ACL record that includes an update ACL of the file.
  • the processing unit may be further configured to: when the searching unit finds a third ACL record that includes an update ACL of the file from the directory level ACL, use the current reference of the file to other ACL records. Replace with the reference to the third ACL record by the file.
  • the processing unit may be further configured to: in the case that the search unit does not find any ACL record including the update ACL of the file from the directory level ACL, create a fourth in the directory level ACL ACL record.
  • the fourth ACL record includes an update ACL of the file, and replaces the current reference of the file with other ACL records with the reference of the file to the fourth ACL record.
  • the communication unit is further configured to receive a file migration request from the file client that carries the directory identifier of the target parent directory and the file identifier.
  • the processing unit is further configured to migrate the file from the parent directory to the target parent directory.
  • the searching unit may be further configured to: read an ACL index from the metadata of the file; search for an ACL record that includes the ACL index from the directory level ACL; and find the inclusion from the directory level ACL
  • the ACL fingerprint is read from the first ACL record that is found; the directory level ACL of the target parent directory is searched for ACL record of ACL fingerprint.
  • the processing unit may be further configured to use the fifth ACL in a case that the searching unit searches for a fifth ACL record that includes the read ACL fingerprint from a directory level ACL of the target parent directory.
  • the ACL index contained in the record replaces the existing ACL index in the metadata of the file.
  • the processing unit may be further configured to: in the case that the search unit does not find any ACL record including the read ACL fingerprint from among the directory level ACLs of the target parent directory, in the target A sixth ACL record is created in the directory-level ACL of the parent directory, where the sixth ACL record includes an ACL of the file included in the first ACL record, and the sixth ACL record further includes an ACL.
  • the index replaces the existing ACL index in the metadata of the file by using the ACL index included in the sixth ACL record.
  • the communication unit may be further configured to receive a file migration request from the file client that carries the directory identifier of the target parent directory and the file identifier.
  • the processing unit is further configured to migrate the file from the parent directory to the target parent directory.
  • the searching unit may be further configured to: read an ACL index from the metadata of the file; and search for an ACL record that includes the ACL index from the directory level ACL; and find the ACL record from the directory level ACL If the first ACL record of the ACL index is included, the ACL of the file is read from the first ACL record that is found; and the directory level ACL of the target parent directory is searched for ACL record of the file's ACL;
  • the processing unit may be further configured to use the fifth ACL record in a case where the searching unit searches for a fifth ACL record including an ACL of the file from a directory level ACL of the target parent directory.
  • the included ACL index replaces the existing ACL index in the metadata of the file.
  • the processing unit is further configured to: in the case that the searching unit does not find any ACL record including the ACL of the file from the directory level ACL of the target parent directory, in the target parent directory A sixth ACL record is created in the directory-level ACL, where the sixth ACL record includes an ACL of the file included in the first ACL record, and the sixth ACL record further includes an ACL index, The ACL index included in the sixth ACL record replaces the existing ACL index in the metadata of the file.
  • the file server further includes: a clearing unit, configured to: find, in the directory level ACL, that the parent directory is not in the case that the cleanup trigger condition of the directory level ACL is satisfied
  • a clearing unit configured to: find, in the directory level ACL, that the parent directory is not in the case that the cleanup trigger condition of the directory level ACL is satisfied
  • the ACL record referenced by any file below if the X ACL records not referenced by any file in the parent directory are searched from the directory level ACL, the X ACL records are recorded from the directory. Released in the level ACL.
  • a third aspect of the embodiments of the present application provides a file server, which may include: a processor, a communication interface, and a storage component coupled to each other.
  • the storage component is for storing instructions and data
  • the processor is for executing the instructions.
  • the communication interface is for communicating with other devices under the control of the processor.
  • the processor is used to perform some or all of the steps of any of the methods provided by the embodiments of the present invention.
  • the processor can be used to:
  • the first ACL record includes an ACL index
  • the establishing the reference to the first ACL record by the file includes: writing an ACL index included in the first ACL record In the metadata of the document;
  • the second ACL record includes an ACL index
  • the establishing the reference to the second ACL record by the file includes: writing the ACL index included in the second ACL record to the metadata of the file.
  • the ACL index included in the first ACL record is different from the ACL index included in the second ACL record.
  • the processor is further operable to:
  • the processor may be further configured to: receive, by using a communication interface, a second file ACL setting request from a file client, where the second file ACL setting request carries the file identifier, the second ACL The setting request also carries an update ACL of the file; searching for an ACL record containing the updated ACL of the file from the directory level ACL;
  • a fourth ACL record is created in the directory level ACL, where the fourth ACL record is included There is an update ACL of the file, and the current reference of the file to other ACL records is replaced by the file reference to the fourth ACL record.
  • a fourth aspect of the present application provides a communication system, including: a file client and a file server that are connected to each other, wherein the file server is any file server provided by the embodiment of the present invention.
  • a fifth aspect of embodiments of the present application provides a computer readable storage medium storing program code.
  • the program code includes instructions for performing some or all of the steps of the method of the first aspect or the second aspect.
  • FIG. 1 is a schematic diagram of a network architecture according to an embodiment of the present application.
  • FIG. 1B is a schematic diagram of an organization form of a file ACL according to an embodiment of the present application.
  • FIG. 1 is a schematic diagram of an organization form of a directory level ACL according to an embodiment of the present application
  • FIG. 1 is a schematic diagram of another organization of a directory level ACL according to an embodiment of the present application.
  • FIG. 1 is a schematic diagram of a form of an ACL record in a directory level ACL of a parent directory to which a file reference belongs according to an embodiment of the present application;
  • FIG. 1 is a schematic diagram of another form of an ACL record in a directory level ACL of a parent directory to which a file is referenced according to an embodiment of the present application;
  • FIG. 2 is a schematic flowchart of a file ACL management method according to an embodiment of the present disclosure
  • FIG. 3 is a schematic flowchart of a file access method according to an embodiment of the present disclosure
  • FIG. 4 is a schematic flowchart of a file ACL obtaining method according to an embodiment of the present disclosure
  • FIG. 5 is a schematic flowchart of another file ACL management method according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic flowchart of a method for creating a hard link of a file according to an embodiment of the present disclosure
  • FIG. 7 is a schematic flowchart of a file migration management method according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic flowchart of another file migration management method according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic flowchart of another file ACL management method according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic diagram of a file server according to an embodiment of the present application.
  • FIG. 11 is a schematic diagram of another file server according to an embodiment of the present application.
  • FIG. 12 is a schematic diagram of a communication system according to an embodiment of the present application.
  • FIG. 1-A is a schematic diagram of a network architecture according to an embodiment of the present application.
  • file clients such as NAS clients
  • the file server can include a disk array or the like.
  • the file server provides file system data access services for clients such as NAS Clients.
  • the product form of the file client of the embodiment of the present application may be, for example, a file client in the form of a tablet, a notebook computer, a mobile internet device, a palmtop computer, a desktop computer, a mobile phone, or other products.
  • FIG. 1-B exemplifies an organization form of an ACL of a file.
  • the ACL of the file includes several ACEs, where each ACE may include a control type, a mask, and a user. Content such as user id. Among them, the control type includes allowed or denied, and the like.
  • User id represents a user or a class of users.
  • the permission (mask) indicates the access permission of the corresponding user, and can generally be represented by a mask.
  • the metadata of the file may include standard attribute data and extended attribute data of the file.
  • the standard attribute data of the file may describe standard attributes such as file size and file modification time, and the extended attribute data of the file may include the ACL of the file and the like.
  • the metadata of the directory may include standard attribute data and extended attribute data of the directory.
  • the standard attribute data of the directory may describe standard attributes such as directory size and directory modification time, and the extended attribute data of the directory may include a directory level ACL of the directory.
  • FIG. 1C shows an organization form of a directory-level ACL of a directory.
  • the directory-level ACL may include several ACL records, where each ACL record includes an ACL index (Index). ) and file ACL.
  • each ACL record may include a field for recording an ACL index (for example, may be referred to as an "index field"), and a field for recording a file ACL (for example, may be referred to as an "ACL_Xattr field").
  • index field for recording an ACL index
  • ACL_Xattr field a field for recording a file ACL
  • FIG. 1-D shows an organization form of a directory-level ACL of another directory illustrated by the embodiment of the present application.
  • the directory-level ACL may include several ACL records, where each ACL record includes an ACL index ( Index), file ACL and file ACL fingerprint.
  • each ACL record includes a field for recording an ACL index (referred to as an "index field"), a field for recording a file ACL (referred to as "ACL_Xattr field”), and a file ACL for recording files.
  • the field of the fingerprint may be called "fingerprint field").
  • the ACL record in the directory-level ACL of the parent directory is only allowed to be referenced by the file in the corresponding directory, so the number of files with which the reference relationship exists is usually relatively small, so the ACL record included in the directory-granulated ACL is recorded.
  • the ACL records are relatively less, so the time required to traverse a single directory-level ACL will be greatly shortened, which will greatly improve the business processing efficiency and customer experience.
  • ACL record is referenced by the file
  • the ACL index included in the ACL record is written into the metadata of the file.
  • an ACL index included in an ACL record of a parent directory is written into the metadata of at least one file in the parent directory, it indicates that the ACL record is at least 1 file reference. If the ACL index contained in an ACL record in the directory-level ACL of the parent directory is not written to the metadata of any file in the parent directory, it indicates that the ACL record is not the parent. Any 1 file reference under the directory, and so on.
  • FIG. 2 is a schematic flowchart diagram of a file ACL management method according to an embodiment of the present disclosure.
  • a file ACL management method provided by the embodiment of the present application may include:
  • the file client sends a first file ACL setting request to the file server.
  • the first file ACL setting request carries a user identifier (user id) and a file identifier.
  • a user ID represents a user or a class of users.
  • a file identifier is used to represent a file.
  • the file first file ACL setting request further carries an ACL of the file represented by the file identifier, and the like.
  • the file server receives the first file ACL setting request from the file client.
  • the file server searches for an ACL record containing an ACL of the file from a directory level ACL of a parent directory to which the file belongs.
  • the ACL record matching the ACL of the file includes the ACL of the file, and the ACL of the file does not match.
  • the ACL of the file is not included in the ACL record.
  • the fingerprint of the ACL of the file may be calculated first.
  • Searching for the ACL record of the ACL containing the file from the directory level ACL of the parent directory of the file may include: searching for an ACL record of the fingerprint of the ACL containing the file from the directory level ACL.
  • the ACL record containing the fingerprint in the directory level ACL includes an ACL of the file.
  • the ACL record that does not include the fingerprint in the directory-level ACL does not include the ACL of the file.
  • the ACL fingerprint can be calculated using a digest-based encryption algorithm such as the MD5 algorithm/SHA1 algorithm, which can map tens of kilobytes of ACLs into, for example, 8-byte or 12-byte ACL fingerprints.
  • a digest-based encryption algorithm such as the MD5 algorithm/SHA1 algorithm, which can map tens of kilobytes of ACLs into, for example, 8-byte or 12-byte ACL fingerprints.
  • MD5 algorithm/SHA1 algorithm can map tens of kilobytes of ACLs into, for example, 8-byte or 12-byte ACL fingerprints.
  • the ACL fingerprint size is usually around a dozen bytes, and the ACL itself can reach tens of KB. Therefore, using the ACL fingerprint to search for it is beneficial to reduce the comparison overhead.
  • the file server establishes a reference to the first ACL record by the file.
  • the file server may establish a reference to the first ACL record by the file, for example, by writing an ACL index included in the first ACL record into the metadata of the file.
  • the file server creates a second ACL record in the directory level ACL.
  • the second ACL record includes an ACL index and an ACL of the file.
  • the file server establishes a reference to the second ACL record by the file.
  • the file server may establish a reference to the second ACL record by the file, for example, by writing an ACL index included in the second ACL record into the metadata of the file.
  • the file server sends a first file ACL setting response for responding to the first file ACL setting request to the file client.
  • the file client receives a first file ACL setting response sent by the file server for responding to the first file ACL setting request.
  • the file server after receiving the first file ACL setting request from the file client, the file server searches for the ACL record of the ACL containing the file from the directory level ACL of the parent directory of the file. In the case that the first ACL record of the ACL containing the file is found in the directory level ACL, the file server writes the ACL index included in the first ACL record into the metadata of the file, because of this In this case, the corresponding ACL record is not created, so that the file ACL in the single directory is deduplicated to a certain extent. When the ACLs of different files in the same directory are the same, they can be retained only in the directory-level ACL of the corresponding parent directory. A corresponding ACL record.
  • the ACL of each file in the same parent directory is different (that is, the file ACL cannot be deduplicated), or if most of the files in the same parent directory have different ACLs ( That is, it is difficult to deduplicate the file ACL.
  • the ACL of the file is recorded in the ACL table of the parent directory, which may also result in a larger directory-level ACL of the parent directory.
  • the file metadata of the file is also deleted, so the ACL_Index contained in the file metadata is also deleted, and at this time, the directory-level ACL of the corresponding parent directory can be temporarily not modified.
  • the parent directory is deleted, it means that all the files and subdirectories contained in the parent directory are also deleted, so the directory-level ACL table of the parent directory can be released at the same time or later.
  • FIG. 3 is a schematic flowchart diagram of a file access method according to an embodiment of the present application. It can be understood that the related steps of the file access method shown in FIG. 3 can be performed after the relevant steps of the file ACL management method shown in FIG. 2.
  • a file access method provided by an embodiment of the present application may include:
  • the file client sends a file access request to the file server.
  • the file access request carries a file identifier (the file represented by the file identifier is a file requested to be accessed) and a user identifier.
  • the file access request may specifically be a file read request, a file write request, or a file execution request.
  • the file server receives the file access request from a file client.
  • the file server reads an ACL index from the metadata of the file represented by the file identifier (the ACL index can be used to index the ACL record).
  • the file server searches for the ACL record that includes the ACL index from the directory level ACL.
  • the file server uses the ACL of the file included in the first ACL record to access the file when the first ACL record including the ACL index is found in the directory level ACL. Perform access control.
  • the file server may refuse to execute a file access request.
  • the file server can execute the file access request.
  • the file server may, for example, execute or deny execution of the file access request in a default manner.
  • the file server sends a file access response to the file client for responding to the file access request.
  • the file access response may indicate an execution result of the file access request.
  • the file client receives a file access response sent by the file server for responding to the file access request.
  • the file server after receiving the file access request from the file client, the file server reads the ACL index from the metadata of the file represented by the file identifier, and searches for the ACL index from the directory level ACL.
  • the file server uses the ACL of the file included in the first ACL record to perform access control on the file access request.
  • the directory-level ACL of the embodiment of the present application accesses the mechanism for referring to the file ACL. It is beneficial to greatly improve the reference access efficiency of file ACL.
  • FIG. 4 is a schematic flowchart diagram of a file ACL obtaining method according to an embodiment of the present application. It can be understood that the related steps of the file ACL obtaining method shown in FIG. 4 can be performed after the relevant steps of the file ACL management method shown in FIG. 2.
  • a file ACL obtaining method provided by an embodiment of the present application may include:
  • the file client sends a file ACL acquisition request to the file server.
  • the file ACL acquisition request may carry parameters such as a file identifier and a user identifier, for example.
  • the file server receives a file ACL acquisition request from a file client.
  • the file server reads an ACL index from the metadata of the file represented by the file identifier (the ACL index can be used to index the ACL record in the directory level ACL).
  • the file server searches for an ACL record that includes the ACL index from a directory level ACL of a parent directory to which the file belongs.
  • the file server After the first ACL record including the ACL index is searched from the directory level ACL, the file server sends the file ACL acquisition request to the file client. The file ACL gets the response.
  • the file ACL acquisition response carries an ACL of the file included in the first ACL record.
  • the file server sends a file ACL acquisition response to the file client for responding to the file ACL acquisition request.
  • the file ACL acquisition response may indicate that the file ACL acquisition fails.
  • the file client receives a file ACL acquisition response sent by the file server for responding to a file ACL acquisition request.
  • the file server after receiving the file ACL obtaining request from the file client, the file server reads the ACL index from the metadata of the file represented by the file identifier carried by the file ACL obtaining request, from the corresponding directory level ACL.
  • the ACL record containing the ACL index is searched.
  • the file server sends the file to the file client and carries the first ACL record.
  • the file ACL containing the file ACL gets the response.
  • the mechanism for obtaining the file ACL based on the directory-level ACL in the embodiment of the present application is advantageous. Greatly improve the efficiency of file ACL acquisition.
  • FIG. 5 is a schematic flowchart diagram of a file ACL management method according to another embodiment of the present disclosure. It can be understood that the related steps of the file ACL management method shown in FIG. 5 can be performed after the relevant steps of the file ACL management method shown in FIG. 2.
  • a file ACL management method provided by another embodiment of the present application may include:
  • the file client sends a second file ACL setting request to the file server.
  • the second file ACL setting request carries a user identifier and a file identifier.
  • the file second file ACL setting request further carries an update ACL of the file represented by the file identifier, and the like.
  • the file server receives the second file ACL setting request from the file client.
  • the file server searches for an ACL record containing the updated ACL of the file from a directory level ACL of the parent directory to which the file belongs.
  • the file server replaces the file by using an ACL index included in the third ACL record, in a case where a third ACL record including an update ACL of the file is found in the directory level ACL.
  • the existing ACL index in the metadata is included in the metadata.
  • the file server creates a fourth ACL record in the directory level ACL.
  • the fourth ACL record includes an ACL index and an update ACL of the file, and the file server replaces an existing ACL index in the metadata of the file by using an ACL index included in the fourth ACL record.
  • the file server sends a second file ACL setting response for responding to the second file ACL setting request to the file client.
  • the file client receives a second file ACL setting response sent by the file server for responding to the second file ACL setting request.
  • the file server after receiving the second file ACL setting request from the file client, the file server searches for an ACL record containing the updated ACL of the file from the directory level ACL of the parent directory of the file.
  • the file server writes the ACL index included in the third ACL record into the metadata of the file, because In this case, the corresponding ACL record is no longer created. In this way, the file ACL in the single directory is deduplicated to a certain extent.
  • the ACLs of different files in the same directory are the same, only the directory-level ACL of the corresponding parent directory can be used.
  • a corresponding ACL record is reserved.
  • the ACL records can be used to find the corresponding ACL record from the directory-level ACL through the ACL index, so that the corresponding ACLs of these different files can be referenced.
  • the directory-based file ACL deduplication mechanism in the embodiment of the present application is advantageous. Greatly improve the deduplication efficiency of file ACL.
  • FIG. 6 is a schematic flowchart of a method for creating a hard link of a file according to an embodiment of the present application. It can be understood that the relevant steps of the file hard link creation method shown in FIG. 6 can be performed after the relevant steps of the file ACL management method shown in FIG. 2.
  • a file hard link creation method provided by an embodiment of the present application may include:
  • the file client sends a hard link creation request to the file server.
  • the hard link creation request carries a user identification and a file identification.
  • the file represented by the file identifier is a file that needs to create a hard link.
  • the file server receives the hard link creation request from a file client.
  • the file server reads an ACL index from the metadata of the file represented by the file identifier (the ACL index can be used to index the ACL record in the directory level ACL).
  • the file server searches for an ACL record that includes the read ACL index from a directory level ACL of a parent directory to which the file belongs.
  • the file server records the file included in the first ACL record.
  • the ACL writes the metadata of the file, and deletes the existing ACL index in the metadata of the file.
  • the file server creates a hard link of the file.
  • the file server sends a hard link creation response to the file client for responding to the hard link creation request.
  • the file client receives a hard link creation response sent by the file server for responding to the hard link creation request.
  • the file server after receiving the hard link creation request from the file client, the file server reads the ACL index from the metadata of the file represented by the file identifier carried by the hard link creation request, from the corresponding directory level.
  • the ACL searches for an ACL record that includes the ACL index.
  • the file server uses the ACL of the file included in the first ACL record. Write the metadata of the file, and delete the existing ACL index in the metadata of the file.
  • the mechanism for obtaining the file ACL based on the directory-level ACL in the embodiment of the present application has It is beneficial to greatly improve the efficiency of file ACL acquisition, and thus greatly improve the efficiency of hard link creation.
  • FIG. 7 is a schematic flowchart diagram of a file migration management method according to an embodiment of the present application. It can be understood that the related steps of the file migration management method shown in FIG. 7 can be performed after the relevant steps of the file ACL management method shown in FIG. 2.
  • a file migration management method provided by an embodiment of the present application may include:
  • the file client sends a file migration request to the file server, where the file migration request carries the directory identifier of the target parent directory and the file identifier.
  • the target parent directory is the parent directory to which the file is to be moved.
  • the parent directory to which the file currently belongs can be called the source parent directory.
  • the file server receives a file migration request from the file client that carries the directory identifier of the target parent directory and the file identifier, and migrates the file represented by the file identifier from its current parent directory to the target parent directory.
  • the file server After migrating the file from its current parent directory to a target parent directory, the file server reads an ACL index from metadata of the file. The file server searches for an ACL record containing the ACL index from a directory level ACL of the source parent directory.
  • the file server reads an ACL fingerprint from the first ACL record that is found.
  • the file server searches for an ACL record that includes the read ACL fingerprint from a directory level ACL of the target parent directory.
  • the file server uses the ACL index included in the fifth ACL record. Replace the existing ACL index in the metadata of the file.
  • the file server is at a directory level of the target parent directory.
  • the sixth ACL record includes an ACL of the file included in the first ACL record, and the sixth ACL record further includes an ACL index.
  • the file server replaces an existing ACL index in the metadata of the file by using an ACL index included in the sixth ACL record.
  • the file server sends the file response to the file client for the corresponding file migration request.
  • the file client can receive the file response sent by the file server for the corresponding file migration request.
  • FIG. 1 is a schematic diagram of the form of an ACL record in a directory level ACL of a parent directory to which a file reference belongs according to an embodiment of the present application.
  • the files f1, f2, and f3 belong to the same parent directory Dir1
  • the files f4, f5, f6, and f7 belong to the same parent directory Dir2
  • the parent directory Dir1 and the parent directory Dir1 belong to the parent directory Dir3.
  • the files f1 and f2 refer to the same ACL record in the directory-level ACL of the parent directory Dir1 (the ACL index is 1001).
  • the metadata of the files f1 and f2 are written into the ACL index 1001.
  • the file f3 refers to the ACL record 1003 in the directory level ACL of the parent directory Dir1, for example, the ACL index 1003 is written in the metadata of the file f3.
  • Files f4 and f5 refer to the same ACL record in the directory level ACL of the parent directory Dir2, for example, the metadata of files f4 and f5 are written to the ACL index 1001.
  • the file f6 refers to the ACL record 1002 in the directory level ACL of the parent directory Dir2.
  • the ACL index 1002 is written in the metadata of the file f6.
  • the file f7 refers to the ACL record 1003 in the directory level ACL of the parent directory Dir2.
  • the metadata of the file f7 includes the ACL index 1003.
  • Figure 1-E exemplifies the situation before migration in Figure 1-E.
  • file f6 is migrated from parent directory Dir2 to parent directory Dir1
  • the reference relationship of related files to ACL records may be exemplified from Figure 1-E.
  • the situation changes as shown in Figure 1-F.
  • the previous file f6 refers to the ACL record 1002 in the directory level ACL of the directory Dir2, and changes to the ACL record 1004 in the directory level ACL of the directory D6 referenced by the file f6.
  • Other file migration scenarios can be deduced by analogy.
  • the file server migrates the file from its current parent directory to the target parent directory, and reads the corresponding ACL from the directory level ACL of the source directory.
  • the ACL record containing the read ACL fingerprint is searched from the directory-level ACL of the target parent directory, and the fifth ACL fingerprint containing the read is found in the directory-level ACL of the target parent directory.
  • the file server replaces the existing ACL index in the metadata of the file by using the ACL index included in the fifth ACL record, because the directory of the target parent directory is no longer in this case.
  • the ACL records are created in the ACL.
  • the file ACLs in the single directory are deduplicated to a certain extent.
  • the ACLs of different files in the same directory are the same, only one ACL can be reserved in the directory-level ACL of the corresponding parent directory. Record that the same ACLs with the same ACL can be found in the directory-level ACL through the ACL index, and the corresponding ACLs of these different files can be implemented. Quote.
  • the directory-based file ACL deduplication mechanism in the embodiment of the present application is advantageous. Greatly improve the deduplication efficiency of file ACL.
  • FIG. 8 is a schematic flowchart of a file migration management method according to another embodiment of the present application. It can be understood that the related steps of the file migration management method shown in FIG. 8 can be performed after the relevant steps of the file ACL management method shown in FIG. 2.
  • a file migration management method provided by another embodiment of the present application may include:
  • the file client sends a file migration request to the file server, where the file migration request carries the directory identifier of the target parent directory and the file identifier.
  • the file server receives a file migration request from a file client that carries a directory identifier of the target parent directory and the file identifier, and migrates the file represented by the file identifier from a parent directory to a target parent directory.
  • the file server After migrating the file from its current parent directory to a target parent directory, the file server reads an ACL index from metadata of the file. The file server searches for an ACL record containing the ACL index from a directory level ACL of the source parent directory.
  • the file server reads an ACL of the file from the first ACL record that is found.
  • the file server searches for an ACL record of an ACL that includes the file from a directory level ACL of the target parent directory.
  • the file server replaces the ACL index included in the fifth ACL record.
  • the existing ACL index in the metadata of the file is replaced.
  • the file server creates a new directory in the directory-level ACL of the target parent directory.
  • the sixth ACL record includes a file ACL of the file included in the first ACL record, and the sixth ACL record further includes an ACL index.
  • the file server replaces an existing ACL index in the metadata of the file by using an ACL index included in the sixth ACL record.
  • the file server sends the file response to the file client for the corresponding file migration request.
  • the file client can receive the file response sent by the file server for the corresponding file migration request.
  • the directory is still moved according to the conventional process, and the directory-level ACL of the moved directory is not changed.
  • the file server migrates the file from its current parent directory to the target parent directory, and reads the corresponding file from the directory level ACL of the source directory.
  • the ACL record containing the read file ACL is searched from the directory-level ACL of the target parent directory, and the fifth ACL record containing the read ACL fingerprint is found in the directory-level ACL of the target parent directory.
  • the file server replaces the existing ACL index in the metadata of the file by using the ACL index included in the fifth ACL record, because the directory level ACL of the target parent directory is no longer in this case.
  • FIG. 9 is a schematic flowchart diagram of a file ACL management method according to an embodiment of the present disclosure. It can be understood that the relevant steps of the file migration management method shown in FIG. 9 can be performed before or after the relevant steps of the file ACL management method shown in FIG. 2.
  • a file ACL management method provided by an embodiment of the present disclosure may include:
  • the file server searches the directory level ACL for an ACL record that is not referenced by any file under the parent directory.
  • the cleaning trigger condition may include, for example, at least one of the following conditions: the number of ACL records of the directory level ACL reaches a quantity threshold (the quantity threshold may be, for example, 100, 121, 150, 80, 200 or other values), and the directory is received.
  • the level ACL cleanup command for example, receiving a directory level ACL cleanup command from the client
  • the directory level ACL cleanup timer the timing of the cleanup timer can be, for example, 1 minute, 100 minutes, 200 minutes, or other duration.
  • the cleaning trigger condition is not limited to the above examples.
  • the file server validates the ACL record referenced by the file in the parent directory. Specifically, the valid tag may be added to the directory level ACL or the ACL index of the valid ACL record may be written into a linked list. It can be understood that by traversing, ACL records that are not referenced by any file under the parent directory can be found.
  • the file server records the X ACL records from the directory level ACL. freed.
  • the file system may provide a user mode tool, which may specify a directory, a specified subtree, etc., indicating that the directory level ACL of the corresponding directory is to be cleaned up.
  • the user can periodically or actively run the user mode tool to perform invalid ACL record cleaning on the specified directory or subtree.
  • an invalid ACL background cleanup thread can be created in the file system.
  • the directory may be submitted to the ACL background cleanup thread, and the invalid ACL background cleanup thread is triggered to run.
  • the invalid ACL background cleanup thread traverses the files contained in the directory and cleans up the ACL records that are no longer referenced by the file.
  • the file server searches for the file from the directory level ACL and is not referenced by any file under the parent directory.
  • the ACL record in the case that the X ACL records that are not referenced by any file in the parent directory are found from the directory level ACL, the file server records the X ACL records from the directory level ACL. freed.
  • the release of the invalid ACL record in the directory-level ACL is beneficial to improve the proportion of valid ACL records in the directory-level ACL, which is beneficial to improving the access efficiency of file ACLs in the directory-level ACL.
  • an embodiment of the present application further provides a file server 1000, which may include: a communication unit 1010, a searching unit 1020, and a processing unit 1030.
  • the communication unit 1010 is configured to receive a first file ACL setting request from the file client, where the first file ACL setting request carries a file identifier, and the first file ACL setting request further carries the file represented by the file identifier. ACL.
  • the searching unit 1020 is configured to search for an ACL record containing the ACL of the file from among the directory level ACLs of the parent directory to which the file belongs.
  • the processing unit 1030 is configured to establish, by the searching unit, the first ACL record that includes the ACL of the file from the directory level ACL, and establish the file to the first ACL record. Reference; in the case that the search unit does not find any ACL record containing the ACL of the file from the directory level ACL, create a second ACL record in the directory level ACL.
  • the second ACL record includes an ACL of the file, and a reference to the second ACL record is established by the file.
  • the first ACL record includes an ACL index
  • the processing unit establishing the reference to the first ACL record by the processing unit may include: using an ACL index included in the first ACL record Write to the metadata of the file.
  • the second ACL record includes an ACL index
  • the processing unit establishing the reference to the second ACL record by the processing unit includes: writing an ACL index included in the second ACL record Enter the metadata of the file.
  • the ACL index included in the first ACL record is different from the ACL index included in the second ACL record.
  • the file server 1000 may further include: a calculating unit 1040, configured to calculate a fingerprint of an ACL of the file.
  • the searching unit 1020 is specifically configured to be used to search for an ACL record referenced by the file from the directory level ACL.
  • the communication unit 1010 is further configured to receive a file access request from the file client that carries the file identifier.
  • the searching unit 1020 is further configured to search for the ACL record referenced by the file from the directory level ACL.
  • the processing unit 1030 is further configured to: when the searching unit searches for the first ACL record referenced by the file from the directory level ACL, use the first ACL to record the file included The ACL performs access control on the access request.
  • the communication unit 1010 is further configured to receive a file ACL acquisition request from the file client that carries the file identifier.
  • the lookup unit 1020 is further configured to be used to look up the ACL record of the file reference from the directory level ACL.
  • the communication unit 1010 is further configured to send, to the file client, a response to the file if the searching unit searches for the first ACL record referenced by the file from the directory level ACL.
  • the ACL obtains the requested file ACL to obtain a response, wherein the file ACL acquisition response carries an ACL of the file included in the first ACL record.
  • the searching, by the searching unit, the ACL record of the file reference from the directory level ACL may include: reading an ACL index from the metadata of the file, from the directory level ACL. Find the ACL record that contains the ACL index.
  • the ACL record that includes the ACL index in the directory-level ACL is an ACL record referenced by the file.
  • the communication unit 1010 is further configured to receive a second file ACL setting request from a file client, where the second file ACL setting request carries the file identifier, where the The second ACL setup request also carries an update ACL of the file.
  • the searching unit 1020 is further configured to: search, from the directory level ACL, an ACL record that includes an update ACL of the file;
  • the processing unit is further configured to: when the searching unit searches for the third ACL record that includes the update ACL of the file from the directory level ACL, use the ACL included in the third ACL record The index replaces the existing ACL index in the metadata of the file;
  • the locating unit does not find any ACL record that includes the updated ACL of the file from the directory-level ACL, create a fourth ACL record in the directory-level ACL, where the fourth ACL record is An ACL that includes an ACL index and the file, and replaces an existing ACL index in the metadata of the file by using an ACL index included in the fourth ACL record.
  • the communication unit 1010 is further configured to receive a hard link creation request from the file client that carries the file identifier.
  • the searching unit 1020 is further configured to search for the ACL record referenced by the file from the directory level ACL.
  • the processing unit 1030 is further configured to: when the searching unit searches for the first ACL record referenced by the file from the directory level ACL, the file included in the first ACL record The ACL is written into the metadata of the file, and the existing ACL index in the metadata of the file is deleted; a hard link of the file is created.
  • the communication unit 1010 is further configured to receive a file migration request from the file client that carries the directory identifier of the target parent directory and the file identifier.
  • the processing unit 1030 is further configured to migrate the file from the parent directory to the target parent directory.
  • the searching unit 1020 is further configured to: read an ACL index from the metadata of the file; search for an ACL record that includes the ACL index from the directory level ACL; and find the ACL from the directory level ACL In the case of the first ACL record including the ACL index, the ACL fingerprint is read from the first ACL record that is found; and the directory-level ACL of the target parent directory is searched for ACL record of the ACL fingerprint;
  • the processing unit 1030 is further configured to: when the searching unit 1020 finds the fifth ACL record that includes the read ACL fingerprint from the directory level ACL of the target parent directory, The ACL index included in the fifth ACL record replaces the existing ACL index in the metadata of the file; the search unit 1020 does not find the read-in from the directory-level ACL of the target parent directory.
  • a sixth ACL record is created in the directory level ACL of the target parent directory, where the sixth ACL record includes the first ACL record.
  • An ACL of the file, the sixth ACL record further includes an ACL index, and the ACL index included in the metadata of the file is replaced by the ACL index included in the sixth ACL record.
  • the communication unit 1010 is further configured to receive a file migration request from the file client that carries the directory identifier of the target parent directory and the file identifier.
  • the processing unit 1030 is further configured to migrate the file from the parent directory to the target parent directory.
  • the searching unit 1020 is further configured to: read an ACL index from the metadata of the file; search for an ACL record that includes the ACL index from the directory level ACL; and find the ACL from the directory level ACL In the case of the first ACL record including the ACL index, the ACL of the file is read from the first ACL record that is found; and the directory ACL is searched for from the target parent directory.
  • the processing unit 1030 is further configured to: when the searching unit 1020 searches for a fifth ACL record that includes an ACL of the file from a directory level ACL of the target parent directory, using the fifth ACL record.
  • the ACL index included in the file replaces the existing ACL index in the metadata of the file;
  • the processing unit 1030 is further configured to: in the case that the searching unit 1020 does not find any ACL record including the ACL of the file from the directory level ACL of the target parent directory, A sixth ACL record is created in the directory-level ACL of the target parent directory, where the sixth ACL record includes the ACL of the file included in the first ACL record, and the sixth ACL record further includes an ACL index. And replacing the existing ACL index in the metadata of the file by using the ACL index included in the sixth ACL record.
  • the file server further includes: a cleaning unit 1050, configured to search, from the directory-level ACL, an ACL record that is not referenced by any file in the parent directory, if the cleanup trigger condition of the directory-level ACL is satisfied. If the X ACL records that are not referenced by any file in the parent directory are searched from the directory-level ACL, the X ACL records are released from the directory-level ACL.
  • a cleaning unit 1050 configured to search, from the directory-level ACL, an ACL record that is not referenced by any file in the parent directory, if the cleanup trigger condition of the directory-level ACL is satisfied. If the X ACL records that are not referenced by any file in the parent directory are searched from the directory-level ACL, the X ACL records are released from the directory-level ACL.
  • the cleanup triggering condition may include, for example, at least one of the following conditions: the number of ACL records of the directory level ACL reaches a quantity threshold, the directory level ACL cleanup instruction, and the directory level ACL are cleaned. The timer arrived.
  • an embodiment of the present application further provides a file server 1100, which may include: a storage component 1110, a communication interface 1120, and a processor 1130 coupled to the storage component 1110 and the communication interface 1120.
  • the storage component 1110 is configured to store instructions
  • the processor 1120 is configured to execute the instructions, wherein the communication interface 1120 is configured to communicate with other devices under the control of the processor 1130.
  • the steps performed by the file server in any of the above-described embodiments of the present application may be performed according to the instructions.
  • the processor 1130 can also be referred to as a central processing unit (CPU).
  • the storage unit 1111 may include a read only memory and a random access memory, and provides instructions, data, and the like to the processor 1130.
  • a portion of storage component 1111 may also include a non-volatile random access memory.
  • the components of file server 1100 in a particular application are coupled together, for example, via a bus system.
  • the bus system may include a power bus, a control bus, a status signal bus, and the like in addition to the data bus. However, for clarity of description, various buses are labeled as bus system 1140 in the figure.
  • the method disclosed in the foregoing embodiments of the present invention may be applied to the processor 1130 or implemented by the processor 1130.
  • the processor 1130 may be an integrated circuit chip with signal processing capabilities.
  • each step of the above method may be completed by an integrated logic circuit of hardware in the processor 1130 or an instruction in a form of software.
  • the processor 1130 can be a general purpose processor, a digital signal processor, an application specific integrated circuit, an off-the-shelf programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component.
  • the processor 1130 can implement or perform the various methods, steps, and logic blocks disclosed in the embodiments of the present invention.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present invention may be directly implemented by the hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor.
  • the software modules can be located in random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, etc., which are well established in the art.
  • the storage medium is located in the storage component 1110.
  • the processor 1130 can read the information in the storage component 1110 and complete the steps of the above method in combination with its hardware.
  • the file server 1100 can perform the method steps corresponding to the file server in the embodiment shown in FIG. 2 to FIG. 9 above.
  • processor 1130 can be used to:
  • the first ACL record includes an ACL index
  • the processor 1130 establishes a reference to the first ACL record by the file, including: ACL index included in the first ACL record Write to the metadata of the file.
  • the second ACL record includes an ACL index
  • the processor 1130 establishing the reference to the second ACL record by the file includes: writing an ACL index included in the second ACL record to the file
  • the ACL index included in the first ACL record is different from the ACL index included in the second ACL record.
  • the processor 1130 is further configured to:
  • the processor 1130 is further configured to:
  • a fourth ACL record is created in the directory level ACL, where the fourth ACL record is included There is an update ACL of the file, and the current reference of the file to other ACL records is replaced by the file reference to the fourth ACL record.
  • the processor 1130 is further configured to:
  • an ACL fingerprint is read from the first ACL record that is found; from the target parent directory Finding an ACL record containing the read ACL fingerprint in the directory-level ACL;
  • the file is replaced by the ACL index included in the fifth ACL record.
  • a sixth ACL is created in the directory level ACL of the target parent directory. Recording, wherein the sixth ACL record includes an ACL of the file included in the first ACL record, and the sixth ACL record further includes an ACL index, where the sixth ACL record is included
  • the ACL index replaces the existing ACL index in the metadata of the file.
  • an embodiment of the present invention provides a communication system, including: a file client 1210 and a file server 1220 that are connected to each other.
  • the file server 1220 can be any file server provided by the foregoing embodiment of the present application.
  • the file client 1210 can be any of the file servers provided by the above embodiments of the present application.
  • embodiments of the present application also provide a computer readable storage medium storing program code for session message processing.
  • the program code includes instructions for performing some or all of the steps of any of the methods of the present application.
  • the disclosed apparatus may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division, and the actual implementation may have another division manner, for example, multiple units or components may be combined or may be integrated. Go to another system, or some features can be ignored or not executed.
  • the indirect coupling or direct coupling or communication connection shown or discussed herein may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical or otherwise.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • 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 integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请实施例公开了文件ACL管理方法和相关装置和系统。一种文件ACL管理方法包括:接收来自文件客户端的第一文件ACL设置请求,第一文件ACL设置请求携带有文件标识,所述第一文件ACL设置请求还携带有所述文件标识所表示的文件的ACL;从所述文件所属父目录的目录级ACL之中查找包含有所述文件的ACL的ACL记录;在从所述目录级ACL中查找到了包含有所述文件的ACL的第一ACL记录的情况之下,建立所述文件对所述第一ACL记录的引用。本申请实施例的技术方案有利于极大的提升文件ACL的去重/访问效率。

Description

文件访问控制列表管理方法和相关装置和系统 技术领域
本申请涉及计算机技术领域,具体主要涉及了文件访问控制列表管理方法和相关装置和系统。
背景技术
目前,用文件系统进行文件管理是非常普遍的,文件系统中的文件通常被存储于磁盘阵列等存储部件。
在一种典型网络架构中,若干个文件客户端通过网络与文件服务器(例如网络附属存储(NAS,Network Attached Storage)服务器连接),文件服务器包括磁盘阵列。文件服务器为文件客户端(例如NAS Client)提供文件系统的数据访问服务。
通常文件系统会把磁盘阵列的存储介质格式化为特定格式,分别存储元数据和内容数据。例如文件的元数据包括文件大小、文件修改时间等属性存储在元数据区。文件的内容数据存储在数据区,通过文件元数据可找到文件内容数据所在位置。
文件的访问控制列表(ACL,Access Control Lists)是文件系统中对文件标准属性读/写/执行(R/W/X)的附加扩展。文件的ACL包含若干项访问控制项(ACE,Access Control Entry)。每项ACE可包含控制类型(type)、用户标识(user id)和权限(mask)等内容。其中,控制类型包含允许(allowed)和拒绝(denied)等,用户标识表示某一用户或某类用户,mask表示相应用户的访问权限,一般采用掩码方式表示。因此ACL可细粒度的赋予不同用户不同权限,给予用户更好控制文件读写和权限赋予等的能力,因此ACL已经被例如Linux、NTFS、FreeBSD等系统普遍支持。
传统技术中,整个文件系统只维护一张全局ACL(系统级ACL),全局ACL包括了文件系统的所有文件的ACL。因此,当整个文件系统的文件数量较大时,全局ACL所包括的文件ACL的数量也将变得很大,这样就可能严重影响到文件ACL的去重/访问效率。
发明内容
本申请实施例提供文件访问控制列表管理方法和相关装置和系统。
本申请实施例第一方面提供一种文件ACL管理方法,包括:当文件ACL需被设置,文件服务器接收来自文件客户端的第一文件ACL设置请求。所述第一文件ACL设置请求携带有文件标识。第一文件ACL设置请求还携带有所述文件标识所表示的文件的ACL。文件的ACL可称“文件ACL”或者“文件级ACL”。所述文件服务器从所述文件所属父目录的目录级ACL之中查找包含有所述文件的ACL的ACL记录。在从所述目录级ACL中查找到了包含有所述文件的ACL的第一ACL记录的情况之下,所述文件服务器建立所述文件对所述第一ACL记录的引用。在从所述目录级ACL中未查找到包含有所述文件的ACL的任何ACL记录的情况下,所述文件服务器在所述目录级ACL中新建第二ACL记录,建立所述文件对所述第二ACL记录的引用,所述第二ACL记录中包含所述文件的ACL。
可以理解,父目录的目录级ACL中的ACL记录只允许被所述父目录下的文件引用。因此,与之存在引用关系的文件的数量通常相对较少,因此目录粒度的ACL所包含的ACL记录,相比传统的全局ACL所包含的ACL记录相对更少,因此遍历单个目录级ACL所需时间也会大大缩短,这就有利于极大提升业务处理效率和客户体验。
其中,建立文件对ACL记录的引用,也就表示建立文件对ACL记录的引用关系,因此, 基于建立的文件对ACL记录的引用,便可获取到文件所引用的ACL记录。
当然,建立文件对ACL记录的引用的具体实现方式可有多种,例如可将ACL记录的相关索引写入文件的元数据,或利用引用关系表来记录文件对ACL记录的引用关系等等。
具体例如,所述第一ACL记录中包含ACL索引,所述建立所述文件对所述第一ACL记录的引用包括:将所述第一ACL记录中包含的ACL索引写入所述文件的元数据中。
具体例如,所述第二ACL记录中包含ACL索引,所述建立所述文件对所述第二ACL记录的引用包括:将所述第二ACL记录中包含的ACL索引写入所述文件的元数据中。其中,所述第一ACL记录中包含的ACL索引不同于所述第二ACL记录中包含的ACL索引。所述父目录的目录级ACL中的不同ACL记录所包含的ACL索引互不不相同。利用ACL索引则可在对应目录级ACL中查找到包含这个ACL索引的ACL记录。
可以理解,上述技术方案中,在接收到来自文件客户端的第一文件ACL设置请求之后,文件服务器从文件所属父目录的目录级ACL之中查找包含所述文件的ACL的ACL记录,在从所述目录级ACL中查找到了包含所述文件的ACL的第一ACL记录的情况之下,文件服务器建立所述文件对第一ACL记录的引用,具体例如将第一ACL记录中包含的ACL索引写入所述文件的元数据中,由于这种情况下不再新建相应ACL记录,这样在一定程度上实现了单目录下的文件ACL去重,当同一目录下的不同文件的ACL相同时,可只在相应父目录的目录级ACL中保留1条相应ACL记录,这些ACL相同的不同文件可通过ACL索引来从目录级ACL中找到这条相应ACL记录,进而实现这些不同文件的相应ACL的引用。可以理解,相比于传统的基于全局ACL进行文件ACL的去重访问机制,由于目录级ACL包含的ACL记录的数量相对会少了很多,因此,本申请一些实施例的这种基于目录级ACL的文件ACL去重访问机制,有利于极大的提升文件ACL的去重/访问效率。
在一些可能的实施方式中,所述方法还可包括:所述文件服务器计算所述文件的ACL的指纹。其中,从所述文件所属父目录的目录级ACL之中查找包含有所述文件的ACL的ACL记录,包括:从所述目录级ACL之中查找包含有所述文件的ACL的指纹的ACL记录,所述目录级ACL中包含所述指纹的ACL记录中包含所述文件的ACL。
ACL指纹的计算可以采用例如MD5算法/SHA1算法等等基于摘要的加密算法,这些加密算法可把数十KB大小的ACL映射为例如8字节或12字节的ACL指纹。实践发现,ACL指纹相对于ACL本身更小,指纹大小通常在十几个字节左右,而ACL本身则可达到数十KB,因此利用ACL指纹来搜索查找有利于降低比较开销。
在一些可能的实施方式中,所述方法还包括:当需对文件进行访问,所述文件服务器接收来自文件客户端的携带有所述文件标识的文件访问请求;所述文件服务器从所述目录级ACL中查找所述文件引用的ACL记录,在从所述目录级ACL中查找到了所述文件引用的第一ACL记录的情况之下,所述文件服务器利用所述第一ACL记录包含的所述文件的ACL对所述访问请求进行访问控制。
可以理解,上述技术方案中,在接收到了来自文件客户端的文件访问请求之后,文件服务器从文件标识所表示的文件的元数据中读取ACL索引,从目录级ACL中查找被所述文件引用的ACL记录,在从目录级ACL中查找到了被所述文件引用的第一ACL记录的情况下,文件服务器利用第一ACL记录包含的文件的ACL对文件访问请求进行访问控制。相比于传统的基于全局ACL来访问引用文件ACL的机制,由于目录级ACL包含的ACL记录的数量相 对少很多,因此这种基于目录级ACL来访问引用文件ACL的机制,有利于极大的提升文件ACL的引用访问效率。
在一些可能的实施方式之中,所述方法还可以包括:当需要获取文件的文件ACL,所述文件服务器可接收来自文件客户端的携带所述文件标识的文件ACL获取请求。所述文件服务器从所述目录级ACL之中查找所述文件引用的ACL记录。并且,在从所述目录级ACL之中查找到了所述文件引用的第一ACL记录的情况之下,所述文件服务器向所述文件客户端发送用于响应所述文件ACL获取请求的文件ACL获取响应。所述文件ACL获取响应携带有所述第一ACL记录中包含的所述文件的ACL。
可以理解,上述技术方案中,接收到来自文件客户端的文件ACL获取请求之后,文件服务器从相应父目录的目录级ACL中查找被所述文件引用的ACL记录,在从这个目录级ACL中查找到了被所述文件引用的第一ACL记录的情况下,文件服务器向所述文件客户端发送携带有所述第一ACL记录中包含的文件ACL的文件ACL获取响应。相比于传统的基于全局ACL来获取文件ACL的机制,由于目录级ACL包含的ACL记录的数量相对很少,因此这种基于目录级ACL来获取文件ACL的机制,有利于极大的提升文件ACL的获取效率。
在一些可能的实施方式之中,所述方法还可包括:当文件ACL需被更新设置,所述文件服务器接收来自文件客户端的第二文件ACL设置请求。所述第二文件ACL设置请求携带有所述文件标识。所述第二ACL设置请求还携带有所述文件的更新ACL。所述文件服务器从所述目录级ACL之中查找包含所述文件的更新ACL的ACL记录。
在从所述目录级ACL中查找到了包含所述文件的更新ACL的第三ACL记录的情况之下,所述文件服务器将所述文件当前对其他ACL记录的引用替换为所述文件对所述第三ACL记录的引用。具体例如,所述文件服务器可利用所述第三ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引,进而实现将所述文件当前对其他ACL记录的引用替换为所述文件对所述第三ACL记录的引用。
在从所述目录级ACL中未查找到包含所述文件的更新ACL的任何ACL记录的情况之下,在所述目录级ACL中新建第四ACL记录,其中,所述第四ACL记录中包含有所述文件的更新ACL,将所述文件当前对其他ACL记录的引用,替换为所述文件对所述第四ACL记录的引用。具体例如,所述文件服务器可利用所述第四ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引,进而实现将所述文件当前对其他ACL记录的引用替换为所述文件对所述第四ACL记录的引用。
在一些可能的实施方式之中,所述方法还可以包括:当文件的硬链接需被创建,所述文件服务器接收来自文件客户端的携带所述文件标识的硬链接创建请求。所述文件服务器从所述目录级ACL之中查找所述ACL所引用的ACL记录;在从所述目录级ACL之中查找到了包含有读取到的所述ACL索引的第一ACL记录的情况下,所述文件服务器将所述第一ACL记录中包含的所述文件的ACL写入所述文件的元数据中,并解除所述文件对所述第一ACL记录的引用(例如可通过删除所述文件的元数据中已有的所述第一ACL记录包含的ACL索引,来解除所述文件对所述第一ACL记录的引用),创建所述文件的硬链接。
可以理解,上述技术方案中,接收到了来自文件客户端的硬链接创建请求之后,文件服务器从文件所属父目录的目录级ACL中查找被所述文件引用的的ACL记录,在从这个目录级ACL中查找到了被所述文件引用的第一ACL记录的情况下,文件服务器将所述第一ACL 记录中包含的所述文件的ACL写入所述文件的元数据中,并解除所述文件对所述第一ACL记录的引用。相比于传统的基于全局ACL来获取文件ACL的机制,由于目录级ACL所包含的ACL记录的数量相对很少,因此,这种基于目录级ACL来获取相关文件ACL的机制,有利于极大的提升文件ACL的获取效率,进而极大的提升硬链接创建的效率。
在一些可能实施方式中,从所述目录级ACL中查找所述文件引用的ACL记录例如可包括:从所述文件的元数据中读取ACL索引,从所述目录级ACL中查找包含所述ACL索引的ACL记录。其中,所述目录级ACL中包含所述ACL索引的ACL记录为所述文件引用的ACL记录。
在一些可能的实施方式之中,所述方法还可以包括:当文件需要进行目录迁移,所述文件服务器可接收来自文件客户端的携带有目标父目录的目录标识和所述文件标识的文件迁移请求,所述文件服务器在将所述文件从所述父目录迁移到目标父目录之后,从所述文件的元数据中读取ACL索引。所述文件服务器从所述目录级ACL之中查找包含所述ACL索引的ACL记录。
在从所述目录级ACL之中查找到了包含所述ACL索引的所述第一ACL记录的情况之下,所述文件服务器从查找到的所述第一ACL记录中读取ACL指纹;从所述目标父目录的目录级ACL中查找包含读取到的所述ACL指纹的ACL记录。
在从所述目标父目录的目录级ACL中查找到了包含读取到的所述ACL指纹的第五ACL记录的情况下,所述文件服务器利用所述第五ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
在从所述目标父目录的目录级ACL之中未查找到包含有读取到的所述ACL指纹的任何ACL记录的情况之下,所述文件服务器在所述目标父目录的目录级ACL中新建第六ACL记录,其中,所述第六ACL记录中包含有所述第一ACL记录中包含的所述文件的ACL,所述第六ACL记录中还包含有ACL索引,利用所述第六ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
可以理解,上述技术方案中,在接收到了来自文件客户端的文件迁移请求之后,文件服务器将文件从其当前所属父目录迁移到目标父目录,在从源目录的目录级ACL中读取到相应ACL指纹后,从目标父目录的目录级ACL中查找包含读取到的ACL指纹的ACL记录,在从所述目标父目录的目录级ACL中查找到了包含读取到的所述ACL指纹的第五ACL记录的情况下,所述文件服务器利用所述第五ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引,由于这种情况下不再在目标父目录的目录级ACL新建相应ACL记录,这样在一定程度上实现了单目录下的文件ACL去重,当同一目录下的不同文件的ACL相同时,可只在相应父目录的目录级ACL中保留一条相应ACL记录,这些ACL相同的不同文件可通过ACL索引来从目录级ACL中找到这条相应ACL记录,进而可实现这些不同文件的相应ACL的引用。相比于传统的基于全局ACL的去重访问机制,由于目录级ACL包含的ACL记录的数量相对会少了很多,因此这种基于目录级的文件ACL去重机制,有利于极大的提升文件ACL的去重效率。
在一些可能的实施方式之中,所述方法还可以包括:当文件需要进行目录迁移,所述文件服务器接收来自文件客户端的携带有目标父目录的目录标识和所述文件标识的文件迁移请求,所述文件服务器在将所述文件从所述父目录迁移到目标父目录之后,从所述文件 的元数据中读取ACL索引;所述文件服务器从所述目录级ACL之中查找包含所述ACL索引的ACL记录。
在从所述目录级ACL中查找到的包含所述ACL索引的所述第一ACL记录的情况下,所述文件服务器从查找到的所述第一ACL记录中读取所述文件的ACL;从所述目标父目录的目录级ACL中查找包含所述文件的ACL的ACL记录。
在从所述目标父目录的目录级ACL中查找到了包含所述文件的ACL的第五ACL记录的情况下,所述文件服务器利用所述第五ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
在从所述目标父目录的目录级ACL之中未查找到包含所述文件的ACL的任何ACL记录的情况之下,所述文件服务器在所述目标父目录的目录级ACL中新建第六ACL记录,所述第六ACL记录中包含有所述第一ACL记录中包含的所述文件的ACL,所述第六ACL记录中还包含有ACL索引,所述文件服务器利用所述第六ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
在一些可能的实施方式之中,所述方法还包括:在所述目录级ACL的清理触发条件满足的情况下,所述文件服务器从所述目录级ACL中查找未被所述父目录下的任意文件引用的ACL记录,在从所述目录级ACL中查找了未被所述父目录下的任意文件引用的X条ACL记录的情况下,所述文件服务器将所述X条ACL记录从所述目录级ACL中释放。
例如所述清理触发条件可包括如下条件中的至少1个:目录级ACL的ACL记录的数量达到数量阈值、接收到了目录级ACL清理指令、目录级ACL的清理定时器到达。
由于引入了目录级ACL中的无效ACL记录的释放机制,这样有利于提升目录级ACL中有效ACL记录的占比,进而有利于提升目录级ACL中的文件ACL的访问效率。
本申请实施例第二方面提供一种文件服务器,可包括:通信单元、查找单元和处理单元。
通信单元,用于接收来自文件客户端的第一文件ACL设置请求,所述第一文件ACL设置请求携带有文件标识,所述第一文件ACL设置请求还携带有所述文件标识所表示的文件的ACL。
查找单元,用于从所述文件所属父目录的目录级ACL之中查找包含有所述文件的ACL的ACL记录。
处理单元,用于在所述查找单元从所述目录级ACL之中查找到了包含有所述文件的ACL的第一ACL记录的情况之下,建立所述文件对所述第一ACL记录的引用;在所述查找单元从所述目录级ACL之中未查找到包含有所述文件的ACL的任何ACL记录的情况之下,在所述目录级ACL之中新建第二ACL记录。其中,所述第二ACL记录中包含所述文件的ACL,建立所述文件对所述第二ACL记录的引用。
在一些可能实施方式中,所述第一ACL记录中包含ACL索引,所述处理单元建立所述文件对所述第一ACL记录的引用可包括:将所述第一ACL记录中包含的ACL索引写入所述文件的元数据中。
在一些可能实施方式中,所述第二ACL记录中包含ACL索引,所述处理单元建立所述文件对所述第二ACL记录的引用包括:将所述第二ACL记录中包含的ACL索引写入所述文件的元数据中。其中,所述第一ACL记录中包含的ACL索引不同于所述第二ACL记录中包 含的ACL索引。
在一些可能实施方式中,所述文件服务器还包括:计算单元,用于计算所述文件的ACL的指纹。所述查找单元从所述文件所属父目录的目录级ACL之中查找包含有所述文件的ACL的ACL记录,可包括:从所述目录级ACL之中查找包含有所述文件的ACL的指纹的ACL记录,所述目录级ACL中包含所述指纹的ACL记录中包含所述文件的ACL。
在一些可能实施方式之中,所述通信单元还可用于,接收来自文件客户端的携带有所述文件标识的文件访问请求。所述查找单元还可用于从所述目录级ACL中查找所述文件引用的ACL记录。其中,所述处理单元还可用于在所述查找单元从所述目录级ACL中查找到了所述文件引用的第一ACL记录的情况之下,利用所述第一ACL记录包含的所述文件的ACL对所述访问请求进行访问控制。
在一些可能的实施方式之中,所述通信单元还可用于,接收来自文件客户端的携带所述文件标识的硬链接创建请求。所述查找单元还可用于从所述目录级ACL中查找所述文件引用的ACL记录。其中,所述处理单元还可用于在所述查找单元从所述目录级ACL中查找到了所述文件引用的第一ACL记录的情况之下,将所述第一ACL记录中包含的所述文件的ACL写入所述文件的元数据中,并解除所述文件对所述第一ACL记录的引用(例如可通过删除所述文件的元数据中已有的所述第一ACL记录包含的ACL索引,来解除所述文件对所述第一ACL记录的引用),创建所述文件的硬链接。
在一些可能实施方式中,所述查找单元从所述目录级ACL中查找所述文件引用的ACL记录例如可包括:从所述文件的元数据中读取ACL索引,从所述目录级ACL中查找包含所述ACL索引的ACL记录。其中,所述目录级ACL中包含所述ACL索引的ACL记录为所述文件引用的ACL记录。
在一些可能实施方式之中,所述通信单元还用于,接收来自文件客户端的第二文件ACL设置请求。其中,所述第二文件ACL设置请求携带有所述文件标识。所述第二ACL设置请求还携带有所述文件的更新ACL。
所述查找单元还用于,从所述目录级ACL之中查找包含所述文件的更新ACL的ACL记录。
所述处理单元还可用于,在所述查找单元从所述目录级ACL中查找到了包含所述文件的更新ACL的第三ACL记录的情况之下,将所述文件当前对其他ACL记录的引用,替换为所述文件对所述第三ACL记录的引用。
所述处理单元还可用于,在所述查找单元从所述目录级ACL之中未查找到包含所述文件的更新ACL的任何ACL记录的情况之下,在所述目录级ACL中新建第四ACL记录。其中,所述第四ACL记录中包含有所述文件的更新ACL,将所述文件当前对其他ACL记录的引用,替换为所述文件对所述第四ACL记录的引用。
在一些可能实施方式之中,所述通信单元还可用于,接收来自文件客户端的携带有目标父目录的目录标识和所述文件标识的文件迁移请求。所述处理单元还可用于将所述文件从所述父目录迁移到所述目标父目录。
所述查找单元还可用于,从所述文件的元数据中读取ACL索引;从所述目录级ACL之中查找包含所述ACL索引的ACL记录;从所述目录级ACL之中查找到包含所述ACL索引的所述第一ACL记录的情况下,从查找到的所述第一ACL记录中读取ACL指纹;从所述目标 父目录的目录级ACL中查找包含读取到的所述ACL指纹的ACL记录。
所述处理单元还可用于在所述查找单元从所述目标父目录的目录级ACL中查找到了包含读取到的所述ACL指纹的第五ACL记录的情况之下,利用所述第五ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
所述处理单元还可用于在所述查找单元从所述目标父目录的目录级ACL之中未查找到包含有读取到的所述ACL指纹的任何ACL记录的情况之下,在所述目标父目录的目录级ACL中新建第六ACL记录,其中,所述第六ACL记录中包含有所述第一ACL记录中包含的所述文件的ACL,所述第六ACL记录中还包含有ACL索引,利用所述第六ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
在一些可能实施方式中,所述通信单元可还用于,接收来自文件客户端的携带有目标父目录的目录标识和所述文件标识的文件迁移请求。所述处理单元还可用于将所述文件从所述父目录迁移到所述目标父目录。
所述查找单元还可用于,从所述文件的元数据中读取ACL索引;从所述目录级ACL之中查找包含所述ACL索引的ACL记录;在从所述目录级ACL中查找到的包含所述ACL索引的所述第一ACL记录的情况下,从查找到的所述第一ACL记录中读取所述文件的ACL;从所述目标父目录的目录级ACL中查找包含所述文件的ACL的ACL记录;
所述处理单元还可用于,在所述查找单元从所述目标父目录的目录级ACL中查找到了包含所述文件的ACL的第五ACL记录的情况之下,利用所述第五ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
所述处理单元还用于,在所述查找单元从所述目标父目录的目录级ACL之中未查找到包含所述文件的ACL的任何ACL记录的情况之下,在所述目标父目录的目录级ACL中新建第六ACL记录,所述第六ACL记录中包含有所述第一ACL记录中包含的所述文件的ACL,所述第六ACL记录中还包含有ACL索引,利用所述第六ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
在一些可能实施方式中,所述所述文件服务器还包括:清理单元,用于在所述目录级ACL的清理触发条件满足的情况下,从所述目录级ACL中查找未被所述父目录下的任意文件引用的ACL记录,在从所述目录级ACL中查找了未被所述父目录下的任意文件引用的X条ACL记录的情况下,将所述X条ACL记录从所述目录级ACL中释放。
本申请实施例的第三方面提供一种文件服务器,可以包括:相互耦合的处理器、通信接口和存储部件。所述存储部件用于存储指令和数据,所述处理器用于执行所述指令。所述通信接口用于在所述处理器的控制下与其他设备进行通信。其中,所述处理器用于执行本发明实施例提供的任意一种方法的部分或全部步骤。
举例来说,所述处理器可用于:
通过通信接口接收来自文件客户端的第一文件ACL设置请求,所述第一文件ACL设置请求携带有文件标识,所述第一文件ACL设置请求还携带有所述文件标识所表示的文件的ACL;
从所述文件所属父目录的目录级ACL之中查找包含有所述文件的ACL的ACL记录;
在从所述目录级ACL中查找到了包含有所述文件的ACL的第一ACL记录的情况之下,建立所述文件对所述第一ACL记录的引用;在从所述目录级ACL中未查找到包含有所述文 件的ACL的任何ACL记录的情况下,在所述目录级ACL中新建第二ACL记录,其中,所述第二ACL记录中包含所述文件的ACL,建立所述文件对所述第二ACL记录的引用。
在一些可能实施方式中,所述第一ACL记录中包含ACL索引,所述建立所述文件对所述第一ACL记录的引用包括:将所述第一ACL记录中包含的ACL索引写入所述文件的元数据中;
其中,所述第二ACL记录中包含ACL索引,所述建立所述文件对所述第二ACL记录的引用包括:将所述第二ACL记录中包含的ACL索引写入所述文件的元数据中,其中,所述第一ACL记录中包含的ACL索引不同于所述第二ACL记录中包含的ACL索引。
在一些可能实施方式中,所述处理器还可用于:
通过通信接口接收来自文件客户端的携带有所述文件标识的文件访问请求;从所述文件的元数据中读取ACL索引;从所述目录级ACL中查找包含所述ACL索引的ACL记录;在从所述目录级ACL中查找到了包含所述ACL索引的第一ACL记录的情况下,利用所述第一ACL记录包含的所述文件的ACL对所述访问请求进行访问控制。
在一些可能实施方式中,所述处理器还可用于:通过通信接口接收来自文件客户端的第二文件ACL设置请求,所述第二文件ACL设置请求携带有所述文件标识,所述第二ACL设置请求还携带有所述文件的更新ACL;从所述目录级ACL之中查找包含所述文件的更新ACL的ACL记录;
在从所述目录级ACL中查找到了包含所述文件的更新ACL的第三ACL记录的情况之下,将所述文件当前对其他ACL记录的引用,替换为所述文件对所述第三ACL记录的引用;
在从所述目录级ACL中未查找到包含所述文件的更新ACL的任何ACL记录的情况之下,在所述目录级ACL中新建第四ACL记录,其中,所述第四ACL记录中包含有所述文件的更新ACL,将所述文件当前对其他ACL记录的引用,替换为所述文件对所述第四ACL记录的引用。
本申请实施例的第四方面提供一种通信系统,包括:通信连接的文件客户端和文件服务器,其中,所述文件服务器为本发明实施例提供的任意一种文件服务器。
此外,本申请实施例第五方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储了程序代码。所述程序代码包括用于执行第一方面或第二方面的方法的部分或全部步骤的指令。
附图说明
图1-A为本申请实施例举例的一种网络架构的示意图;
图1-B为本申请实施例举例的一种文件ACL的组织形式的示意图;
图1-C为本申请实施例举例的一种目录级ACL的组织形式的示意图;
图1-D为本申请实施例举例的另一种目录级ACL的组织形式的示意图;
图1-E为本申请实施例举例的一种文件引用所属父目录的目录级ACL之中ACL记录的形式的示意图;
图1-F为本申请实施例举例的另一种文件引用所属父目录的目录级ACL之中ACL记录的形式的示意图;
图2为本申请实施例提供的一种文件ACL管理方法的流程示意图;
图3为本申请实施例提供的一种文件访问方法的流程示意图;
图4为本申请实施例提供的一种文件ACL获取方法的流程示意图;
图5为本申请实施例提供的另一种文件ACL管理方法的流程示意图;
图6为本申请实施例提供的一种文件硬链接创建方法的流程示意图;
图7为本申请实施例提供的一种文件迁移管理方法的流程示意图;
图8为本申请实施例提供的另一种文件迁移管理方法的流程示意图;
图9为本申请实施例提供的另一种文件ACL管理方法的流程示意图;
图10为本申请实施例提供的一种文件服务器的示意图;
图11为本申请实施例提供的另一种文件服务器的示意图;
图12为本申请实施例提供的一种通信系统的示意图。
具体实施方式
本申请说明书、权利要求书和附图中出现的术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。此外,术语“第一”、“第二”和“第三”等是用于区别不同的对象,而并非用于描述特定的顺序。
下面首先提供一种网络架构,参见图1-A,图1-A为本申请实施例举例的一种网络架构的示意图,若干个文件客户端(如NAS Client)可通过网络与文件服务器(如NAS Server)连接。文件服务器可包括磁盘阵列等。文件服务器为客户端(如NAS Client)提供文件系统的数据访问服务。
可以理解的是,本申请的实施例的文件客户端的产品形态例如可以为平板电脑、笔记本电脑、移动互联网设备、掌上电脑、台式电脑、手机或者其他产品形态的文件客户端。
本申请各实施例的技术方案例如可基于图1-A所示网络架构或其变形架构来具体实施。
参见图1-B,图1-B举例示出了一种文件的ACL的组织形式,文件的ACL包括若干项ACE,其中,每项ACE可以包含控制类型(type)、权限(mask)和用户标识(user id)等内容。其中,控制类型包含允许(allowed)或拒绝(denied)等等。用户标识(user id)表示某一用户或某类用户。权限(mask)表示相应用户的访问权限,一般可采用掩码方式表示。
文件的元数据可包括文件的标准属性数据和扩展属性数据。文件的标准属性数据可描述文件大小和文件修改时间等标准属性,文件的扩展属性数据可包括文件的ACL等。
目录的元数据可包括目录的标准属性数据和扩展属性数据,目录的标准属性数据可描述目录大小和目录修改时间等标准属性,目录的扩展属性数据可包括目录的目录级ACL等。
下面再对目录级ACL的组织形式进行举例。
参见图1-C,图1-C本申请实施例举例示出的一种目录的目录级ACL的组织形式,目录级ACL可包括若干条ACL记录,其中,每条ACL记录包含ACL索引(Index)和文件ACL。具体的,每条ACL记录可包含用于记录ACL索引的字段(例如可称“索引字段”),还包含用于记录文件ACL的字段(例如可称“ACL_Xattr字段”)。可以理解,同一个目录级ACL中的不同ACL记录包含的ACL索引互不相同,因此,通过不同的ACL索引可以索引到不同的ACL记录。
参见图1-D,图1-D本申请实施例举例示出的另一种目录的目录级ACL的组织形式,目 录级ACL可包括若干条ACL记录,其中,每条ACL记录包含ACL索引(Index)、文件ACL和文件ACL的指纹。具体的,每条ACL记录包含用于记录ACL索引的字段(可称“索引字段”),还包含用于记录文件ACL的字段(可称“ACL_Xattr字段”),还包含用于记录文件ACL的指纹的字段(可称“指纹字段”)。
可以理解,父目录的目录级ACL中的ACL记录由于只允许被相应目录下的文件引用,因此,与之存在引用关系的文件的数量通常相对较少,因此目录粒度的ACL所包含的ACL记录,比传统的全局ACL所包含的ACL记录相对更少,因此遍历单个目录级ACL所需时间也会大大缩短,这就有利于极大提升业务处理效率和客户体验。
其中,所谓“ACL记录被文件引用”,表示ACL记录包含的ACL索引被写入文件的元数据中。当某个父目录的目录级ACL中的某条ACL记录包含的ACL索引,被写入到所述父目录下的至少1个文件的元数据中,那么就表示这条ACL记录被所述至少1个文件引用。当父目录的目录级ACL中的某条ACL记录包含的ACL索引,未被写入到所述父目录下的任意1个文件的元数据中,那就表示这条ACL记录未被所述父目录下的任意1个文件引用,以此类推。
下面通过相关流程来对本申请实施例的一些方案进行具体描述。
参见图2,图2为本申请实施例提供的一种文件ACL管理方法的流程示意图。其中,如图2举例所示,本申请实施例提供的一种文件ACL管理方法可包括:
201、例如当需要对文件设置ACL,文件客户端向文件服务器发送第一文件ACL设置请求。
所述第一文件ACL设置请求携带用户标识(user id)和文件标识。用户标识表示某一用户或某类用户。文件标识用于表示某一文件。所述文件第一文件ACL设置请求还携带所述文件标识所表示的文件的ACL等等。
202、所述文件服务器接收来自所述文件客户端的所述第一文件ACL设置请求。所述文件服务器从所述文件所属父目录的目录级ACL之中查找包含所述文件的ACL的ACL记录。
举例来说,在所述文件所属父目录的目录级ACL所包括的若干条ACL记录中,与所述文件的ACL匹配的ACL记录包含所述文件的ACL,与所述文件的ACL不匹配的ACL记录中不包含所述文件的ACL。
进一步的,在所述目录级ACL包括的ACL记录中还包含ACL指纹的情况下,那么,可先计算所述文件的ACL的指纹(FP,FingerPrint)。从所述文件所属父目录的目录级ACL之中查找包含所述文件的ACL的ACL记录可以包括:从所述目录级ACL之中查找包含有所述文件的ACL的指纹的ACL记录。其中,所述目录级ACL之中包含所述指纹的ACL记录中包含所述文件的ACL。而所述目录级ACL中不包含所述指纹的ACL记录中不包含所述文件的ACL。
ACL指纹的计算可以采用例如MD5算法/SHA1算法等等基于摘要的加密算法,这些加密算法可把数十KB大小的ACL映射为例如8字节或12字节的ACL指纹。实践发现,ACL指纹相对于ACL本身更小,指纹大小通常在十几个字节左右,而ACL本身则可达到数十KB,因此利用ACL指纹来搜索查找有利于降低比较开销。
203、在从所述目录级ACL中查找到了包含所述文件的ACL的第一ACL记录的情况之下,文件服务器建立所述文件对第一ACL记录的引用。所述文件服务器例如可通过将所述第一 ACL记录中包含的ACL索引写入所述文件的元数据中,来建立所述文件对第一ACL记录的引用。
204、在从所述目录级ACL之中未查找到包含所述文件的ACL的任何ACL记录的情况下,所述文件服务器在所述目录级ACL之中新建第二ACL记录。其中,所述第二ACL记录中包含ACL索引和所述文件的ACL。所述文件服务器建立所述文件对第二ACL记录的引用。所述文件服务器例如可通过将所述第二ACL记录中包含的ACL索引写入到所述文件的元数据中,来建立所述文件对第二ACL记录的引用。
205、文件服务器向所述文件客户端发送用于响应所述第一文件ACL设置请求的第一文件ACL设置响应。
相应的,所述文件客户端接收所述文件服务器发送的用于响应所述第一文件ACL设置请求的第一文件ACL设置响应。
可以理解,上述技术方案中,在接收到来自文件客户端的第一文件ACL设置请求之后,文件服务器从文件所属父目录的目录级ACL之中查找包含所述文件的ACL的ACL记录,在从所述目录级ACL中查找到了包含所述文件的ACL的第一ACL记录的情况之下,文件服务器将所述第一ACL记录中包含的ACL索引写入所述文件的元数据中,由于这种情况下不再新建相应的ACL记录,这样在一定程度上实现了单目录下的文件ACL去重,当同一目录下的不同文件的ACL相同时,可只在相应父目录的目录级ACL中保留一条相应ACL记录,这些ACL相同的不同文件可通过ACL索引来从目录级ACL中找到这条相应ACL记录,进而实现这些不同文件的相应ACL的引用。相比于传统的基于全局ACL的去重访问机制,由于目录级ACL包含的ACL记录的数量相对会少了很多,因此本申请实施例的这种基于目录级的文件ACL去重访问机制,有利于极大的提升文件ACL的去重/访问效率。
进一步的,在极端情况下,若同一父目录下每个文件的ACL都不相同(即无法进行文件ACL的去重),或者,若同一父目录下的绝大部分文件的ACL都不相同(即很难进行文件ACL的去重),这种情况下,文件的ACL都记录在父目录的ACL表中也可能造成父目录的目录级ACL较大。这种情况下可设置目录级ACL的最大ACL记录数阈值,当目录级ACL的ACL记录数量超过该阈值后,各个文件可设置独立的ACL,即可以不再按照上述举例的流程进行文件ACL去重。
此外,当某文件被删除时,这个文件的文件元数据也被删除,因此文件元数据中包含的ACL_Index也就被删除了,而这时候可以暂时不修改相应父目录的目录级ACL。而当父目录被删除时,也就意味着这个父目录所包含的所有文件和子目录也都被删除,因此这个父目录的目录级ACL表也就可被同时或稍后释放了。
参见图3,图3为本申请的一个实施例提供的一种文件访问方法的流程示意图。可以理解,图3所示的文件访问方法的相关步骤可在图2所示文件ACL管理方法的相关步骤之后执行。
其中,如图3举例所示,本申请的一个实施例提供的一种文件访问方法可包括:
301、当需要对文件进行访问时,文件客户端向文件服务器发送文件访问请求。
所述文件访问请求携带文件标识(这个文件标识所表示的文件为请求访问的文件)和用户标识。所述文件访问请求具体可为文件读请求、文件写请求或文件执行请求等。
302、文件服务器接收来自文件客户端的所述文件访问请求。所述文件服务器从所述文 件标识所表示的文件的元数据中读取ACL索引(ACL索引可用于索引ACL记录)。
303、所述文件服务器从所述目录级ACL中查找包含所述ACL索引的ACL记录。
304、在从所述目录级ACL中查找到了包含所述ACL索引的第一ACL记录的情况下,所述文件服务器利用所述第一ACL记录包含的所述文件的ACL对所述文件访问请求进行访问控制。
具体的,当所述文件的ACL指示所述用户标识所表示的用户无权访问所述文件(例如用户无权读所述文件、用户无权写所述文件和/或用户无权执行所述文件),所述文件服务器可拒绝执行文件访问请求。又例如,当所述文件的ACL指示所述用户标识所表示的用户有权访问所述文件(例如用户有权读所述文件、用户有权写所述文件和/或用户有权执行所述文件),所述文件服务器则可执行所述文件访问请求。
此外,在从所述目录级ACL中未查找到了包含所述ACL索引的任何ACL记录的情况下,所述文件服务器例如可按照默认方式执行或者拒绝执行所述文件访问请求。
305、所述文件服务器向所述文件客户端发送用于响应所述文件访问请求的文件访问响应。其中,所述文件访问响应可指示出所述文件访问请求的执行结果。
相应的,所述文件客户端接收所述文件服务器发送的用于响应所述文件访问请求的文件访问响应。
可以理解,上述技术方案中,在接收到了来自文件客户端的文件访问请求之后,文件服务器从文件标识所表示的文件的元数据中读取ACL索引,从目录级ACL中查找包含所述ACL索引的ACL记录,在从目录级ACL中查找到了包含ACL索引的第一ACL记录的情况下,文件服务器利用第一ACL记录包含的文件的ACL对文件访问请求进行访问控制。相比于传统的基于全局ACL来访问引用文件ACL的机制,由于目录级ACL包含的ACL记录的数量相对少很多,因此本申请实施例的这种基于目录级ACL来访问引用文件ACL的机制,有利于极大的提升文件ACL的引用访问效率。
参见图4,图4为本申请的一个实施例提供的一种文件ACL获取方法的流程示意图。可以理解,图4所示的文件ACL获取方法的相关步骤可在图2所示文件ACL管理方法的相关步骤之后执行。
其中,如图4举例所示,本申请的一个实施例提供的一种文件ACL获取方法可包括:
401、当需要获取文件的文件ACL时,文件客户端向文件服务器发送文件ACL获取请求。所述文件ACL获取请求例如可携带文件标识和用户标识等等参数。
402、所述文件服务器接收来自文件客户端的文件ACL获取请求。所述文件服务器从所述文件标识所表示的文件的元数据之中读取ACL索引(ACL索引可用于索引目录级ACL中的ACL记录)。
403、所述文件服务器从所述文件所属父目录的目录级ACL之中查找包含有所述ACL索引的ACL记录。
404、在从所述目录级ACL之中查找了到包含有所述ACL索引的第一ACL记录的情况之下,所述文件服务器向所述文件客户端发送用于响应所述文件ACL获取请求的文件ACL获取响应。
其中,所述文件ACL获取响应携带有所述第一ACL记录中包含的所述文件的ACL。
此外,在从所述目录级ACL中未查找到了包含所述ACL索引的任何ACL记录的情况下, 或者在从文件的元数据之中未读取ACL索引也未读取到ACL的情况下,所述文件服务器向所述文件客户端发送用于响应所述文件ACL获取请求的文件ACL获取响应,在此情况下,这个文件ACL获取响应可指示出文件ACL获取失败。
相应的,所述文件客户端接收所述文件服务器发送的用于响应文件ACL获取请求的文件ACL获取响应。
可以理解,上述技术方案中,接收到来自文件客户端的文件ACL获取请求之后,文件服务器从这个文件ACL获取请求携带的文件标识所表示的文件的元数据中读取ACL索引,从相应目录级ACL中查找包含所述ACL索引的ACL记录,在从这个目录级ACL中查找到了包含ACL索引的第一ACL记录的情况下,文件服务器向所述文件客户端发送携带有所述第一ACL记录中包含的文件ACL的文件ACL获取响应。相比于传统的基于全局ACL来获取文件ACL的机制,由于目录级ACL包含的ACL记录的数量相对很少,因此本申请实施例的这种基于目录级ACL来获取文件ACL的机制,有利于极大的提升文件ACL的获取效率。
参见图5,图5为本申请另一实施例提供的一种文件ACL管理方法的流程示意图。可以理解,图5所示的文件ACL管理方法的相关步骤可在图2所示文件ACL管理方法的相关步骤之后执行。
其中,如图5举例所示,本申请另一实施例提供的一种文件ACL管理方法可包括:
501、当需要更新文件的文件ACL时,文件客户端向文件服务器发送第二文件ACL设置请求。其中,所述第二文件ACL设置请求携带用户标识和文件标识。所述文件第二文件ACL设置请求还携带所述文件标识所表示的文件的更新ACL等等。
502、所述文件服务器接收来自所述文件客户端的所述第二文件ACL设置请求。所述文件服务器从所述文件所属父目录的目录级ACL之中查找包含所述文件的更新ACL的ACL记录。
503、在从所述目录级ACL中查找到了包含所述文件的更新ACL的第三ACL记录的情况之下,所述文件服务器利用所述第三ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
504、在从所述目录级ACL中未查找到包含所述文件的更新ACL的任何ACL记录的情况下,所述文件服务器在所述目录级ACL之中新建第四ACL记录。所述第四ACL记录中包含ACL索引和所述文件的更新ACL,所述文件服务器利用所述第四ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
505、文件服务器向所述文件客户端发送用于响应所述第二文件ACL设置请求的第二文件ACL设置响应。
相应的,所述文件客户端接收所述文件服务器发送的用于响应所述第二文件ACL设置请求的第二文件ACL设置响应。
可以理解,上述技术方案中,在接收到来自文件客户端的第二文件ACL设置请求之后,文件服务器从文件所属父目录的目录级ACL之中查找包含所述文件的更新ACL的ACL记录,在从所述目录级ACL中查找到了包含所述文件的更新ACL的第三ACL记录的情况之下,文件服务器将所述第三ACL记录中包含的ACL索引写入所述文件的元数据中,由于这种情况下不再新建相应的ACL记录,这样在一定程度上实现了单目录下的文件ACL去重,当同一目录下的不同文件的ACL相同时,可只在相应父目录的目录级ACL中保留一条相应ACL记 录,这些ACL相同的不同文件可通过ACL索引来从目录级ACL中找到这条相应ACL记录,进而可以实现这些不同文件的相应ACL的引用。相比于传统的基于全局ACL的去重访问机制,由于目录级ACL包含的ACL记录的数量相对会少了很多,因此本申请实施例的这种基于目录级的文件ACL去重机制,有利于极大的提升文件ACL的去重效率。
参见图6,图6为本申请一实施例提供的一种文件硬链接创建方法的流程示意图。可以理解,图6所示的文件硬链接创建方法的相关步骤可在图2所示文件ACL管理方法的相关步骤之后执行。
其中,如图6举例所示,本申请一实施例提供的一种文件硬链接创建方法可包括:
601、当需要为某文件创建硬链接时,文件客户端向文件服务器发送硬链接创建请求。所述硬链接创建请求携带用户标识和文件标识。所述文件标识所表示的文件为需要创建硬链接的文件。
602、文件服务器接收来自文件客户端的所述硬链接创建请求。所述文件服务器从所述文件标识所表示的文件的元数据中读取ACL索引(ACL索引可用于索引目录级ACL中的ACL记录)。
603、所述文件服务器从所述文件所属父目录的目录级ACL之中查找包含有读取到的所述ACL索引的ACL记录。
604、在从所述目录级ACL之中查找到了包含有读取到的所述ACL索引的第一ACL记录的情况下,所述文件服务器将所述第一ACL记录中包含的所述文件的ACL写入所述文件的元数据中,删除所述文件的元数据中已有的ACL索引。
605、所述文件服务器创建所述文件的硬链接。
606、所述文件服务器向文件客户端发送用于响应所述硬链接创建请求的硬链接创建响应。
相应的,所述文件客户端接收所述文件服务器发送的用于响应所述硬链接创建请求的硬链接创建响应。
可以理解,上述技术方案中,接收到了来自文件客户端的硬链接创建请求之后,文件服务器从这个硬链接创建请求携带的文件标识所表示的文件的元数据中读取ACL索引,从相应的目录级ACL中查找包含所述ACL索引的ACL记录,在从这个目录级ACL中查找到了包含ACL索引的第一ACL记录的情况下,文件服务器将所述第一ACL记录中包含的所述文件的ACL写入所述文件的元数据中,删除所述文件的元数据中已有的ACL索引。相比于传统的基于全局ACL来获取文件ACL的机制,由于目录级ACL包含的ACL记录的数量相对很少,因此,本申请实施例的这种基于目录级ACL来获取文件ACL的机制,有利于极大的提升文件ACL的获取效率,进而极大的提升硬链接创建的效率。
参见图7,图7为本申请一实施例提供的一种文件迁移管理方法的流程示意图。可以理解,图7所示的文件迁移管理方法的相关步骤可在图2所示文件ACL管理方法的相关步骤之后执行。
其中,如图7举例所示,本申请一实施例提供的一种文件迁移管理方法可包括:
701、当需要对文件的进行目录迁移时,文件客户端向文件服务器发送文件迁移请求,其中,所述文件迁移请求携带有目标父目录的目录标识和所述文件标识。
其中,目标父目录为所述文件将要迁往的父目录。而所述文件当前所属的父目录可称 源父目录。
702、所述文件服务器接收来自文件客户端的携带有目标父目录的目录标识和所述文件标识的文件迁移请求,将所述文件标识所表示的文件从其当前所属父目录迁移到目标父目录。
703、在将所述文件从其当前所属父目录迁移到目标父目录之后,所述文件服务器从所述文件的元数据中读取ACL索引。所述文件服务器从源父目录的目录级ACL之中查找包含所述ACL索引的ACL记录。
704、在从所述目录级ACL之中查找到包含所述ACL索引的所述第一ACL记录的情况下,所述文件服务器从查找到的所述第一ACL记录中读取ACL指纹。
705、所述文件服务器从所述目标父目录的目录级ACL中查找包含读取到的所述ACL指纹的ACL记录。
706、在从所述目标父目录的目录级ACL中查找到了包含读取到的所述ACL指纹的第五ACL记录的情况下,所述文件服务器利用所述第五ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
707、在从所述目标父目录的目录级ACL之中未查找到包含有读取到的所述ACL指纹的任何ACL记录的情况之下,所述文件服务器在所述目标父目录的目录级ACL中新建第六ACL记录。其中,所述第六ACL记录中包含有所述第一ACL记录中包含的所述文件的ACL,所述第六ACL记录中还包含有ACL索引。
708、所述文件服务器利用所述第六ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
709、文件服务器向文件客户端发送用于相应所述文件迁移请求的所述文件响应。相应的,文件客户端可接收文件服务器发送的用于相应所述文件迁移请求的所述文件响应。
参加图1-E,图1-E为本申请实施例举例的一种文件引用所属父目录的目录级ACL中ACL记录的形式的示意图。图1-E举例所示,文件f1、f2和f3归属于相同父目录Dir1,文件f4、f5、f6和f7归属于相同父目录Dir2,父目录Dir1和父目录Dir1归属于父目录Dir3。其中,文件f1和f2引用父目录Dir1的目录级ACL中的相同ACL记录(ACL索引为1001),例如文件f1和f2的元数据中都被写入了ACL索引1001。文件f3引用父目录Dir1的目录级ACL中的ACL记录1003,例如文件f3的元数据中被写入了ACL索引1003。文件f4和f5引用父目录Dir2的目录级ACL中的相同ACL记录,例如文件f4和f5的元数据中都被写入了ACL索引1001。其中,文件f6引用父目录Dir2的目录级ACL中的ACL记录1002,例如文件f6的元数据中被写入了ACL索引1002。文件f7引用父目录Dir2的目录级ACL中的ACL记录1003,例如文件f7的元数据中都包含ACL索引1003。
假设图1-E举例示出的是图1-E迁移前的情况,假设之后,文件f6从父目录Dir2迁移到了父目录Dir1,那么相关文件对ACL记录的引用关系可能从图1-E举例情况变化为如图1-F所示。具体的,由此前的文件f6引用目录Dir2的目录级ACL中的ACL记录1002,变化为文件f6引用目录Dir1的目录级ACL中的ACL记录1004。其他文件迁移场景可以以此类推。
可以理解,上述技术方案中,在接收到了来自文件客户端的文件迁移请求之后,文件服务器将文件从其当前所属父目录迁移到目标父目录,在从源目录的目录级ACL中读取到 相应ACL指纹后,从目标父目录的目录级ACL中查找包含读取到的ACL指纹的ACL记录,在从所述目标父目录的目录级ACL中查找到了包含读取到的所述ACL指纹的第五ACL记录的情况下,所述文件服务器利用所述第五ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引,由于这种情况下不再在目标父目录的目录级ACL新建相应ACL记录,这样在一定程度上实现了单目录下的文件ACL去重,当同一目录下的不同文件的ACL相同时,可只在相应父目录的目录级ACL中保留一条相应ACL记录,这些ACL相同的不同文件可通过ACL索引来从目录级ACL中找到这条相应ACL记录,进而可实现这些不同文件的相应ACL的引用。相比于传统的基于全局ACL的去重访问机制,由于目录级ACL包含的ACL记录的数量相对会少了很多,因此本申请实施例的这种基于目录级的文件ACL去重机制,有利于极大的提升文件ACL的去重效率。
参见图8,图8为本申请另一实施例提供的一种文件迁移管理方法的流程示意图。可以理解,图8所示的文件迁移管理方法的相关步骤可在图2所示文件ACL管理方法的相关步骤之后执行。
其中,如图8举例所示,本申请另一实施例提供的一种文件迁移管理方法可包括:
801、当需要对文件的进行目录迁移时,文件客户端向文件服务器发送文件迁移请求,其中,所述文件迁移请求携带有目标父目录的目录标识和所述文件标识。
802、所述文件服务器接收来自文件客户端的携带有目标父目录的目录标识和所述文件标识的文件迁移请求,将所述文件标识所表示的文件从其当前所属父目录迁移到目标父目录。
803、在将所述文件从其当前所属父目录迁移到目标父目录之后,所述文件服务器从所述文件的元数据中读取ACL索引。所述文件服务器从源父目录的目录级ACL之中查找包含所述ACL索引的ACL记录。
804、在从所述目录级ACL之中查找到包含所述ACL索引的所述第一ACL记录的情况下,所述文件服务器从查找到的所述第一ACL记录中读取文件的ACL。
805、所述文件服务器从所述目标父目录的目录级ACL中查找包含所述文件的ACL的ACL记录。
806、在从所述目标父目录的目录级ACL中查找到了包含所述文件的ACL的第五ACL记录的情况下,所述文件服务器利用所述第五ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
807、在从所述目标父目录的目录级ACL之中未查找到包含所述文件的ACL的任何ACL记录的情况之下,所述文件服务器在所述目标父目录的目录级ACL中新建第六ACL记录。其中,所述第六ACL记录中包含有所述第一ACL记录中包含的所述文件的文件ACL,所述第六ACL记录中还包含有ACL索引。
808、所述文件服务器利用所述第六ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
809、文件服务器向文件客户端发送用于相应所述文件迁移请求的所述文件响应。相应的,文件客户端可接收文件服务器发送的用于相应所述文件迁移请求的所述文件响应。
此外,如果被移动的对象是目录,仍按照传统流程进行目录移动,被移动目录的目录级ACL可不作改变。
可以理解,上述技术方案中,在接收到了来自文件客户端的文件迁移请求之后,文件服务器将文件从其当前所属父目录迁移到目标父目录,在从源目录的目录级ACL中读取到相应文件ACL后,从目标父目录的目录级ACL中查找包含读取到的文件ACL的ACL记录,在从目标父目录的目录级ACL中查找到了包含读取到的所述ACL指纹的第五ACL记录的情况下,所述文件服务器利用所述第五ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引,由于这种情况下不再在目标父目录的目录级ACL新建相应ACL记录,这样在一定程度上实现了单目录下的文件ACL去重,当同一目录下的不同文件的ACL相同时,可只在相应父目录的目录级ACL中保留一条相应ACL记录,这些ACL相同的不同文件可通过ACL索引来从目录级ACL中找到这条相应ACL记录,进而可实现这些不同文件的相应ACL的引用。相比于传统的基于全局ACL的去重访问机制,由于目录级ACL包含的ACL记录的数量相对会少了很多,因此本申请实施例的这种基于目录级的文件ACL去重机制,有利于极大的提升文件ACL的去重效率。
参见图9,图9为本申请一实施例提供的一种文件ACL管理方法的流程示意图。可以理解,图9所示的文件迁移管理方法的相关步骤可在图2所示文件ACL管理方法的相关步骤之前或之后执行。
其中,如图9举例所示,本申请一实施例提供的一种文件ACL管理方法可包括:
901、例如在某个文件的父目录的目录级ACL的清理触发条件满足的情况之下,文件服务器从所述目录级ACL中查找未被所述父目录下的任意文件引用的ACL记录。
所述清理触发条件例如可包括如下条件中的至少1个:目录级ACL的ACL记录的数量达到数量阈值(数量阈值例如可为100、121、150、80、200或其他值)、接收到了目录级ACL清理指令(例如接收到了来自客户端的目录级ACL清理指令)、目录级ACL的清理定时器(清理定时器的定时时长例如可为1分钟、100分钟、200分钟或其他时长)到达。当然清理触发条件并不限于上述举例。
902、所述文件服务器将被所述父目录下的文件引用的ACL记录进行有效标记。具体可以是,在所述目录级ACL中添加有效标记或将有效ACL记录的ACL索引写入到一个链表中。可以理解,通过遍历,未被所述父目录下的任何文件引用的ACL记录可被发现。
903、在从所述目录级ACL中查找到了未被所述父目录下的任意文件引用的X条ACL记录的情况下,所述文件服务器将所述X条ACL记录从所述目录级ACL中释放。
在具体实现中,例如文件系统可提供用户态工具,所述用户态工具可指定目录、指定子树等,表示要清理相应目录的目录级ACL。用户可周期性的或主动运行所述用户态工具对指定目录或子树进行无效ACL记录清理。或者作为一种替代方案,可在文件系统中创建无效ACL后台清理线程。当目录的目录级ACL中ACL记录的数量超过已设置阈值时,可把所述目录提交给ACL后台清理线程,并触发无效ACL后台清理线程运行。无效ACL后台清理线程对所述目录所包含的文件进行遍历,清理不再被文件引用的ACL记录。
可以理解,上述技术方案中,在某个文件的父目录的目录级ACL的清理触发条件满足的情况之下,文件服务器从所述目录级ACL中查找未被所述父目录下的任意文件引用的ACL记录,在从所述目录级ACL中查找到了未被所述父目录下的任意文件引用的X条ACL记录的情况下,文件服务器将所述X条ACL记录从所述目录级ACL中释放。由于引入了目录级ACL中的无效ACL记录的释放机制,这样有利于提升目录级ACL中有效ACL记录的占比, 进而有利于提升目录级ACL中的文件ACL的访问效率。
下面还提供用于实施上述方案的相关装置。
参见图10,本申请实施例还提供一种文件服务器1000,可包括:通信单元1010、查找单元1020和处理单元1030。
通信单元1010,用于接收来自文件客户端的第一文件ACL设置请求,所述第一文件ACL设置请求携带有文件标识,所述第一文件ACL设置请求还携带有所述文件标识所表示的文件的ACL。
查找单元1020,用于从所述文件所属父目录的目录级ACL之中查找包含有所述文件的ACL的ACL记录。
处理单元1030,用于在所述查找单元从所述目录级ACL之中查找到了包含有所述文件的ACL的第一ACL记录的情况之下,建立所述文件对所述第一ACL记录的引用;在所述查找单元从所述目录级ACL之中未查找到包含有所述文件的ACL的任何ACL记录的情况之下,在所述目录级ACL之中新建第二ACL记录。其中,所述第二ACL记录中包含所述文件的ACL,建立所述文件对所述第二ACL记录的引用。
在一些可能实施方式中,所述第一ACL记录中包含ACL索引,所述处理单元建立所述文件对所述第一ACL记录的引用可包括:将所述第一ACL记录中包含的ACL索引写入所述文件的元数据中。
在一些可能实施方式中,所述第二ACL记录中包含ACL索引,所述处理单元建立所述文件对所述第二ACL记录的引用包括:将所述第二ACL记录中包含的ACL索引写入所述文件的元数据中。其中,所述第一ACL记录中包含的ACL索引不同于所述第二ACL记录中包含的ACL索引。
在一些可能的实施方式之中,所述文件服务器1000还可以包括:计算单元1040,用于计算所述文件的ACL的指纹。
所述查找单元1020具体用于,还可用于从所述目录级ACL中查找所述文件引用的ACL记录。
在一些可能的实施方式之中,所述通信单元1010还可用于,接收来自文件客户端的携带有所述文件标识的文件访问请求。
所述查找单元1020还可用于从所述目录级ACL中查找所述文件引用的ACL记录。
所述处理单元1030还用于,在所述查找单元从所述目录级ACL中查找到了所述文件引用的第一ACL记录的情况之下,利用所述第一ACL记录包含的所述文件的ACL对所述访问请求进行访问控制。
在一些可能的实施方式之中,所述通信单元1010还可用于接收来自文件客户端的携带所述文件标识的文件ACL获取请求。
查找单元1020还用于还可用于从所述目录级ACL中查找所述文件引用的ACL记录。
所述通信单元1010还用于,在所述查找单元从所述目录级ACL中查找到了所述文件引用的第一ACL记录的情况之下,向所述文件客户端发送用于响应所述文件ACL获取请求的文件ACL获取响应,其中,所述文件ACL获取响应携带有所述第一ACL记录中包含的所述文件的ACL。
在一些可能实施方式中,所述查找单元从所述目录级ACL中查找所述文件引用的ACL 记录例如可包括:从所述文件的元数据中读取ACL索引,从所述目录级ACL中查找包含所述ACL索引的ACL记录。其中,所述目录级ACL中包含所述ACL索引的ACL记录为所述文件引用的ACL记录。
在一些可能的实施方式之中,所述通信单元1010还可用于,接收来自文件客户端的第二文件ACL设置请求,其中,所述第二文件ACL设置请求携带有所述文件标识,所述第二ACL设置请求还携带有所述文件的更新ACL。
所述查找单元1020还用于,从所述目录级ACL之中查找包含所述文件的更新ACL的ACL记录;
所述处理单元还用于,在所述查找单元从所述目录级ACL中查找到了包含所述文件的更新ACL的第三ACL记录的情况之下,利用所述第三ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引;
在所述查找单元从所述目录级ACL中未查找到包含所述文件的更新ACL的任何ACL记录的情况下,在所述目录级ACL中新建第四ACL记录,所述第四ACL记录中包含ACL索引和所述文件的更新ACL,利用所述第四ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
在一些可能的实施方式之中,所述通信单元1010还可用于接收来自文件客户端的携带所述文件标识的硬链接创建请求。
所述查找单元1020还用于从所述目录级ACL中查找所述文件引用的ACL记录。
所述处理单元1030还用于,在所述查找单元从所述目录级ACL中查找到了所述文件引用的第一ACL记录的情况之下,将所述第一ACL记录中包含的所述文件的ACL写入所述文件的元数据中,删除所述文件的元数据中已有的ACL索引;创建所述文件的硬链接。
在一些可能的实施方式之中,所述通信单元1010还可用于接收来自文件客户端的携带有目标父目录的目录标识和所述文件标识的文件迁移请求。
其中,所述处理单元1030还用于将所述文件从所述父目录迁移到所述目标父目录。
所述查找单元1020还用于,从所述文件的元数据中读取ACL索引;从所述目录级ACL之中查找包含所述ACL索引的ACL记录;从所述目录级ACL之中查找到包含所述ACL索引的所述第一ACL记录的情况下,从查找到的所述第一ACL记录中读取ACL指纹;从所述目标父目录的目录级ACL中查找包含读取到的所述ACL指纹的ACL记录;
其中,所述处理单元1030还用于,在所述查找单元1020从所述目标父目录的目录级ACL中查找到了包含读取到的所述ACL指纹的第五ACL记录的情况之下,利用所述第五ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引;在查找单元1020从所述目标父目录的目录级ACL之中未查找到包含有读取到的所述ACL指纹的任何ACL记录的情况之下,在所述目标父目录的目录级ACL中新建第六ACL记录,其中,所述第六ACL记录中包含有所述第一ACL记录中包含的所述文件的ACL,所述第六ACL记录中还包含有ACL索引,利用所述第六ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
在一些可能的实施方式之中,所述通信单元1010还可用于,接收来自文件客户端的携带有目标父目录的目录标识和所述文件标识的文件迁移请求。
其中,所述处理单元1030还用于将所述文件从所述父目录迁移到所述目标父目录;
所述查找单元1020还用于,从所述文件的元数据中读取ACL索引;从所述目录级ACL之中查找包含所述ACL索引的ACL记录;在从所述目录级ACL中查找到的包含所述ACL索引的所述第一ACL记录的情况下,从查找到的所述第一ACL记录中读取所述文件的ACL;从所述目标父目录的目录级ACL中查找包含所述文件的ACL的ACL记录。
所述处理单元1030还用于,在所述查找单元1020从所述目标父目录的目录级ACL中查找到了包含所述文件的ACL的第五ACL记录的情况下,利用所述第五ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引;
其中,所述处理单元1030还用于,在所述查找单元1020从所述目标父目录的目录级ACL之中未查找到包含所述文件的ACL的任何ACL记录的情况之下,在所述目标父目录的目录级ACL中新建第六ACL记录,所述第六ACL记录中包含有所述第一ACL记录中包含的所述文件的ACL,所述第六ACL记录中还包含有ACL索引,利用所述第六ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
在一些可能的实施方式之中,
所述文件服务器还包括:清理单元1050,用于在所述目录级ACL的清理触发条件满足的情况下,从所述目录级ACL中查找未被所述父目录下的任意文件引用的ACL记录,在从所述目录级ACL中查找了未被所述父目录下的任意文件引用的X条ACL记录的情况下,将所述X条ACL记录从所述目录级ACL中释放。
在一些可能的实施方式之中,所述清理触发条件例如可包括如下条件中的至少1个:目录级ACL的ACL记录的数量达到数量阈值、接收到了目录级ACL清理指令、目录级ACL的清理定时器到达。
参见图11,本本申请实施例还提供一种文件服务器1100,可包括:存储部件1110、通信接口1120及与所述存储部件1110和通信接口1120耦合的处理器1130。所述存储部件1110用于存储指令,所述处理器1120用于执行所述指令,其中,所述通信接口1120用于在所述处理器1130的控制下与其他设备进行通信。当所述处理器1130在执行所述指令时可根据所述指令执行本申请上述实施例中的任意一种方法中由文件服务器执行的步骤。
处理器1130还可称中央处理单元(CPU,Central Processing Unit)。存储部件1111可以包括只读存储器和随机存取存储器,并向处理器1130提供指令和数据等。存储部件1111的一部分还可包括非易失性随机存取存储器。具体的应用中文件服务器1100的各组件例如通过总线系统耦合在一起。总线系统除了可包括数据总线之外,还可包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都标为总线系统1140。上述本发明实施例揭示的方法可应用于处理器1130中,或由处理器1130实现。处理器1130可能是一种集成电路芯片,具有信号的处理能力。
在实现过程中,上述方法的各步骤可通过处理器1130中的硬件的集成逻辑电路或者软件形式的指令完成。上述处理器1130可以是通用处理器、数字信号处理器、专用集成电路、现成可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。处理器1130可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读 存储器或者电可擦写可编程存储器、寄存器等等本领域成熟的存储介质之中。该存储介质位于存储部件1110,例如处理器1130可读取存储部件1110中的信息,结合其硬件完成上述方法的步骤。
举例来说,文件服务器1100可执行上述图2-图9所示实施例中文件服务器对应的方法步骤。
举例来说,所述处理器1130可用于:
通过通信接口1120接收来自文件客户端的第一文件ACL设置请求,所述第一文件ACL设置请求携带有文件标识,所述第一文件ACL设置请求还携带有所述文件标识所表示的文件的ACL;
从所述文件所属父目录的目录级ACL之中查找包含有所述文件的ACL的ACL记录;
在从所述目录级ACL中查找到了包含有所述文件的ACL的第一ACL记录的情况之下,建立所述文件对所述第一ACL记录的引用;在从所述目录级ACL中未查找到包含有所述文件的ACL的任何ACL记录的情况下,在所述目录级ACL中新建第二ACL记录,其中,所述第二ACL记录中包含所述文件的ACL,建立所述文件对所述第二ACL记录的引用。
在一些可能实施方式中,所述第一ACL记录中包含ACL索引,所述处理器1130建立所述文件对所述第一ACL记录的引用包括:将所述第一ACL记录中包含的ACL索引写入所述文件的元数据中。
其中,所述第二ACL记录中包含ACL索引,所述处理器1130建立所述文件对所述第二ACL记录的引用包括:将所述第二ACL记录中包含的ACL索引写入所述文件的元数据中,其中,所述第一ACL记录中包含的ACL索引不同于所述第二ACL记录中包含的ACL索引。
在一些可能实施方式中,所述处理器1130还可用于:
通过通信接口1120接收来自文件客户端的携带有所述文件标识的文件访问请求;从所述文件的元数据中读取ACL索引;从所述目录级ACL中查找包含所述ACL索引的ACL记录;在从所述目录级ACL中查找到了包含所述ACL索引的第一ACL记录的情况下,利用所述第一ACL记录包含的所述文件的ACL对所述访问请求进行访问控制。
在一些可能实施方式中,所述处理器1130还可用于:
通过通信接口1120接收来自文件客户端的第二文件ACL设置请求,所述第二文件ACL设置请求携带有所述文件标识,所述第二ACL设置请求还携带有所述文件的更新ACL;从所述目录级ACL之中查找包含所述文件的更新ACL的ACL记录;
在从所述目录级ACL中查找到了包含所述文件的更新ACL的第三ACL记录的情况之下,将所述文件当前对其他ACL记录的引用,替换为所述文件对所述第三ACL记录的引用;
在从所述目录级ACL中未查找到包含所述文件的更新ACL的任何ACL记录的情况之下,在所述目录级ACL中新建第四ACL记录,其中,所述第四ACL记录中包含有所述文件的更新ACL,将所述文件当前对其他ACL记录的引用,替换为所述文件对所述第四ACL记录的引用。
在一些可能实施方式中,所述处理器1130还可用于:
通过通信接口1120接收来自文件客户端的携带有目标父目录的目录标识和所述文件标识的文件迁移请求,在将所述文件从所述父目录迁移到目标父目录之后,从所述文件的元数据中读取ACL索引;从所述目录级ACL之中查找包含所述ACL索引的ACL记录;
在从所述目录级ACL之中查找到包含所述ACL索引的所述第一ACL记录的情况下,从查找到的所述第一ACL记录中读取ACL指纹;从所述目标父目录的目录级ACL中查找包含读取到的所述ACL指纹的ACL记录;
在从所述目标父目录的目录级ACL中查找到了包含读取到的所述ACL指纹的第五ACL记录的情况下,利用所述第五ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引;
在从所述目标父目录的目录级ACL之中未查找到包含有读取到的所述ACL指纹的任何ACL记录的情况之下,在所述目标父目录的目录级ACL中新建第六ACL记录,其中,所述第六ACL记录中包含有所述第一ACL记录中包含的所述文件的ACL,所述第六ACL记录中还包含有ACL索引,利用所述第六ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
参见图12,本发明实施例提供一种通信系统,包括:通信连接的文件客户端1210和文件服务器1220,其中,所述文件服务器1220可为本申请上述实施例提供的任意一种文件服务器。文件客户端1210可为本申请上述实施例提供的任意一种文件服务器。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
此外,本申请实施例还一种计算机可读存储介质,所述计算机可读存储介质存储了用于会话消息处理的程序代码。所述程序代码包括用于执行本申请任意一种方法的部分或全部步骤的指令。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可结合或者可以集成到另一个系统,或一些特征可以忽略或不执行。另一点,所显示或讨论的相互之间的间接耦合或者直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例的方案的目的。
另外,在本申请各实施例中的各功能单元可集成在一个处理单元中,也可以是各单元单独物理存在,也可两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,或者也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。

Claims (16)

  1. 一种文件访问控制列表ACL管理方法,其特征在于,包括:
    接收来自文件客户端的第一文件ACL设置请求,其中,所述第一文件ACL设置请求携带有文件标识,所述第一文件ACL设置请求还携带有所述文件标识所表示的文件的ACL;
    从所述文件所属父目录的目录级ACL之中查找包含有所述文件的ACL的ACL记录;
    在从所述目录级ACL中查找到了包含有所述文件的ACL的第一ACL记录的情况之下,建立所述文件对所述第一ACL记录的引用;在从所述目录级ACL中未查找到包含有所述文件的ACL的任何ACL记录的情况下,在所述目录级ACL中新建第二ACL记录,其中,所述第二ACL记录中包含所述文件的ACL,建立所述文件对所述第二ACL记录的引用。
  2. 根据权利要求1所述方法,其特征在于,所述第一ACL记录中包含ACL索引,所述建立所述文件对所述第一ACL记录的引用包括:将所述第一ACL记录中包含的ACL索引写入所述文件的元数据中;
    其中,所述第二ACL记录中包含ACL索引,所述建立所述文件对所述第二ACL记录的引用包括:将所述第二ACL记录中包含的ACL索引写入所述文件的元数据中,其中,所述第一ACL记录中包含的ACL索引不同于所述第二ACL记录中包含的ACL索引。
  3. 根据权利要求2所述的方法,其特征在于,
    所述方法还包括:接收来自文件客户端的携带有所述文件标识的文件访问请求;从所述文件的元数据中读取ACL索引;从所述目录级ACL中查找包含所述ACL索引的ACL记录;在从所述目录级ACL中查找到了包含所述ACL索引的第一ACL记录的情况下,利用所述第一ACL记录包含的所述文件的ACL对所述访问请求进行访问控制。
  4. 根据权利要求1或2所述方法,其特征在于,
    所述方法还包括:接收来自文件客户端的第二文件ACL设置请求,所述第二文件ACL设置请求携带有所述文件标识,所述第二ACL设置请求还携带有所述文件的更新ACL;从所述目录级ACL之中查找包含所述文件的更新ACL的ACL记录;
    在从所述目录级ACL中查找到了包含所述文件的更新ACL的第三ACL记录的情况之下,将所述文件当前对其他ACL记录的引用,替换为所述文件对所述第三ACL记录的引用;
    在从所述目录级ACL中未查找到包含所述文件的更新ACL的任何ACL记录的情况之下,在所述目录级ACL中新建第四ACL记录,其中,所述第四ACL记录中包含有所述文件的更新ACL,将所述文件当前对其他ACL记录的引用,替换为所述文件对所述第四ACL记录的引用。
  5. 根据权利要求2所述方法,其特征在于,
    所述方法还包括:接收来自文件客户端的携带有目标父目录的目录标识和所述文件标识的文件迁移请求,在将所述文件从所述父目录迁移到目标父目录之后,从所述文件的元数据中读取ACL索引;从所述目录级ACL之中查找包含所述ACL索引的ACL记 录;
    在从所述目录级ACL之中查找到包含所述ACL索引的所述第一ACL记录的情况下,从查找到的所述第一ACL记录中读取ACL指纹;从所述目标父目录的目录级ACL中查找包含读取到的所述ACL指纹的ACL记录;
    在从所述目标父目录的目录级ACL中查找到了包含读取到的所述ACL指纹的第五ACL记录的情况下,利用所述第五ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引;
    在从所述目标父目录的目录级ACL之中未查找到包含有读取到的所述ACL指纹的任何ACL记录的情况之下,在所述目标父目录的目录级ACL中新建第六ACL记录,其中,所述第六ACL记录中包含有所述第一ACL记录中包含的所述文件的ACL,所述第六ACL记录中还包含有ACL索引,利用所述第六ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
  6. 根据权利要求2所述方法,其特征在于,
    所述方法还包括:接收来自文件客户端的携带有目标父目录的目录标识和所述文件标识的文件迁移请求,在将所述文件从所述父目录迁移到目标父目录之后,从所述文件的元数据中读取ACL索引;从所述目录级ACL之中查找包含所述ACL索引的ACL记录;
    在从所述目录级ACL中查找到的包含所述ACL索引的所述第一ACL记录的情况下,从查找到的所述第一ACL记录中读取所述文件的ACL;从所述目标父目录的目录级ACL中查找包含所述文件的ACL的ACL记录;
    在从所述目标父目录的目录级ACL中查找到了包含所述文件的ACL的第五ACL记录的情况下,利用所述第五ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引;
    在从所述目标父目录的目录级ACL之中未查找到包含所述文件的ACL的任何ACL记录的情况之下,在所述目标父目录的目录级ACL中新建第六ACL记录,其中,所述第六ACL记录中包含有所述第一ACL记录中包含的所述文件的ACL,所述第六ACL记录中还包含有ACL索引,利用所述第六ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
  7. 根据权利要求1至6任一项所述的方法,其特征在于,
    所述方法还包括:计算所述文件的ACL的指纹;
    其中,从所述文件所属父目录的目录级ACL之中查找包含有所述文件的ACL的ACL记录包括:从所述目录级ACL之中查找包含有所述文件的ACL的指纹的ACL记录,其中,所述目录级ACL中包含所述指纹的ACL记录中包含所述文件的ACL。
  8. 一种文件服务器,其特征在于,包括:
    通信单元,用于接收来自文件客户端的第一文件ACL设置请求,所述第一文件ACL设置请求携带有文件标识,所述第一文件ACL设置请求还携带有所述文件标识所表示的文件的ACL;
    查找单元,用于从所述文件所属父目录的目录级ACL之中查找包含有所述文件的ACL的ACL记录;
    处理单元,用于在所述查找单元从所述目录级ACL之中查找到了包含有所述文件的ACL的第一ACL记录的情况之下,建立所述文件对所述第一ACL记录的引用;在所述查找单元从所述目录级ACL之中未查找到包含有所述文件的ACL的任何ACL记录的情况之下,在所述目录级ACL之中新建第二ACL记录,其中,所述第二ACL记录中包含所述文件的ACL,建立所述文件对所述第二ACL记录的引用。
  9. 根据权利要求8所述文件服务器,其特征在于,
    所述第一ACL记录中包含ACL索引,所述处理单元建立所述文件对所述第一ACL记录的引用包括:将所述第一ACL记录中包含的ACL索引写入所述文件的元数据中;
    其中,所述第二ACL记录中包含ACL索引,所述处理单元建立所述文件对所述第二ACL记录的引用包括:将所述第二ACL记录中包含的ACL索引写入所述文件的元数据中,其中,所述第一ACL记录中包含的ACL索引不同于所述第二ACL记录中包含的ACL索引。
  10. 根据权利要求9所述文件服务器,其特征在于,
    所述通信单元还用于,接收来自文件客户端的携带有所述文件标识的文件访问请求;
    所述查找单元还用于从所述文件的元数据中读取ACL索引;从所述目录级ACL中查找包含所述ACL索引的ACL记录;
    所述处理单元还用于,在所述查找单元从所述目录级ACL中查找到了包含所述ACL索引的第一ACL记录的情况下,利用所述第一ACL记录包含的所述文件的ACL对所述访问请求进行访问控制。
  11. 根据权利要求8或9所述文件服务器,其特征在于,所述通信单元还用于,接收来自文件客户端的第二文件ACL设置请求,其中,所述第二文件ACL设置请求携带有所述文件标识,所述第二ACL设置请求还携带有所述文件的更新ACL;
    所述查找单元还用于,从所述目录级ACL之中查找包含所述文件的更新ACL的ACL记录;
    所述处理单元还用于,在所述查找单元从所述目录级ACL中查找到了包含所述文件的更新ACL的第三ACL记录的情况之下,将所述文件当前对其他ACL记录的引用,替换为所述文件对所述第三ACL记录的引用;在所述查找单元从所述目录级ACL中未查找到包含所述文件的更新ACL的任何ACL记录的情况之下,在所述目录级ACL中新建第四ACL记录,其中,所述第四ACL记录中包含有所述文件的更新ACL,将所述文件当前对其他ACL记录的引用,替换为所述文件对所述第四ACL记录的引用。
  12. 根据权利要求9所述文件服务器,其特征在于,
    所述通信单元还用于,接收来自文件客户端的携带有目标父目录的目录标识和所述文件标识的文件迁移请求;
    所述处理单元还用于将所述文件从所述父目录迁移到所述目标父目录;
    所述查找单元还用于,从所述文件的元数据中读取ACL索引;从所述目录级ACL之中查找包含所述ACL索引的ACL记录;从所述目录级ACL之中查找到包含所述ACL索引的所述第一ACL记录的情况下,从查找到的所述第一ACL记录中读取ACL指纹;从所述目标父目录的目录级ACL中查找包含读取到的所述ACL指纹的ACL记录;
    所述处理单元还用于,在所述查找单元从所述目标父目录的目录级ACL中查找到了包含读取到的所述ACL指纹的第五ACL记录的情况之下,利用所述第五ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引;在所述查找单元从所述目标父目录的目录级ACL之中未查找到包含有读取到的所述ACL指纹的任何ACL记录的情况之下,在所述目标父目录的目录级ACL中新建第六ACL记录,其中,所述第六ACL记录中包含有所述第一ACL记录中包含的所述文件的ACL,所述第六ACL记录中还包含有ACL索引,利用所述第六ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
  13. 根据权利要求9所述文件服务器,其特征在于,
    所述通信单元还用于,接收来自文件客户端的携带有目标父目录的目录标识和所述文件标识的文件迁移请求,
    所述处理单元还用于将所述文件从所述父目录迁移到所述目标父目录;
    所述查找单元还用于,从所述文件的元数据中读取ACL索引;从所述目录级ACL之中查找包含所述ACL索引的ACL记录;在从所述目录级ACL中查找到的包含所述ACL索引的所述第一ACL记录的情况下,从查找到的所述第一ACL记录中读取所述文件的ACL;从所述目标父目录的目录级ACL中查找包含所述文件的ACL的ACL记录;
    所述处理单元还用于,在所述查找单元从所述目标父目录的目录级ACL中查找到了包含所述文件的ACL的第五ACL记录的情况下,利用所述第五ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引;
    所述处理单元还用于,在所述查找单元从所述目标父目录的目录级ACL之中未查找到包含所述文件的ACL的任何ACL记录的情况之下,在所述目标父目录的目录级ACL中新建第六ACL记录,所述第六ACL记录中包含有所述第一ACL记录中包含的所述文件的ACL,所述第六ACL记录中还包含有ACL索引,利用所述第六ACL记录中包含的ACL索引替换掉所述文件的元数据中已有的ACL索引。
  14. 根据权利要求8至13任意一项所述的文件服务器,其特征在于,
    所述文件服务器还包括:
    计算单元,用于计算所述文件的ACL的指纹;
    所述查找单元从所述文件所属父目录的目录级ACL之中查找包含有所述文件的ACL的ACL记录包括:从所述目录级ACL之中查找包含有所述文件的ACL的指纹的ACL记录,所述目录级ACL中包含所述指纹的ACL记录中包含所述文件的ACL。
  15. 一种文件服务器,其特征在于,包括:
    相互耦合的处理器、通信接口和存储部件;其中,所述处理器用于执行权利要求1至7任一项所述方法。
  16. 一种通信系统,其特征在于,包括:
    通信连接的文件客户端和文件服务器,其中,所述文件服务器为如权利要求8~15任一项所述的文件服务器。
PCT/CN2017/118146 2016-12-29 2017-12-23 文件访问控制列表管理方法和相关装置和系统 WO2018121454A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611247427.7 2016-12-29
CN201611247427.7A CN106682186B (zh) 2016-12-29 2016-12-29 文件访问控制列表管理方法和相关装置和系统

Publications (1)

Publication Number Publication Date
WO2018121454A1 true WO2018121454A1 (zh) 2018-07-05

Family

ID=58873079

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/118146 WO2018121454A1 (zh) 2016-12-29 2017-12-23 文件访问控制列表管理方法和相关装置和系统

Country Status (2)

Country Link
CN (1) CN106682186B (zh)
WO (1) WO2018121454A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113468112A (zh) * 2021-09-02 2021-10-01 武汉华工安鼎信息技术有限责任公司 文件管理方法、装置、存储介质及计算机设备
CN114362991A (zh) * 2021-11-22 2022-04-15 北京威努特技术有限公司 一种acl访问控制列表规则过滤去重的方法及装置

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106682186B (zh) * 2016-12-29 2020-06-16 华为技术有限公司 文件访问控制列表管理方法和相关装置和系统
CN107403105B (zh) * 2017-06-30 2020-09-04 华为技术有限公司 一种文件系统的权限设置方法及装置
CN107688753A (zh) * 2017-09-01 2018-02-13 郑州云海信息技术有限公司 一种acl权限控制的方法与装置
CN110413215B (zh) * 2018-04-28 2023-11-07 伊姆西Ip控股有限责任公司 用于获取访问权限的方法、设备和计算机程序产品
CN109062967A (zh) * 2018-06-28 2018-12-21 郑州云海信息技术有限公司 一种分布式存储acl快速响应权限查询的方法
CN108989300B (zh) * 2018-07-03 2021-03-09 苏州浪潮智能科技有限公司 一种存储环境ip权限控制方法与系统
CN110837647B (zh) * 2018-08-16 2022-11-08 迈普通信技术股份有限公司 管理访问控制列表的方法及装置
CN110795596B (zh) * 2019-11-07 2023-05-09 北京首钢自动化信息技术有限公司 一种客户端的信息反馈方法及装置
CN114244781B (zh) * 2021-12-20 2023-12-22 苏州盛科通信股份有限公司 一种基于dpdk的报文去重处理方法和装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6438549B1 (en) * 1998-12-03 2002-08-20 International Business Machines Corporation Method for storing sparse hierarchical data in a relational database
CN101674334A (zh) * 2009-09-30 2010-03-17 华中科技大学 一种网络存储设备的访问控制方法
CN102129539A (zh) * 2011-03-11 2011-07-20 清华大学 基于访问控制列表的数据资源权限管理方法
CN103064957A (zh) * 2012-12-28 2013-04-24 华为技术有限公司 实现acl的方法及客户端
CN106682186A (zh) * 2016-12-29 2017-05-17 华为技术有限公司 文件访问控制列表管理方法和相关装置和系统

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744961B (zh) * 2014-01-06 2016-10-19 清华大学 用可重构的文件系统目录树提高非易失性存储寿命的方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6438549B1 (en) * 1998-12-03 2002-08-20 International Business Machines Corporation Method for storing sparse hierarchical data in a relational database
CN101674334A (zh) * 2009-09-30 2010-03-17 华中科技大学 一种网络存储设备的访问控制方法
CN102129539A (zh) * 2011-03-11 2011-07-20 清华大学 基于访问控制列表的数据资源权限管理方法
CN103064957A (zh) * 2012-12-28 2013-04-24 华为技术有限公司 实现acl的方法及客户端
CN106682186A (zh) * 2016-12-29 2017-05-17 华为技术有限公司 文件访问控制列表管理方法和相关装置和系统

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113468112A (zh) * 2021-09-02 2021-10-01 武汉华工安鼎信息技术有限责任公司 文件管理方法、装置、存储介质及计算机设备
CN113468112B (zh) * 2021-09-02 2021-12-07 武汉华工安鼎信息技术有限责任公司 文件管理方法、装置、存储介质及计算机设备
CN114362991A (zh) * 2021-11-22 2022-04-15 北京威努特技术有限公司 一种acl访问控制列表规则过滤去重的方法及装置
CN114362991B (zh) * 2021-11-22 2024-04-16 北京威努特技术有限公司 一种acl访问控制列表规则过滤去重的方法及装置

Also Published As

Publication number Publication date
CN106682186A (zh) 2017-05-17
CN106682186B (zh) 2020-06-16

Similar Documents

Publication Publication Date Title
WO2018121454A1 (zh) 文件访问控制列表管理方法和相关装置和系统
US10489059B2 (en) Tier-optimized write scheme
CN110062925B (zh) 用于云集成的快照元数据布置
US10453076B2 (en) Cold storage for legal hold data
US20200167238A1 (en) Snapshot format for object-based storage
US8639665B2 (en) Hybrid backup and restore of very large file system using metadata image backup and traditional backup
US10509701B2 (en) Performing data backups using snapshots
US9501241B2 (en) Storage system and object management method
US9449007B1 (en) Controlling access to XAM metadata
US11663236B2 (en) Search and analytics for storage systems
US8010543B1 (en) Protecting a file system on an object addressable storage system
US9749193B1 (en) Rule-based systems for outcome-based data protection
US11841826B2 (en) Embedded reference counts for file clones
US8095804B1 (en) Storing deleted data in a file system snapshot
US10303556B1 (en) Modifiable volume snapshots
US11392546B1 (en) Method to use previously-occupied inodes and associated data structures to improve file creation performance
US9852139B1 (en) Directory partitioning with concurrent directory access
US9830471B1 (en) Outcome-based data protection using multiple data protection systems
US9111015B1 (en) System and method for generating a point-in-time copy of a subset of a collectively-managed set of data items
US11614999B2 (en) Efficient method to index scheduled backup of same target and the corresponding files
Agrawal et al. SD-HDFS: Secure deletion in hadoop distributed file system
US9646012B1 (en) Caching temporary data in solid state storage devices
US11675735B1 (en) File transfer prioritization during replication
US11809598B2 (en) Devices and methods for safe storage of media containing personal data and erasure of stored personal data
US11550666B1 (en) Efficient mechanism to perform auto retention locking of files ingested via distributed segment processing in deduplication backup servers

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17888589

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17888589

Country of ref document: EP

Kind code of ref document: A1