summaryrefslogtreecommitdiff
path: root/lib/ext2fs/bmap64.h
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2011-06-10 17:55:09 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-06-10 17:55:09 -0400
commit94968e749b224f01fbb9009ed0285e55f6441784 (patch)
tree3b6252f26e18d728fece57ffac89a210f1956a58 /lib/ext2fs/bmap64.h
parent1afb468b9a80031b39eab37272709f45727fb221 (diff)
downloade2fsprogs-94968e749b224f01fbb9009ed0285e55f6441784.tar.gz
libext2fs: teach bitmap functions about bigalloc/cluster
This patch makes the following changes: * ext2fs_allocate_block_bitmap() now allocates a bitmap with cluster granularity for bigalloc file systems. For mke2fs and e2fsck, a newly added function, ext2fs_allocate_subcluster_bitmap() allocates a bitmap with block granularity (even for bigalloc file systems). The newly added function ext2fs_get_bitmap_granularity() will return the number of bits (log2) of the granularity used by the bitmap. * The ext2fs_{mark,unmark,test}_block_bitmap2() functions will shift their passed-in argument by log2(cluster_ganularity) bits right. This means that the arguments for the single-argument bitmap functions will be interpreted with block granluarity, since this minimizes code changes in the rest of the code base. * The ext2fs_{get,set}_block_bitmap_range() functions will interpret their arguments in cluster granularity. This is a bit inconsistent, but the caller of those functions will need to be taught about the subtleties of clusters for bigalloc file systems. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'lib/ext2fs/bmap64.h')
-rw-r--r--lib/ext2fs/bmap64.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ext2fs/bmap64.h b/lib/ext2fs/bmap64.h
index b0aa84c1..30565440 100644
--- a/lib/ext2fs/bmap64.h
+++ b/lib/ext2fs/bmap64.h
@@ -16,6 +16,7 @@ struct ext2fs_struct_generic_bitmap {
int flags;
__u64 start, end;
__u64 real_end;
+ int cluster_bits;
char *description;
void *private;
errcode_t base_error_code;