/*
* Copyright 2014 Cray Inc, all rights reserved.
+ *
+ * Copyright (c) 2016, Intel Corporation.
+ *
* Author: Frank Zago.
*
* A few portions are extracted from llapi_layout_test.c
* file/directory */
static void helper_fid2path(const char *filename, int fd)
{
- lustre_fid fid;
- lustre_fid fid2;
- lustre_fid fid3;
+ struct lu_fid fid;
+ struct lu_fid fid2;
+ struct lu_fid fid3;
char fidstr[FID_LEN + 1];
char path1[PATH_MAX];
char path2[PATH_MAX];
{
int rc;
int fd;
- lustre_fid fid;
+ struct lu_fid fid;
char fidstr[FID_LEN + 1];
char path[PATH_MAX];
long long recno;
int fd;
int fd2;
int fd3;
- lustre_fid fid;
+ struct lu_fid fid;
/* Against a volatile file */
rc = mkdir(mainpath, 0);
/* Create subdirectories as long as we can. Each new subdir is
* "/x", so we need at least 3 characters left in testpath. */
while (len <= sizeof(testpath) - 3) {
- strncat(testpath, "/x", 2);
+ strncat(testpath, "/x", sizeof(testpath) - 1);
len += 2;
bool seen;
} links[num_links];
char buf[PATH_MAX];
- char buf2[PATH_MAX];
- lustre_fid fid;
+ char buf2[PATH_MAX * 2];
+ struct lu_fid fid;
char fidstr[FID_LEN + 1];
int rc;
int i;
* type). mainpath must exist. */
static void help_test40(void)
{
- lustre_fid parent_fid;
- lustre_fid fid2;
+ struct lu_fid parent_fid;
+ struct lu_fid fid2;
char buf[PATH_MAX];
int rc;
const int num_links = 100;
struct {
char subdir[PATH_MAX];
- lustre_fid subdir_fid;
+ struct lu_fid subdir_fid;
char filename[PATH_MAX];
bool seen;
} links[num_links];
int i;
int fd;
int linkno;
- lustre_fid parent_fid;
+ struct lu_fid parent_fid;
/* Create the containing directory. */
rc = mkdir(mainpath, 0);