IPC분류정보
국가/구분 |
United States(US) Patent
등록
|
국제특허분류(IPC7판) |
|
출원번호 |
US-0776092
(2007-07-11)
|
등록번호 |
US-8156164
(2012-04-10)
|
발명자
/ 주소 |
- Anderson, Owen T.
- Schmuck, Frank B.
|
출원인 / 주소 |
- International Business Machines Corporation
|
대리인 / 주소 |
|
인용정보 |
피인용 횟수 :
3 인용 특허 :
20 |
초록
▼
A method for avoiding directory conflicts across a file system having multiple nodes with one node representing a token manager. For each directory, at least one metanode responsible for directory updates. The method involving obtaining a name-based lock on a filename. Querying the token manager for
A method for avoiding directory conflicts across a file system having multiple nodes with one node representing a token manager. For each directory, at least one metanode responsible for directory updates. The method involving obtaining a name-based lock on a filename. Querying the token manager for a lock token. If a new token is obtained, sending a Remote Procedure Call (RPC) to the metanode to obtain matching directory entries, and caching the result of the RPC so that subsequent operations on that filename can be satisfied without additional messages sent to the metanode. Updating a cached directory block in memory by creating a new directory entry in the block or deleting an existing directory entry from the block. Information regarding the updating is sent to the metanode on one of: periodic schedule, a subsequent synchronization event, or when the name-based lock token is revoked.
대표청구항
▼
1. A method for avoiding directory conflicts across a file system having multiple nodes, comprising: assigning, for each directory in a file system having multiple directories and multiple nodes each accessing each of the multiple directories in parallel and at least one node of said multiple nodes
1. A method for avoiding directory conflicts across a file system having multiple nodes, comprising: assigning, for each directory in a file system having multiple directories and multiple nodes each accessing each of the multiple directories in parallel and at least one node of said multiple nodes representing a token manager node, at least one node of said multiple nodes to act as a metanode responsible for collecting updates to said directory and for writing updates to directory blocks on disk;obtaining, by a particular node of said multiple nodes, a name-based lock on a filename within a particular directory that is the target of an operation by said particular node, wherein other nodes of said multiple nodes concurrently perform operations on other files within said particular directory, wherein said name-based lock is represented by a byte-range lock for a range of selected bytes of said particular directory determined from a computed hash value of said filename within a total range of bytes for said particular directory;querying, by said particular node, said token manager for a name-based lock token for said range of selected bytes acquired under said name-based lock;if a new name-based lock token is obtained from said token manager, sending a Remote Procedure Call (RPC) to said metanode to obtain matching directory entries, and caching, by said particular node, the result of said RPC so that subsequent operations on said filename can be satisfied without additional messages sent to said metanode, wherein said cached result is valid while said particular node holds said name-based lock token for said filename;updating, by said particular node, a cached directory block in memory by either creating a new directory entry in said directory block or deleting an existing directory entry from said directory block;sending, by said particular node, a new RPC to said metanode to reserve space in said directory block;responsive to said particular node receiving a result of said RPC from said metanode with said reserved space, allocating and initializing a new file system object and inserting into said directory block said filename and a reference which points to said allocated new file system object; andresponsive to said metanode detecting there is insufficient space left to reserve in said directory block, said metanode acquiring a name-based range lock for a range of filenames that covers all filenames that might be found in said directory block, revoking all name-based lock tokens corresponding to said filenames that have been previously requested from said token manager by said multiple nodes, triggering said nodes with pending updates to said directory block to send said updates to said metanode, and responsive to said metanode receiving said updates, allocating a new directory block and extending the directory block to make room for more entries by moving a selection of directory entries in the directory block to the new directory block. 2. The method as in claim 1, said deleting said existing directory entry from said directory block comprising: removing said directory entry from said directory block;decrementing a link count in an inode containing attributes of said file referred to by said filename; andresponsive to said link count decrementing to zero, freeing a portion of disk space occupied by a file system object for said file and freeing said inode. 3. The method as in claim 1, further comprising sending information regarding said updating to said metanode on one of: periodic schedule, a subsequent synchronization event, or when said name-based lock token is revoked. 4. The method as in claim 1, further comprising switching dynamically between name-based locking based on a hash value for a particular file name and directory block locking based on a range of hash values of a plurality of possible file names stored in a directory block. 5. The method as in claim 4, wherein switching dynamically between name-based locking and directory block locking further comprises: when a name-based lock token is requested, said token manager collecting data, and if there was no recent directory activity on other nodes in said file system, said token manager granting a name-based lock token covering said range of hash values of said plurality of possible filenames and, after obtaining said name-based lock, further accessing directory blocks and updating without sending additional RPCs to said metanode. 6. The method as in claim 1, said name-based locking comprising: computing said hash value for said filename; andutilizing said hash value to obtain said named-based lock. 7. The method as in claim 1, assigning different nodes of said multiple nodes in said file system to handle different directory blocks within said directory. 8. The method as in claim 1, further comprising distributing a workload of said token manager by assigning sub-ranges of filenames to other nodes from among the multiple nodes in said file system. 9. A machine readable storage medium storing an instruction set executable by a computer system for avoiding directory conflicts across a file system having multiple nodes, the instruction set comprising: assigning, for each directory in a file system having multiple directories and multiple nodes each accessing each of the multiple directories in parallel and at least one node of said multiple nodes representing a token manager node, at least one node of said multiple nodes to act as a metanode responsible for collecting updates to said directory and for writing updates to directory blocks on disk;obtaining, by a particular node of said multiple nodes, a name-based lock on a filename within a particular directory that is the target of an operation by said particular node, wherein other nodes of said multiple nodes concurrently perform operations on other files within said particular directory, wherein said name-based lock is represented by a byte-range lock for a range of selected bytes of said particular directory determined from a computed hash value of said filename within a total range of bytes for said particular directory;querying, by said particular node, said token manager for a name-based lock token for said range of selected bytes acquired under said name-based lock;if a new name-based lock token is obtained from said token manager, sending a Remote Procedure Call (RPC) to said metanode to obtain matching directory entries, and caching, by said particular node, the result of said RPC so that subsequent operations on said filename can be satisfied without additional messages sent to said metanode, wherein said cached result is valid while said particular node holds said name-based lock token for said filename;updating, by said particular node, a cached directory block in memory by either creating a new directory entry in said directory block or deleting an existing directory entry from said directory block;sending, by said particular node, a new RPC to said metanode to reserve space in said directory block;responsive to said metanode detecting there is insufficient space left to reserve in said directory block, said metanode acquiring a name-based range lock for a range of filenames that covers all filenames that might be found in said directory block, revoking all name-based lock tokens corresponding to said filenames that have been previously requested from said token manager by said multiple nodes, triggering said nodes with pending updates to said directory block to send said updates to said metanode, and responsive to said metanode receiving said updates, allocating a new directory block and extending the directory block to make room for more entries by moving a selection of directory entries in the directory block to the new directory block;responsive to said particular node receiving a result of said RPC from said metanode with said reserved space, allocating and initializing a new file system object; andinserting into said directory block said filename and a reference which points to said allocated new file system object. 10. The machine readable medium as in claim 9, said deleting said directory entry comprising: removing said directory entry from said directory block;decrementing a link count in an inode containing attributes of said file referred to by said filename; andresponsive to said link count decrementing to zero, freeing a portion of disk space occupied by a file system object for said file and freeing said inode. 11. The machine readable medium as in claim 9, further comprising sending information regarding said updating to said metanode on one of: periodic schedule, a subsequent synchronization event, or when said name-based lock token is revoked. 12. The machine readable medium as in claim 9, said name-based locking comprising: computing said hash value for said filename; andutilizing said hash value to obtain said named-based lock. 13. A file system which avoids directory conflicts across multiple computer nodes in said system, comprising: at least one node from among multiple nodes in said file system representing a token manager node;for each directory in said file system, at least one metanode from among the multiple nodes responsible for collecting updates to that directory and for writing said updates to directory blocks on disk, wherein said multiple nodes each access each of the multiple directories in parallel; anda computer instruction set, executable by each of said multiple nodes, comprising:obtaining a name-based lock on a filename, wherein other nodes of said multiple nodes concurrently perform operations on other files within said particular directory, wherein said name-based lock is represented by a byte-range lock for a range of selected bytes of said particular directory determined from a computed hash value of said filename within a total range of bytes for said particular directory;querying said token manager for a name-based lock token for said range of selected bytes acquired under said name-based lock;if a new name-based lock token is obtained from said token manager, sending a Remote Procedure Call (RPC) to said metanode to obtain matching directory entries and caching the result of said RPC so that subsequent operations on said filename can be satisfied without additional messages sent to said metanode;updating a cached directory block in memory by either creating a new directory entry in said directory block or deleting an existing directory entry from said directory block;sending a new RPC to said metanode to reserve space in said directory block;responsive to said metanode detecting there is insufficient space left to reserve in said directory block, said metanode acquiring a name-based range lock for a range of filenames that covers all filenames that might be found in said directory block, revoking all name-based lock tokens corresponding to said filenames that have been previously requested from said token manager by said multiple nodes, triggering said nodes with pending updates to said directory block to send said updates to said metanode, and responsive to said metanode receiving said updates, allocating a new directory block and extending the directory block to make room for more entries by moving a selection of directory entries in the directory block to the new directory block;responsive to receiving a result of said RPC from said metanode with said reserved space, allocating and initializing a new file system object; andinserting into said directory block said filename and a reference which points to said allocated new file system object. 14. The file system as in claim 13, said deleting said directory entry comprising: removing said directory entry from said directory block;decrementing a link count in an inode containing attributes of said file referred to by said filename; andresponsive to said link count decrementing to zero, freeing a portion of disk space occupied by a file system object for said file and freeing said inode. 15. The file system as in claim 13, further comprising sending information regarding said updating to said metanode on one of: periodic schedule, a subsequent synchronization event, or when said name-based lock token is revoked. 16. The file system as in claim 13, said name-based locking comprising: computing said hash value for said filename; andutilizing said hash value to obtain said named-based lock.
※ AI-Helper는 부적절한 답변을 할 수 있습니다.