Memory barrier not required in cached_block_group

2010-04-19 Thread Abhinav Duggal
Hi all, It seems like memory barrier is not required in cached_block_group.I am looking at kernel 2.6.34-rc2. cache_block_group(struct btrfs_block_group_cache *cache) { smp_mb(); if (cache->cached != BTRFS_CACHE_NO) return 0; } This function is called from btrfs_alloc_logged_file_extent

Possible race in btrfs

2010-03-23 Thread Abhinav Duggal
the fields? If not then is it better to make this field as atomic_t? I am looking for data races in btrfs and I discovered this using some kind of dynamic analysis. Thanks a lot. With Regards, Abhinav Duggal -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the

Help in understanding a memory barrier used in btrfs

2010-03-21 Thread Abhinav Duggal
Hi all, I am trying to understand the memory barriers used in btrfs_defrag_root in fs/btrfs/transaction.c.The kernel version I am looking at is 2.6.34-rc2. In this function   int btrfs_defrag_root(struct btrfs_root *root, int cacheonly)   {  struct btrfs_fs_info *info = root->fs_info;   int ret;