[sheepdog] [PATCH 1/2] sheep: add nosync for testing purpose
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Wed Feb 6 06:26:07 CET 2013
At Tue, 5 Feb 2013 15:41:26 +0800,
Liu Yuan wrote:
>
> From: Liu Yuan <tailai.ly at taobao.com>
>
> This is only useful for testing, users are not expected to use it.
>
> Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
> ---
> sheep/plain_store.c | 3 ++-
> sheep/sheep.c | 4 ++++
> sheep/sheep_priv.h | 1 +
> 3 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/sheep/plain_store.c b/sheep/plain_store.c
> index fe08419..53dea60 100644
> --- a/sheep/plain_store.c
> +++ b/sheep/plain_store.c
> @@ -25,7 +25,8 @@ static int get_open_flags(uint64_t oid, bool create, int fl)
> int flags = O_DSYNC | O_RDWR;
>
> if ((fl & SD_FLAG_CMD_CACHE && is_disk_cache_enabled()) ||
> - uatomic_is_true(&sys->use_journal))
> + uatomic_is_true(&sys->use_journal) ||
> + sys->nosync == true)
> flags &= ~O_DSYNC;
>
> /*
> diff --git a/sheep/sheep.c b/sheep/sheep.c
> index a9b9bdb..06ce7bd 100644
> --- a/sheep/sheep.c
> +++ b/sheep/sheep.c
> @@ -52,6 +52,7 @@ static struct sd_option sheep_options[] = {
> {'i', "ioaddr", true, "use separate network card to handle IO requests"},
> {'j', "journal", true, "use jouranl file to log all the write operations"},
> {'l', "loglevel", true, "specify the level of logging detail"},
> + {'n', "nosync", true, "drop SYNC for write, only used for testing purpose"},
true should be false. This option doesn't require an argument.
Thanks,
Kazutaka
More information about the sheepdog
mailing list