[sheepdog] [PATCH] sheep journal:fix the parameter type of 'size' passed to 'int prealloc(int fd, uint32_t size)'

Liu Yuan namei.unix at gmail.com
Mon Apr 13 07:48:14 CEST 2015


On Thu, Apr 09, 2015 at 03:30:21PM +0800, 张灿群 wrote:
> dear,
> When i start sheep daemon with journal,the daemon couldn't start.
> command:
> sheep -j dir=/sdac,size=160G,skip=1  -l dir=/var/log/,level=err,format=server  /sdad/ -n -D -y 10.64.0.38 -p 7000 -c zookeeper:host-0-31:2181,host-0-32:2181,host-0-38:2181
> debugino:
> Apr 09 14:49:35  ERROR [main] prealloc(120) failed to preallocate space, Invalid argument
> Apr 09 14:49:35  ERROR [main] prealloc(121) size is 0    // I printf the value
> Apr 09 14:49:35  ERROR [main] create_journal_file(73) prealloc journal_file0 Invalid argument
> 
> 
> so the value of 'size' was corrupted when the type changed.
> 

Thanks for your patch, but could you please submit the patch by git?

You can refer to https://github.com/sheepdog/sheepdog/wiki/Submit-a-patch

Thanks,
Yuan




More information about the sheepdog mailing list