On Thu, Aug 12, 2010 at 08:46:54AM +0800, Cheng Renquan wrote:
> commit 607d432d referred a static int array defined in a header file,
> and a static inline function (btrfs_super_csum_size) using this array,
> the obvious result is every c file using that function would have
> a local copy of that int array, multiple c files referred multiple copies
> of that array:
> 
> $ nm fs/btrfs/btrfs.ko | grep btrfs_csum_sizes
> 0000010c r btrfs_csum_sizes
> 00000114 r btrfs_csum_sizes
> 000001c0 r btrfs_csum_sizes
> 000005a0 r btrfs_csum_sizes
> 
> the original commit has 4 c files called this static inline function, so
> till now there are still those 4 c files calling it, so there are 4 copies
> of btrfs_csum_sizes; but future code may call it in more c files;

Wow thats not my best work.  Change whatever you like, I think I'd rather just
not use a static array, but nothing better comes to mind atm, maybe a big switch
statement.  Thanks,

Josef
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to