[sheepdog] [PATCH 09/12] sheep/nfs: implement read/write nfs operation
Hitoshi Mitake
mitake.hitoshi at gmail.com
Wed Jan 29 03:28:22 CET 2014
At Wed, 29 Jan 2014 04:19:09 +0800,
Liu Yuan wrote:
>
> Now we support more bash command such as cp, mv, echo, cat ...
>
> Signed-off-by: Liu Yuan <namei.unix at gmail.com>
> ---
> include/util.h | 8 +++++
> sheep/nfs/fs.c | 41 +++++++++++++++++++++++++
> sheep/nfs/fs.h | 2 ++
> sheep/nfs/nfs.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++--
> sheep/nfs/nfs.h | 2 ++
> sheep/nfs/nfsd.c | 3 ++
> sheep/trace/trace.h | 8 -----
> 7 files changed, 141 insertions(+), 10 deletions(-)
>
> diff --git a/include/util.h b/include/util.h
> index 4b4fa27..9545270 100644
> --- a/include/util.h
> +++ b/include/util.h
> @@ -523,4 +523,12 @@ static inline long __must_check IS_ERR_OR_NULL(const void *ptr)
> return !ptr || IS_ERR_VALUE((unsigned long)ptr);
> }
>
> +static inline uint64_t clock_get_time(void)
> +{
> + struct timespec ts;
> +
> + clock_gettime(CLOCK_REALTIME, &ts);
> + return (uint64_t)ts.tv_sec * 1000000000LL + (uint64_t)ts.tv_nsec;
> +}
I needed to add -lrt to the ld flag for building this patchset,
because of the above clock_gettime() is required for build even if
tracing is not enabled. Adding the -lrt flag seems to be required.
Thanks,
Hitoshi
More information about the sheepdog
mailing list