From: Darrick J. Wong Date: Fri, 26 Apr 2019 20:39:46 +0000 (-0500) Subject: libfrog: hoist bitmap out of scrub X-Git-Tag: v5.0.0-rc1~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b06ebacfb05ffc94cc6b66997192510b3c1b76f7;p=thirdparty%2Fxfsprogs-dev.git libfrog: hoist bitmap out of scrub Move the bitmap code to libfrog so that we can use bitmaps in xfs_repair. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen Signed-off-by: Eric Sandeen --- diff --git a/scrub/bitmap.h b/include/bitmap.h similarity index 87% rename from scrub/bitmap.h rename to include/bitmap.h index e9746a124..e29a4335f 100644 --- a/scrub/bitmap.h +++ b/include/bitmap.h @@ -3,8 +3,8 @@ * Copyright (C) 2018 Oracle. All Rights Reserved. * Author: Darrick J. Wong */ -#ifndef XFS_SCRUB_BITMAP_H_ -#define XFS_SCRUB_BITMAP_H_ +#ifndef LIBFROG_BITMAP_H_ +#define LIBFROG_BITMAP_H_ struct bitmap { pthread_mutex_t bt_lock; @@ -21,4 +21,4 @@ bool bitmap_test(struct bitmap *bmap, uint64_t start, bool bitmap_empty(struct bitmap *bmap); void bitmap_dump(struct bitmap *bmap); -#endif /* XFS_SCRUB_BITMAP_H_ */ +#endif /* LIBFROG_BITMAP_H_ */ diff --git a/libfrog/Makefile b/libfrog/Makefile index dbff9596e..f5a0539b3 100644 --- a/libfrog/Makefile +++ b/libfrog/Makefile @@ -12,6 +12,7 @@ LT_AGE = 0 CFILES = \ avl64.c \ +bitmap.c \ convert.c \ crc32.c \ fsgeom.c \ diff --git a/scrub/bitmap.c b/libfrog/bitmap.c similarity index 100% rename from scrub/bitmap.c rename to libfrog/bitmap.c diff --git a/scrub/Makefile b/scrub/Makefile index 6e155c2cd..f4710d3ed 100644 --- a/scrub/Makefile +++ b/scrub/Makefile @@ -31,7 +31,6 @@ endif endif # scrub_prereqs HFILES = \ -bitmap.h \ common.h \ counter.h \ disk.h \ @@ -48,7 +47,6 @@ vfs.h \ xfs_scrub.h CFILES = \ -bitmap.c \ common.c \ counter.c \ disk.c \