1 /* SPDX-License-Identifier: GPL-2.0 */
5 #include <linux/module.h>
10 /* In-memory structures */
20 unsigned long **s_imap
;
22 struct mutex s_bitmap_lock
;
29 /* convert a cluster number to a scaled block number */
30 static inline sector_t
clus_to_blk(struct omfs_sb_info
*sbi
, sector_t block
)
32 return block
<< sbi
->s_block_shift
;
35 static inline struct omfs_sb_info
*OMFS_SB(struct super_block
*sb
)
41 extern unsigned long omfs_count_free(struct super_block
*sb
);
42 extern int omfs_allocate_block(struct super_block
*sb
, u64 block
);
43 extern int omfs_allocate_range(struct super_block
*sb
, int min_request
,
44 int max_request
, u64
*return_block
, int *return_size
);
45 extern int omfs_clear_range(struct super_block
*sb
, u64 block
, int count
);
48 extern const struct file_operations omfs_dir_operations
;
49 extern const struct inode_operations omfs_dir_inops
;
50 extern int omfs_make_empty(struct inode
*inode
, struct super_block
*sb
);
51 extern int omfs_is_bad(struct omfs_sb_info
*sbi
, struct omfs_header
*header
,
55 extern const struct file_operations omfs_file_operations
;
56 extern const struct inode_operations omfs_file_inops
;
57 extern const struct address_space_operations omfs_aops
;
58 extern void omfs_make_empty_table(struct buffer_head
*bh
, int offset
);
59 extern int omfs_shrink_inode(struct inode
*inode
);
62 extern struct buffer_head
*omfs_bread(struct super_block
*sb
, sector_t block
);
63 extern struct inode
*omfs_iget(struct super_block
*sb
, ino_t inode
);
64 extern struct inode
*omfs_new_inode(struct inode
*dir
, umode_t mode
);
65 extern int omfs_reserve_block(struct super_block
*sb
, sector_t block
);
66 extern int omfs_find_empty_block(struct super_block
*sb
, int mode
, ino_t
*ino
);
67 extern int omfs_sync_inode(struct inode
*inode
);