mutex_unlock(&fs_info->ro_block_group_mutex);
btrfs_end_transaction(trans);
- if (ret)
+++++++++++ /*
+++++++++++ * The group is read-only: close and drain its open stripe runs. An
+++++++++++ * allocation racing with the read-only transition either installed
+++++++++++ * its run before this (closed and drained here), or observes ->ro
+++++++++++ * under the stripe_run_lock and backs out.
+++++++++++ */
+++++++++++ if (!ret)
+++++++++++ btrfs_retire_block_group_stripes(cache);
++++++++++++ else
++++++ +++++ btrfs_bg_unblock_nocow(cache);
return ret;
}
/* No way to verify P/Q as they are not covered by data csum. */
if (stripe_nr >= rbio->nr_data)
return 0;
+++++++++ +
+++++++++ ++ /* No csum for this sector, nothing to verify against. */
+++++++++ ++ if (!test_bit(stripe_nr * rbio->stripe_nsectors + sector_nr,
+++++++++ ++ rbio->csum_bitmap))
+++++++++ ++ return 0;
+++++++++ ++
/*
* If we're rebuilding a read, we have to use pages from the
* bio list if possible.
int btrfs_alloc_stripe_hash_table(struct btrfs_fs_info *info);
void btrfs_free_stripe_hash_table(struct btrfs_fs_info *info);
+++++++++ ++void btrfs_raid56_uncache_range(struct btrfs_fs_info *info, u64 start, u64 len);
+++++++++++ void btrfs_flush_parked_rbios(struct btrfs_fs_info *fs_info, u64 start,
+++++++++++ u64 num_bytes, bool force);
#endif