发明名称 Reclaiming blocks from a directory
摘要 A technique manages filesystem blocks of a filesystem. The technique involves modifying an inode structure which identifies a filesystem directory, the directory's inode structure currently including a set of filesystem blocks which was allocated to the directory's inode structure to hold filesystem data. The technique further involves, after modifying the directory's inode structure, performing a directory check operation to determine whether the filesystem directory is empty. The technique further involves reclaiming, from the directory's inode structure, the set of filesystem blocks which was allocated to the directory's inode structure to hold the filesystem data when a result of the directory check operation indicates that the filesystem directory is empty, and not reclaiming the set of filesystem blocks from the directory's inode structure when the result of the directory check operation indicates that the filesystem directory is not empty.
申请公布号 US9047299(B1) 申请公布日期 2015.06.02
申请号 US201213721844 申请日期 2012.12.20
申请人 EMC Corporation 发明人 Ferrigno James P.
分类号 G06F17/30 主分类号 G06F17/30
代理机构 BainwoodHuang 代理人 BainwoodHuang
主权项 1. A method of managing filesystem blocks of a filesystem, the method comprising: modifying an inode structure which identifies a filesystem directory, the inode structure currently including a set of filesystem blocks which was allocated to the inode structure to hold filesystem data; after modifying the inode structure, performing a directory check operation to determine whether the filesystem directory is empty; and reclaiming, from the inode structure, the set of filesystem blocks which was allocated to the inode structure to hold the filesystem data when a result of the directory check operation indicates that the filesystem directory is empty, and not reclaiming the set of filesystem blocks from the inode structure when the result of the directory check operation indicates that the filesystem directory is not empty; wherein the inode structure includes a type of file field which stores a directory type indicator indicating that the inode structure identifies a filesystem directory; and wherein reclaiming the set of filesystem blocks includes: copying contents of the inode structure to a new inode structure, overwriting, in a type of file field of the new inode structure, a copy of the directory type indicator with an ordinary type indicator to indicate that the new inode structure identifies an ordinary file, and submitting the new inode structure to a cleanup routine which processes the new inode structure as if an ordinary file has been deleted from the filesystem to return the set of filesystem blocks allocated to the inode structure to a pool of free filesystem blocks.
地址 Hopkinton MA US