Messages in this thread Patch in this message | | | Date | Wed, 13 Oct 2004 13:10:10 +0100 | From | Alex Kiernan <> | Subject | Re: Submitting patches for unmaintained areas (Solaris x86 UFS bug) |
| |
On Wed, 13 Oct 2004 12:06:29 +0100, Alex Kiernan <alex.kiernan@gmail.com> wrote: > I've run into a bug in the UFS reading code (on Solaris x86 the > major/minor numbers are in 2nd indirect offset not the first), so I've > patched it & bugzilled it > (http://bugzilla.kernel.org/show_bug.cgi?id=3475). > > But where do I go from here? There doesn't seem to be a maintainer for > UFS so I can't send it there. >
After advice from Alan (thanks), here's the patch which addresses the problem I'm seeing. Specifically it appears that on x86 Solaris stores the major/minor device numbers in the 2nd indirect block, not the first.
-- Alex Kiernan ===== namei.c 1.24 vs edited ===== --- 1.24/fs/ufs/namei.c 2004-03-12 09:30:20 +00:00 +++ edited/namei.c 2004-09-27 16:52:58 +01:00 @@ -30,6 +30,7 @@ #include <linux/smp_lock.h> #include <linux/buffer_head.h> #include "swab.h" /* will go away - see comment in mknod() */ +#include "util.h" /* #undef UFS_NAMEI_DEBUG @@ -125,8 +126,8 @@ if (!IS_ERR(inode)) { init_special_inode(inode, mode, rdev); /* NOTE: that'll go when we get wide dev_t */ - UFS_I(inode)->i_u1.i_data[0] = cpu_to_fs32(inode->i_sb, - old_encode_dev(rdev)); + ufs_set_inode_dev(inode->i_sb, UFS_I(inode), + old_encode_dev(rdev)); mark_inode_dirty(inode); lock_kernel(); err = ufs_add_nondir(dentry, inode); ===== inode.c 1.24 vs edited ===== --- 1.24/fs/ufs/inode.c 2004-09-17 07:58:42 +01:00 +++ edited/inode.c 2004-09-27 16:50:47 +01:00 @@ -629,7 +629,7 @@ } } else init_special_inode(inode, inode->i_mode, - old_decode_dev(fs32_to_cpu(sb, ufsi->i_u1.i_data[0]))); + old_decode_dev(ufs_get_inode_dev(sb, ufsi))); brelse (bh); @@ -705,7 +705,7 @@ } } else /* TODO : here ...*/ init_special_inode(inode, inode->i_mode, - old_decode_dev(fs32_to_cpu(sb, ufsi->i_u1.i_data[0]))); + old_decode_dev(ufs_get_inode_dev(sb, ufsi))); brelse(bh); ===== util.h 1.9 vs edited ===== --- 1.9/fs/ufs/util.h 2004-03-12 09:30:20 +00:00 +++ edited/util.h 2004-09-27 16:49:21 +01:00 @@ -223,6 +223,24 @@ inode->ui_u1.oldids.ui_sgid = cpu_to_fs16(sb, value); } +static inline u32 +ufs_get_inode_dev(struct super_block *sb, struct ufs_inode_info *inode) +{ + if ((UFS_SB(sb)->s_flags & UFS_ST_MASK) == UFS_ST_SUNx86) + return fs32_to_cpu(sb, ufsi->i_u1.i_data[1]); + else + return fs32_to_cpu(sb, ufsi->i_u1.i_data[0]); +} + +static inline void +ufs_set_inode_dev(struct super_block *sb, struct ufs_inode_info *inode, u32 value) +{ + if ((UFS_SB(sb)->s_flags & UFS_ST_MASK) == UFS_ST_SUNx86) + ufsi->i_u1.i_data[1] = cpu_to_fs32(sb, value); + else + ufsi->i_u1.i_data[0] = cpu_to_fs32(sb, value); +} + /* * These functions manipulate ufs buffers | |