[Sheepdog] [PATCH 1/2] farm: clean up farm_end_recover()
Liu Yuan
namei.unix at gmail.com
Tue May 1 10:11:46 CEST 2012
On 04/30/2012 07:05 PM, Liu Yuan wrote:
> From: Liu Yuan <tailai.ly at taobao.com>
>
> - print what the epoch we reach instead of 'iocb->epoch - 1'
> - use epoch instead of 'iocb->epoch - 1'
>
> Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
> ---
> sheep/farm/farm.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sheep/farm/farm.c b/sheep/farm/farm.c
> index 10671ba..6e9e748 100644
> --- a/sheep/farm/farm.c
> +++ b/sheep/farm/farm.c
> @@ -520,14 +520,14 @@ static int farm_end_recover(struct siocb *iocb)
>
> if (epoch == 0)
> return SD_RES_SUCCESS;
> - dprintf("epoch %d\n", epoch);
> + dprintf("epoch %d\n", iocb->epoch);
> if (trunk_file_write_recovery(trunk_sha1) < 0)
> return SD_RES_EIO;
>
> if (snap_file_write(epoch, trunk_sha1, snap_sha1, 0) < 0)
> return SD_RES_EIO;
>
> - if (snap_log_write(iocb->epoch - 1, snap_sha1, 0) < 0)
> + if (snap_log_write(epoch, snap_sha1, 0) < 0)
> return SD_RES_EIO;
>
> return SD_RES_SUCCESS;
Applied both.
Thanks,
Yuan
More information about the sheepdog
mailing list