aboutsummaryrefslogtreecommitdiffstats
path: root/fs/minix/itree_v2.c
diff options
context:
space:
mode:
authorAndries Brouwer <aeb@cwi.nl>2007-02-12 03:52:49 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:31 -0500
commit939b00df0306bc4b5cd25c3c3c78e89b91e72fc8 (patch)
treec251dca9f3ebbebfa1f40f39716423842b247742 /fs/minix/itree_v2.c
parentb587b13a4f670ebae79ae6259cf44328455e4e69 (diff)
[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 <danarag@gmail.com> Signed-off-by: Andries Brouwer <aeb@cwi.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/minix/itree_v2.c')
-rw-r--r--fs/minix/itree_v2.c7
1 files changed, 4 insertions, 3 deletions
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)
23static int block_to_path(struct inode * inode, long block, int offsets[DEPTH]) 23static int block_to_path(struct inode * inode, long block, int offsets[DEPTH])
24{ 24{
25 int n = 0; 25 int n = 0;
26 struct super_block *sb = inode->i_sb;
26 27
27 if (block < 0) { 28 if (block < 0) {
28 printk("minix_bmap: block<0\n"); 29 printk("minix_bmap: block<0\n");
29 } else if (block >= (minix_sb(inode->i_sb)->s_max_size/BLOCK_SIZE)) { 30 } else if (block >= (minix_sb(inode->i_sb)->s_max_size/sb->s_blocksize)) {
30 printk("minix_bmap: block>big\n"); 31 printk("minix_bmap: block>big\n");
31 } else if (block < 7) { 32 } else if (block < 7) {
32 offsets[n++] = block; 33 offsets[n++] = block;
@@ -60,7 +61,7 @@ void V2_minix_truncate(struct inode * inode)
60 truncate(inode); 61 truncate(inode);
61} 62}
62 63
63unsigned V2_minix_blocks(loff_t size) 64unsigned V2_minix_blocks(loff_t size, struct super_block *sb)
64{ 65{
65 return nblocks(size); 66 return nblocks(size, sb);
66} 67}