Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #include <linux/fs.h>
0003 #include <linux/qnx4_fs.h>
0004 
0005 #define QNX4_DEBUG 0
0006 
0007 #if QNX4_DEBUG
0008 #define QNX4DEBUG(X) printk X
0009 #else
0010 #define QNX4DEBUG(X) (void) 0
0011 #endif
0012 
0013 struct qnx4_sb_info {
0014     unsigned int        Version;    /* may be useful */
0015     struct qnx4_inode_entry *BitMap;    /* useful */
0016 };
0017 
0018 struct qnx4_inode_info {
0019     struct qnx4_inode_entry raw;
0020     loff_t mmu_private;
0021     struct inode vfs_inode;
0022 };
0023 
0024 extern struct inode *qnx4_iget(struct super_block *, unsigned long);
0025 extern struct dentry *qnx4_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags);
0026 extern unsigned long qnx4_count_free_blocks(struct super_block *sb);
0027 extern unsigned long qnx4_block_map(struct inode *inode, long iblock);
0028 
0029 extern const struct inode_operations qnx4_dir_inode_operations;
0030 extern const struct file_operations qnx4_dir_operations;
0031 extern int qnx4_is_free(struct super_block *sb, long block);
0032 
0033 static inline struct qnx4_sb_info *qnx4_sb(struct super_block *sb)
0034 {
0035     return sb->s_fs_info;
0036 }
0037 
0038 static inline struct qnx4_inode_info *qnx4_i(struct inode *inode)
0039 {
0040     return container_of(inode, struct qnx4_inode_info, vfs_inode);
0041 }
0042 
0043 static inline struct qnx4_inode_entry *qnx4_raw_inode(struct inode *inode)
0044 {
0045     return &qnx4_i(inode)->raw;
0046 }