Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:GA
btrfsprogs
btrfs-progs-convert-introduce-simple-range-stru...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File btrfs-progs-convert-introduce-simple-range-structure-for-convert-reserved-ranges.patch of Package btrfsprogs
From: Qu Wenruo <quwenruo@cn.fujitsu.com> Subject: btrfs-progs: convert: Introduce simple range structure for convert reserved ranges Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git Git-commit: 714cda6136b90b3159bed9f077ede9608fbca49f Patch-mainline: v4.10.1 Introduce a new strucutre, simple_range, to present one contingous range. Also, use such structure to define btrfs_reserved_ranges(), which convert and rollback will use. Suggested-by: David Sterba <dsterba@suse.com> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> [ split hunks to new file structure ] Signed-off-by: David Sterba <dsterba@suse.com> Acked-by: Jeff Mahoney <jeffm@suse.com> --- convert/source-fs.c | 6 ++++++ convert/source-fs.h | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+) --- a/btrfs-convert.c +++ b/btrfs-convert.c @@ -56,6 +56,29 @@ #define EXT2FS_B2C(fs, blk) (blk) #endif +/* + * Reresents a simple contiguous range. + * + * For multiple or non-contiguous ranges, use extent_cache_tree from + * extent-cache.c + */ +struct simple_range { + u64 start; + u64 len; +}; + +/* + * Simple range functions + * + * Get range end (exclusive) + */ +static inline u64 range_end(struct simple_range *range) +{ + return (range->start + range->len); +} + +extern struct simple_range btrfs_reserved_ranges[3]; + struct task_ctx { uint32_t max_copy_inodes; uint32_t cur_copy_inodes; @@ -377,6 +400,12 @@ fail: return -ENOSPC; } +struct simple_range btrfs_reserved_ranges[3] = { + { 0, SZ_1M }, + { BTRFS_SB_MIRROR_OFFSET(1), SZ_64K }, + { BTRFS_SB_MIRROR_OFFSET(2), SZ_64K } +}; + static int intersect_with_sb(u64 bytenr, u64 num_bytes) { int i;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor