All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fyodor Ustinov <ufm@ufm.su>
To: ceph-devel@vger.kernel.org
Subject: looks like a bug
Date: Tue, 19 Jul 2011 11:32:53 +0300	[thread overview]
Message-ID: <4E254135.70603@ufm.su> (raw)

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

             reply	other threads:[~2011-07-19  8:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-19  8:32 Fyodor Ustinov [this message]
2011-07-19 14:31 ` looks like a bug 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E254135.70603@ufm.su \
    --to=ufm@ufm.su \
    --cc=ceph-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.