summaryrefslogtreecommitdiff
path: root/free-space-cache.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2014-05-28 11:25:24 +0200
committerDavid Sterba <dsterba@suse.cz>2014-10-10 10:38:31 +0200
commit2c0e02a568c7db99922e9080407f8fc22d1991bd (patch)
treefdb0acbbc03262f500d82814584e6af2c0703132 /free-space-cache.h
parent6c9caa4dd60b94e95ac3c8e3e1bcec228fc0b435 (diff)
btrfs-progs: make free space checker work on non-4k sectorsize filesystems
The value of sector for space cache was hardcoded to 4k, and used to calculate bitmap sizes. In kernel, the BITS_PER_BITMAP is derived from PAGE_CACHE_SIZE which is not available for userspace, that can also deal with filesystem of varying sectorsize. Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'free-space-cache.h')
-rw-r--r--free-space-cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/free-space-cache.h b/free-space-cache.h
index d2862586..ec213da6 100644
--- a/free-space-cache.h
+++ b/free-space-cache.h
@@ -36,6 +36,7 @@ struct btrfs_free_space_ctl {
int unit;
u64 start;
void *private;
+ u32 sectorsize;
};
int load_free_space_cache(struct btrfs_fs_info *fs_info,