Skip to content

Commit

Permalink
Miscellaneous fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Cozzette committed Dec 15, 2011
1 parent 8f7b8fa commit d9b3d61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ OBJS := $(TARGET:=.o)

CC := gcc
CFLAGS := -g -pedantic -Wall -Wextra -std=c99 -I$(HOME)/src/BUSE
LDFLAGS := -lbuse -lssl -L$(HOME)/src/BUSE
LDFLAGS := -lbuse -lcrypto -L$(HOME)/src/BUSE

.PHONY: all clean
all: $(TARGET)
Expand Down
6 changes: 2 additions & 4 deletions dedup.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ typedef struct hash_index_entry hash_bucket[ENTRIES_PER_BUCKET];

struct hash_log_entry {
uint64_t pbn;
uint64_t ref_count;
uint32_t ref_count;
};

/* Forward declaration */
Expand Down Expand Up @@ -377,8 +377,6 @@ static int read_one_block(void *buf, uint32_t len, uint64_t offset)
assert(err == FINGERPRINT_SIZE);

if (fingerprint_is_zero(fingerprint)) {
/* Fill this virtual block with zeros. */
dedup_write(zeros, BLOCK_SIZE, vbn);
memset(buf, 0, len);
return 0;
}
Expand Down Expand Up @@ -500,7 +498,7 @@ int main(int argc, char *argv[])
.disc = dedup_disc,
.flush = dedup_flush,
.trim = dedup_trim,
.size = SIZE
.size = NVIRT_BLOCKS * 4096,
};

buse_main(argc, argv, &bop, NULL);
Expand Down

0 comments on commit d9b3d61

Please sign in to comment.