All of lore.kernel.org
 help / color / mirror / Atom feed
* looks like a bug
@ 2011-07-19  8:32 Fyodor Ustinov
  2011-07-19 14:31 ` Sage Weil
  0 siblings, 1 reply; 6+ messages in thread
From: Fyodor Ustinov @ 2011-07-19  8:32 UTC (permalink / raw)
  To: ceph-devel

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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-07-19 18:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-19  8:32 looks like a bug Fyodor Ustinov
2011-07-19 14:31 ` Sage Weil
2011-07-19 14:39   ` Fyodor Ustinov
2011-07-19 15:49     ` Sage Weil
2011-07-19 16:28       ` Fyodor Ustinov
2011-07-19 18:36       ` Sage Weil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.