]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: always store the mirror we read the eb from
authorJosef Bacik <josef@redhat.com>
Mon, 16 Apr 2012 13:42:26 +0000 (09:42 -0400)
committerDavid Sterba <dsterba@suse.cz>
Wed, 18 Apr 2012 17:22:30 +0000 (19:22 +0200)
commitbf056f15e7d60081e5fc626e78c362c309ef88d1
treec7b301296750707f47487f508398f1baec81f48b
parented2afd08591df168c317b6878c00a56740aabc2b
Btrfs: always store the mirror we read the eb from

A user reported a panic where we were trying to fix a bad mirror but the
mirror number we were giving was 0, which is invalid.  This is because we
don't do the transid verification until after the read, so as far as the
read code is concerned the read was a success.  So instead store the mirror
we read from so that if there is some failure post read we know which mirror
to try next and which mirror needs to be fixed if we find a good copy of the
block.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
fs/btrfs/disk-io.c
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h
fs/btrfs/inode.c