looks like a bug
Hi!
root@stb1:~/src# cat a.c #include <stdio.h> #include <unistd.h> #include <fcntl.h> #include <string.h> #include <errno.h>
int main(void) {
int fd, rc;
char *s;
struct stat buf;
fd = open("/mnt/aaa",O_RDWR|O_CREAT|O_APPEND,0666); if (fd == -1) {printf("Unable to open test file!\n"); exit(0);
}
rc = fstat(fd,&buf);
if (rc != 0) {
s = strerror(errno);printf("stat rc == %d\nError == '%s'\n",rc,s); exit(0);
}
rc = write(fd, "kuku", 4);
if (rc == -1) {
s = strerror(errno);printf("write rc == %d\nError == '%s'\n",rc,s); }
}
root@stb1:~/src# gcc a.c a.c: In function ‘main’: a.c:16:7: warning: incompatible implicit declaration of built-in function ‘exit’ a.c:22:7: warning: incompatible implicit declaration of built-in function ‘exit’ root@stb1:~/src# mount -t ceph 10.5.51.230:/ /mnt root@stb1:~/src# ./a.out write rc == -1 Error == 'Bad file descriptor' root@stb1:~/src# root@stb1:~/src# uname -a Linux stb1 3.0.0-rc6-ufm #1 SMP Sun Jul 10 14:12:13 EEST 2011 x86_64 x86_64 x86_64 GNU/Linux root@stb1:~/src#
=========
P.S. In cfuse a.out just hang.
WBR,
Fyodor.
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Fyodor,
Which commits are you running on the server and client side? There was a bad protocol version number in master branch for several days (fixed now), and some open intent stuff in ceph-client.git that wasn't quite right a bit further back.
thanks-
sage
Quoted 63 lines · Fyodor Ustinov
Hi!
root@stb1:~/src# cat a.c #include <stdio.h> #include <unistd.h> #include <fcntl.h> #include <string.h> #include <errno.h>int main(void) {
int fd, rc;
char *s;
struct stat buf;fd =
open("/mnt/aaa",O_RDWR|O_CREAT|O_APPEND,0666); if (fd == -1) {printf("Unable to open test file!\n"); exit(0);
}
rc =fstat(fd,&buf);
if (rc != 0) {
s = strerror(errno);printf("stat rc == %d\nError == '%s'\n",rc,s); exit(0);
}
rc =write(fd, "kuku", 4);
if (rc == -1) {
s = strerror(errno);printf("write rc == %d\nError == '%s'\n",rc,s); }}
root@stb1:~/src# gcc a.c a.c: In function ?main?: a.c:16:7: warning: incompatible implicit declaration of built-in function ?exit? a.c:22:7: warning: incompatible implicit declaration of built-in function ?exit? root@stb1:~/src# mount -t ceph 10.5.51.230:/ /mnt root@stb1:~/src# ./a.out write rc == -1 Error == 'Bad file descriptor' root@stb1:~/src# root@stb1:~/src# uname -a Linux stb1 3.0.0-rc6-ufm #1 SMP Sun Jul 10 14:12:13 EEST 2011 x86_64 x86_64 x86_64 GNU/Linux root@stb1:~/src#=========
P.S. In cfuse a.out just hang.WBR,
Fyodor.--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 9 lines · Sage Weil
Hi Fyodor,
Which commits are you running on the server and client side? There was a bad protocol version number in master branch for several days (fixed now), and some open intent stuff in ceph-client.git that wasn't quite right a bit further back.
thanks-
sage
If I do not specify the version it means that I'm using the latest available official version for ubuntu from your aptitude repository.
WBR,
Fyodor.
Quoted 8 lines · Fyodor Ustinov
Quoted 7 lines · Sage Weil
Hi Fyodor,
Which commits are you running on the server and client side? There was a bad protocol version number in master branch for several days (fixed now), and some open intent stuff in ceph-client.git that wasn't quite right a bit further back.
Quoted 5 lines
Quoted 2 lines
thanks-
sageIf I do not specify the version it means that I'm using the latest available official version for ubuntu from your aptitude repository.
Okay, I found the problem (file mode calculation when O_APPEND is present). There is a fix pushed to the stable branch of ceph.git (for mds) and to the for-linus branch of the kernel ceph-client.git. You need both to behave.
What workload turned this up?
Thanks-
sage
Quoted 5 lines · Sage Weil
Okay, I found the problem (file mode calculation when
O_APPENDis present). There is a fix pushed to the stable branch of ceph.git (for mds) and to the for-linus branch of the kernel ceph-client.git. You need both to behave.
Ok, I wait this. :)
Quoted 1 line
What workload turned this up?
I try restore from bacula backup system and got return error.
strace show:
open("/bacula/amanda.servers.dcv-sd.Restore-hvds0.servers.dcv.2011-07-19_10.59.12_09.6.bootstrap", O_RDWR|O_CREAT|O_APPEND, 0666) = 5fstat(5, {st_mode=S_IFREG|0640, st_size=0, ...}) = 0
write(5, "Storage=\"File-hvds0.servers.dcv\"\nVolume=\"hvds0.servers.dcv-daily-20110716-000509\"\nMediaType=\"File-hvds0.servers.dcv\"\nDevice=\"FileStorage-hvds0.servers.dcv\"\nVolSessionId=6\nVolSessionTime=1310991740\nVolAddr=46902909-47361240\nFileIndex=17\nCount=1\n", 244) = -1 EBADF (Bad file descriptor)
After that I wrote test and saw the same.
WBR,
Fyodor.
Quoted 12 lines · Sage Weil
Quoted 11 lines · Fyodor Ustinov
Quoted 9 lines · Sage Weil
Hi Fyodor,
Which commits are you running on the server and client side? There was a bad protocol version number in master branch for several days (fixed now), and some open intent stuff in ceph-client.git that wasn't quite right a bit further back.
thanks-
sage
Quoted 7 lines
Quoted 2 lines
If I do not specify the version it means that I'm using the latest available official version for ubuntu from your aptitude repository.
Okay, I found the problem (file mode calculation when
O_APPENDis present). There is a fix pushed to the stable branch of ceph.git (for mds) and to the for-linus branch of the kernel ceph-client.git. You need both to behave.
Okay, after a bit of cleanup I've pushed final fixes for this to the server side ceph.git and for-linus branch of the kernel client. I'll send that to Linus today, hopefully in time for 3.0.
Mowang, this fixes the same bug you were seeing as well (O_RDWR | O_APPEND).
Thanks!
sage