4 * Copyright (c) 1999 Al Smith
6 * Portions derived from work (c) 1995,1996 Christian Vogelgsang.
9 #include <linux/efs_fs.h>
11 int efs_get_block(struct inode *inode, long iblock,
12 struct buffer_head *bh_result, int create)
19 if (iblock >= inode->i_blocks) {
22 * i have no idea why this happens as often as it does
24 printk(KERN_WARNING "EFS: bmap(): block %d >= %ld (filesize %ld)\n",
31 phys = efs_map_block(inode, iblock);
33 bh_result->b_dev = inode->i_dev;
34 bh_result->b_blocknr = phys;
35 bh_result->b_state |= (1UL << BH_Mapped);
40 int efs_bmap(struct inode *inode, efs_block_t block) {
43 printk(KERN_WARNING "EFS: bmap(): block < 0\n");
47 /* are we about to read past the end of a file ? */
48 if (!(block < inode->i_blocks)) {
51 * i have no idea why this happens as often as it does
53 printk(KERN_WARNING "EFS: bmap(): block %d >= %ld (filesize %ld)\n",
61 return efs_map_block(inode, block);