/** * vxfs_transmod - mode for a VxFS inode * @vip: VxFS inode * * Description: * vxfs_transmod returns a Linux mode_t for a given * VxFS inode structure.
*/ static __inline__ umode_t
vxfs_transmod(struct vxfs_inode_info *vip)
{
umode_t ret = vip->vii_mode & ~VXFS_TYPE_MASK;
if (VXFS_ISFIFO(vip))
ret |= S_IFIFO; if (VXFS_ISCHR(vip))
ret |= S_IFCHR; if (VXFS_ISDIR(vip))
ret |= S_IFDIR; if (VXFS_ISBLK(vip))
ret |= S_IFBLK; if (VXFS_ISLNK(vip))
ret |= S_IFLNK; if (VXFS_ISREG(vip))
ret |= S_IFREG; if (VXFS_ISSOC(vip))
ret |= S_IFSOCK;
/** * vxfs_blkiget - find inode based on extent # * @sbp: superblock of the filesystem we search in * @extent: number of the extent to search * @ino: inode number to search * * Description: * vxfs_blkiget searches inode @ino in the filesystem described by * @sbp in the extent @extent. * Returns the matching VxFS inode on success, else a NULL pointer. * * NOTE: * While __vxfs_iget uses the pagecache vxfs_blkiget uses the * buffercache. This function should not be used outside the * read_super() method, otherwise the data may be incoherent.
*/ struct inode *
vxfs_blkiget(struct super_block *sbp, u_long extent, ino_t ino)
{ struct buffer_head *bp; struct inode *inode;
u_long block, offset;
inode = new_inode(sbp); if (!inode) return NULL;
inode->i_ino = get_next_ino();
/** * __vxfs_iget - generic find inode facility * @ilistp: inode list * @vip: VxFS inode to fill in * @ino: inode number * * Description: * Search the for inode number @ino in the filesystem * described by @sbp. Use the specified inode table (@ilistp). * Returns the matching inode on success, else an error code.
*/ staticint
__vxfs_iget(struct inode *ilistp, struct vxfs_inode_info *vip, ino_t ino)
{ struct page *pp;
u_long offset;
printk(KERN_WARNING "vxfs: error on page 0x%p for inode %ld\n",
pp, (unsignedlong)ino); return PTR_ERR(pp);
}
/** * vxfs_stiget - find inode using the structural inode list * @sbp: VFS superblock * @ino: inode # * * Description: * Find inode @ino in the filesystem described by @sbp using * the structural inode list. * Returns the matching inode on success, else a NULL pointer.
*/ struct inode *
vxfs_stiget(struct super_block *sbp, ino_t ino)
{ struct inode *inode; int error;
inode = new_inode(sbp); if (!inode) return NULL;
inode->i_ino = get_next_ino();
/** * vxfs_iget - get an inode * @sbp: the superblock to get the inode for * @ino: the number of the inode to get * * Description: * vxfs_read_inode creates an inode, reads the disk inode for @ino and fills * in all relevant fields in the new inode.
*/ struct inode *
vxfs_iget(struct super_block *sbp, ino_t ino)
{ struct vxfs_inode_info *vip; conststruct address_space_operations *aops; struct inode *ip; int error;
ip = iget_locked(sbp, ino); if (!ip) return ERR_PTR(-ENOMEM); if (!(ip->i_state & I_NEW)) return ip;
/** * vxfs_evict_inode - remove inode from main memory * @ip: inode to discard. * * Description: * vxfs_evict_inode() is called on the final iput and frees the private * inode area.
*/ void
vxfs_evict_inode(struct inode *ip)
{
truncate_inode_pages_final(&ip->i_data);
clear_inode(ip);
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.0 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.