Hello,
I have a problem when executing a simple problem with a writev over
pvfs2, where i can't include more than 1 entry for the iovec that i pass
to writev. Otherwise it gives an Invalid argument error for writev.
Im using pvfs-2.7.1.
22 servers, 29 clients, 1 metadataserver
If I execute with number of entries in iovec as 1, it works fine, the
problem is when im executing with more than that.
using pwrite works fine though.
Simple program like:
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <sys/uio.h>
int main(int argc, char** argv)
{
struct iovec iov[3];
ssize_t nr;
int fd, i;
char *buf[] = {
"The term buccaneer comes from the word boucan.\n",
"A boucan is a wooden frame used for cooking meat.\n",
"Buccaneer is the West Indies name for a pirate.\n" };
fd = open ("buccaneer.txt", O_WRONLY | O_CREAT | O_TRUNC);
if (fd == -1) {
perror ("open");
return 1;
}
/* fill out three iovec structures */
for (i = 0; i < 3; i++) {
iov[i].iov_base = buf[i];
iov[i].iov_len = strlen (buf[i]);
}
/* with a single call, write them all out */
nr = writev (fd, iov, 3);
if (nr == -1) {
perror ("writev");
return 1;
}
printf ("wrote %d bytes\n", nr);
if (close (fd)) {
perror ("close");
return 1;
}
return 0;
}
_______________________________________________
Pvfs2-users mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-users