LEAVE();
}
-static int check_file_size(char *file, off_t size)
+static int check_file_size(char *file, long long size)
{
struct stat statbuf;
return(1);
}
if (statbuf.st_size != size) {
- printf("size of %s: %ld != %lld\n", file, statbuf.st_size, (unsigned long long )size);
+ printf("size of %s: %ld != %lld\n", file, statbuf.st_size, size);
return(-1);
}
return 0;
char path[MAX_PATH_LENGTH];
int fd;
long long ret;
- loff_t off;
+ long long off;
ENTRY("handle seek > 2GB");
snprintf(path, MAX_PATH_LENGTH, "%s/f%s", lustre_path, name);
ret = lseek(fd, -buf_size + 2, SEEK_CUR);
if (ret != off) {
printf("relative seek error for %d %llu != %llu\n",
- -buf_size + 2, ret, (unsigned long long) off);
+ -buf_size + 2, ret, off);
if (ret == -1)
perror("relative seek");
return -1;
off = 2048ULL * 1024 * 1024, SEEK_SET;
ret = lseek(fd, off, SEEK_SET);
if (ret != off) {
- printf("seek 2GB error for %llu != %llu\n", ret, (unsigned long long) off);
+ printf("seek 2GB error for %llu != %llu\n", ret, off);
if (ret == -1)
perror("seek 2GB");
return -1;
loff_t off_array[] = {1, 17, 255, 258, 4095, 4097, 8191,
1024*1024*1024*1024ULL};
int i;
- loff_t offset;
+ long long offset;
ENTRY("4k un-aligned i/o sanity");
for (i = 0; i < sizeof(off_array)/sizeof(loff_t); i++) {
offset = off_array[i];
printf("16 per xfer(total %d), offset %10lld...\t",
- _npages, (unsigned long long) offset);
+ _npages, offset);
if (pages_io(16, offset) != 0)
return 1;
}
{
char file[MAX_PATH_LENGTH] = "";
int fd;
- off_t size;
+ long long size;
int result;
ENTRY("truncate() should truncate file to proper length");
}
/* for O_DIRECTORY */
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
+#endif
#define STRIPE_SIZE (2048 * 2048)
#define STRIPE_OFFSET 0
LEAVE();
}
-
extern void __liblustre_setup_(void);
extern void __liblustre_cleanup_(void);