Re: [PATCH] Btrfs: don't BUG_ON() in btrfs_num_copies

2013-04-24 Thread David Sterba
On Tue, Apr 23, 2013 at 10:54:53AM -0400, Josef Bacik wrote: > A user sent me a btrfs-image that was panicing because of some corruption. > This > is because we pass in a bogus value to btrfs_num_copies, and it panics. > Instead > just return 1. We only call btrfs_num_copies to see if there ar

[PATCH] Btrfs: don't BUG_ON() in btrfs_num_copies

2013-04-23 Thread Josef Bacik
A user sent me a btrfs-image that was panicing because of some corruption. This is because we pass in a bogus value to btrfs_num_copies, and it panics. Instead just return 1. We only call btrfs_num_copies to see if there are other copies to try and read for things, so if we just return 1 it will