Skip to content

Commit

Permalink
debugging statements added
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Caputi committed Feb 22, 2016
1 parent e8c91f9 commit acc58fc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/dattobd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1886,7 +1886,7 @@ static int bio_make_read_clone(struct bio_set *bs, struct tracing_params *tp, st
new_bio = bio_alloc_bioset(GFP_NOIO, pages, bs);
if(!new_bio){
ret = -ENOMEM;
LOG_ERROR(ret, "error allocating bio clone");
LOG_ERROR(ret, "error allocating bio clone - bs = %p", bs);
goto bio_make_read_clone_error;
}

Expand Down Expand Up @@ -2330,7 +2330,7 @@ static int snap_trace_bio(struct snap_device *dev, struct bio *bio){
tp->bio_sects[i].sect = bio_sector(new_bio);
tp->bio_sects[i].size = bio_size(new_bio);

if(bytes / PAGE_SIZE < pages){
if(bytes / PAGE_SIZE < pages || i){
if(i == 0) PRINT_BIO("split orig bio", bio);
PRINT_BIO("\tclone bio", new_bio);
}
Expand Down Expand Up @@ -2701,6 +2701,8 @@ static int __tracer_setup_base_dev(struct snap_device *dev, char *bdev_path){
dev->sd_size = get_capacity(dev->sd_base_dev->bd_disk);
}

LOG_DEBUG("bdev size = %llu, offset = %llu", (unsigned long long)dev->sd_size, (unsigned long long)dev->sd_sect_off);

return 0;

tracer_setup_base_dev_error:
Expand Down Expand Up @@ -2873,6 +2875,7 @@ static int __tracer_setup_snap(struct snap_device *dev, unsigned int minor, stru
int ret;

//allocate the bio_set
LOG_DEBUG("creating bioset");
dev->sd_bioset = bioset_create(BIO_SET_SIZE, 0);
if(!dev->sd_bioset){
ret = -ENOMEM;
Expand Down

0 comments on commit acc58fc

Please sign in to comment.