On Thu, Dec 06, 2007 at 09:19:42PM -0800, Joel Becker wrote:
> diff --git a/fs/ocfs2/slot_map.c b/fs/ocfs2/slot_map.c
> index f5727b8..a4f2c02 100644
> --- a/fs/ocfs2/slot_map.c
> +++ b/fs/ocfs2/slot_map.c
> @@ -42,14 +42,30 @@
>  
>  #include "buffer_head_io.h"
>  
> -static s16 __ocfs2_node_num_to_slot(struct ocfs2_slot_info *si,
> +struct ocfs2_slot_info_real {
> +     spinlock_t si_lock;
> +
> +     struct inode *si_inode;
> +     struct buffer_head *si_bh;
> +     unsigned int si_num_slots;
> +     unsigned int si_size;
> +     s16 si_global_node_nums[OCFS2_MAX_SLOTS];
> +};
> +
> +static inline struct ocfs2_slot_info_real *to_slot_info(struct ocfs2_super 
> *osb)
> +{
> +     return (struct ocfs2_slot_info_real *)osb->slot_info;
> +}
> +

...

> diff --git a/fs/ocfs2/slot_map.h b/fs/ocfs2/slot_map.h
> index b029ffd..14b065b 100644
> --- a/fs/ocfs2/slot_map.h
> +++ b/fs/ocfs2/slot_map.h
> @@ -29,12 +29,6 @@
>  
>  struct ocfs2_slot_info {
>       spinlock_t si_lock;
> -
> -     struct inode *si_inode;
> -     struct buffer_head *si_bh;
> -     unsigned int si_num_slots;
> -     unsigned int si_size;
> -     s16 si_global_node_nums[OCFS2_MAX_SLOTS];
>  };

Ok, so we need to either use 'osb->osb_lock' for slot info locking and drop
ocfs2_slot_info from slot_map.h completely, or just leave the definition in
slot_map.h. As it stands in this patch, if we add anything to 'struct
ocfs2_slot_info' or move 'si_lock' around in 'struct ocfs2_slot_info_real'
things will blow up :(
        --Mark

--
Mark Fasheh
Senior Software Developer, Oracle
[EMAIL PROTECTED]

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
http://oss.oracle.com/mailman/listinfo/ocfs2-devel

Reply via email to