发明名称 Inode event notification for cluster file systems
摘要 A mechanism for inode event notification for cluster file systems is disclosed. A method of the invention includes implementing a lock scheme for a cache manager associated with an inode of a cluster file system, wherein the lock scheme includes a null lock (NL) used as a reference count for a lock value block (LVB) and an exclusive (EX) lock used for setting up inode event notifications, and associating a first global counter and a second global counter with the cache manager for the inode, wherein the first global counter is configured to track one or more processes that have the inode open in read-only mode and the second global counter is configured to track processes that have the inode open in read-write mode.
申请公布号 US8788474(B2) 申请公布日期 2014.07.22
申请号 US201012971586 申请日期 2010.12.17
申请人 Red Hat, Inc. 发明人 Whitehouse Steven John
分类号 G06F17/30;G06F7/00 主分类号 G06F17/30
代理机构 Lowenstein Sandler LLP 代理人 Lowenstein Sandler LLP
主权项 1. A method, comprising: implementing, by a cluster file system operating on a processing device, a lock scheme for a cache manager associated with an inode of the cluster file system, wherein the lock scheme comprises lock modes of a null lock (NL) that is used to store a reference count for a lock value block (LVB) and an exclusive (EX) lock that is used for setting up inode event notifications, the inode event notifications sent by the cluster file system when events occur corresponding to locks of inodes of target files of the cluster file system, the inode event notifications sent to applications holding notification locks for the target files; associating, by the cluster file system, a first global counter and a second global counter with the cache manager for the inode, wherein the first global counter is to track one or more processes that have the inode open in read-only mode and the second global counter is to track processes that have the inode open in read-write mode; and obtaining an EX lock mode on the cache manager of the inode in order to initialize a watch for an event on the inode, wherein obtaining the EX lock mode causes any open calls on the inode by other nodes in the cluster file system to be blocked, their associated locks demoted to the NL lock mode, and at least one of the first or second global counters to be updated accordingly; wherein any other nodes in the cluster file system with a lock demoted to the NL lock mode are to: at least one of increment the first global counter when the inode is open in read-only mode at that node or increment the second global counter when the inode is open in read-write mode at that node; and re-queue a request for a higher lock mode for the cache manager of the inode by the node upon the demotion of its cache manager to the NL lock mode.
地址 Raleigh NC US