Skip to content

Commit

Permalink
v2 review - optimize source code
Browse files Browse the repository at this point in the history
* code from ctrl.c moved to main.c
* remove params.h
* version.h available only for standalone version
  • Loading branch information
SergeiShtepa committed Dec 19, 2022
1 parent 370779b commit 9467808
Show file tree
Hide file tree
Showing 11 changed files with 588 additions and 625 deletions.
1 change: 0 additions & 1 deletion module/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ include ${M}/Makefile-*
blksnap-y := \
cbt_map.o \
chunk.o \
ctrl.o \
diff_io.o \
diff_area.o \
diff_buffer.o \
Expand Down
4 changes: 3 additions & 1 deletion module/cbt_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
#endif
#include "memory_checker.h"
#include "cbt_map.h"
#include "params.h"
#ifdef STANDALONE_BDEVFILTER
#include "log.h"
#endif

extern int tracking_block_minimum_shift;
extern int tracking_block_maximum_count;

#ifndef HAVE_BDEV_NR_SECTORS
static inline sector_t bdev_nr_sectors(struct block_device *bdev)
{
Expand Down
3 changes: 2 additions & 1 deletion module/chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <linux/dm-io.h>
#include <linux/sched/mm.h>
#include "memory_checker.h"
#include "params.h"
#include "chunk.h"
#include "diff_io.h"
#include "diff_buffer.h"
Expand All @@ -15,6 +14,8 @@
#include "log.h"
#endif

extern int chunk_maximum_in_cache;

#ifdef BLK_SNAP_DEBUG_CHUNK_IO
DEFINE_MUTEX(logging_lock);
#endif
Expand Down
Loading

0 comments on commit 9467808

Please sign in to comment.