[RFC] why define "static int btrfs_csum_sizes[]" in a header file (ctree.h) ?

2010-08-11 Thread Cheng Renquan
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: $

[063/111] Btrfs, fix memory leaks in error paths

2010-08-11 Thread Greg KH
2.6.32-stable review patch. If anyone has any objections, please let us know. -- From: Jiri Slaby commit 2423fdfb96e3f9ff3baeb6c4c78d74145547891d upstream. Stanse found 2 memory leaks in relocate_block_group and __btrfs_map_block. cluster and multi are not freed/assigned on al

concerns about non-root subvol snapshots

2010-08-11 Thread Kees Cook
Hi, I have some concerns about how brtfs access-checks the creation of subvol snapshots. AIUI, only the destination is validated, which basically results in a super-powerful hardlink ability. Normally, hardlinking is possible to individual files in the same way, which results in creation a small a

Re: PATCH 3/6 - direct-io: do not merge logically non-contiguous requests

2010-08-11 Thread Josef Bacik
On Wed, Aug 11, 2010 at 09:27:45AM -0400, Jeff Moyer wrote: > Josef Bacik writes: > > > So say blocksize of 4k, we do dio to 12k, the first time around > > dio->block_in_file is 0, we set dio->cur_page, and move on to the next > > page, and > > bio->block_in_file is set to 1. We find that dio->

Re: PATCH 3/6 - direct-io: do not merge logically non-contiguous requests

2010-08-11 Thread Jeff Moyer
Josef Bacik writes: > So say blocksize of 4k, we do dio to 12k, the first time around > dio->block_in_file is 0, we set dio->cur_page, and move on to the next page, > and > bio->block_in_file is set to 1. We find that dio->cur_page is set, so we do > dio_send_cur_page(). Since !dio->bio we cre

Fixing raid1 boot

2010-08-11 Thread Jari Seppälä
I have av machine which has btrfs raid1 root which I cannot boot anymore. The problem seems to be related to "verify_parent_transid" messages already discussed on this mailing list. However, there is no actual help yet available to my case. Disks /dev/sda1 and /dev/sdb1 as /boot, 100Mb, ext3, man