Skip to content

Commit

Permalink
Merge from blktap2
Browse files Browse the repository at this point in the history
Periodic merge from blktap2 (https://github.com/xapi-project/blktap) to
ensure we're kept in sync.

Conflicts:
	.gitignore

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
  • Loading branch information
Thanos Makatos committed Jan 31, 2014
2 parents 7bb0ea7 + 57ee889 commit a95d653
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Expand Up @@ -53,6 +53,7 @@ Makefile.in
/vhd/lib/Makefile
/vhd/lib/test/Makefile
/tapback/Makefile
mk/config.log

# dist output
/blktap-*.tar.*
Expand All @@ -69,5 +70,3 @@ tags

# diff/patch
*.orig

mk/config.log
4 changes: 2 additions & 2 deletions drivers/block-vhd.c
Expand Up @@ -1310,7 +1310,7 @@ reserve_new_block(struct vhd_state *s, uint32_t blk)
gap = (s->spp - ((s->next_db + s->bm_secs) % s->spp));

if (s->next_db + gap > UINT_MAX)
return (uint64_t)EIO << 32;
return (uint64_t)ENOSPC << 32;

s->bat.pbw_blk = blk;
s->bat.pbw_offset = s->next_db + gap;
Expand Down Expand Up @@ -1496,7 +1496,7 @@ allocate_block(struct vhd_state *s, uint32_t blk)
}

if (next_db > UINT_MAX)
return -EIO;
return -ENOSPC;

s->next_db = next_db;

Expand Down

0 comments on commit a95d653

Please sign in to comment.