From 939b00df0306bc4b5cd25c3c3c78e89b91e72fc8 Mon Sep 17 00:00:00 2001 From: Andries Brouwer Date: Mon, 12 Feb 2007 00:52:49 -0800 Subject: [PATCH] Minix V3 support This morning I needed to read a Minix V3 filesystem, but unfortunately my 2.6.19 did not support that, and neither did the downloaded 2.6.20rc4. Fortunately, google told me that Daniel Aragones had already done the work, patch found at http://www.terra.es/personal2/danarag/ Unfortunaly, looking at the patch was painful to my eyes, so I polished it a bit before applying. The resulting kernel boots, and reads the filesystem it needed to read. Signed-off-by: Daniel Aragones Signed-off-by: Andries Brouwer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/minix/itree_v2.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'fs/minix/itree_v2.c') diff --git a/fs/minix/itree_v2.c b/fs/minix/itree_v2.c index 9adcdc754e0f..ad8f0dec4ef4 100644 --- a/fs/minix/itree_v2.c +++ b/fs/minix/itree_v2.c @@ -23,10 +23,11 @@ static inline block_t *i_data(struct inode *inode) static int block_to_path(struct inode * inode, long block, int offsets[DEPTH]) { int n = 0; + struct super_block *sb = inode->i_sb; if (block < 0) { printk("minix_bmap: block<0\n"); - } else if (block >= (minix_sb(inode->i_sb)->s_max_size/BLOCK_SIZE)) { + } else if (block >= (minix_sb(inode->i_sb)->s_max_size/sb->s_blocksize)) { printk("minix_bmap: block>big\n"); } else if (block < 7) { offsets[n++] = block; @@ -60,7 +61,7 @@ void V2_minix_truncate(struct inode * inode) truncate(inode); } -unsigned V2_minix_blocks(loff_t size) +unsigned V2_minix_blocks(loff_t size, struct super_block *sb) { - return nblocks(size); + return nblocks(size, sb); } -- cgit v1.2.3