On Sat, May 21, 2011 at 1:35 PM, MORITA Kazutaka <morita.kazut...@lab.ntt.co.jp> wrote: > +static int sd_prealloc(uint32_t vid, int64_t vdi_size) > +{ > + int fd, ret; > + SheepdogInode *inode; > + char *buf; > + unsigned long idx, max_idx; [...] > + max_idx = (vdi_size + SD_DATA_OBJ_SIZE - 1) / SD_DATA_OBJ_SIZE; > + > + for (idx = 0; idx < max_idx; idx++) {
Do you want to use uint64_t here instead of unsigned long, which may be too small on 32-bit hosts? Stefan