]> Git Repo - linux.git/commit
Btrfs: do not mark the chunk as readonly if in degraded mode
authorJosef Bacik <[email protected]>
Wed, 27 Jan 2010 02:07:59 +0000 (02:07 +0000)
committerChris Mason <[email protected]>
Thu, 28 Jan 2010 21:20:39 +0000 (16:20 -0500)
commitf48b90756bd834dda852ff514f2690d3175b1f44
tree071f502edbe6668f9451d676ae3a0f751da5e105
parente3acc2a6850efff647f1c5458524eb3a8bcba20a
Btrfs: do not mark the chunk as readonly if in degraded mode

If a RAID setup has chunks that span multiple disks, and one of those
disks has failed, btrfs_chunk_readonly will return 1 since one of the
disks in that chunk's stripes is dead and therefore not writeable.  So
instead if we are in degraded mode, return 0 so we can go ahead and
allocate stuff.  Without this patch all of the block groups in a RAID1
setup will end up read-only, which will mean we can't add new disks to
the array since we won't be able to make allocations.

Signed-off-by: Josef Bacik <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
fs/btrfs/volumes.c
This page took 0.052654 seconds and 4 git commands to generate.