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

* Re: looks like a bug
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Sage Weil @ 2011-07-19 14:31 UTC (permalink / raw)
  To: Fyodor Ustinov; +Cc: ceph-devel

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

On Tue, 19 Jul 2011, Fyodor Ustinov wrote:

> 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

* Re: looks like a bug
  2011-07-19 14:31 ` Sage Weil
@ 2011-07-19 14:39   ` Fyodor Ustinov
  2011-07-19 15:49     ` Sage Weil
  0 siblings, 1 reply; 6+ messages in thread
From: Fyodor Ustinov @ 2011-07-19 14:39 UTC (permalink / raw)
  To: Sage Weil; +Cc: ceph-devel

On 07/19/2011 05:31 PM, Sage Weil wrote:
> 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.

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

* Re: looks like a bug
  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
  0 siblings, 2 replies; 6+ messages in thread
From: Sage Weil @ 2011-07-19 15:49 UTC (permalink / raw)
  To: Fyodor Ustinov; +Cc: ceph-devel

On Tue, 19 Jul 2011, Fyodor Ustinov wrote:
> On 07/19/2011 05:31 PM, Sage Weil wrote:
> > 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.

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

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

* Re: looks like a bug
  2011-07-19 15:49     ` Sage Weil
@ 2011-07-19 16:28       ` Fyodor Ustinov
  2011-07-19 18:36       ` Sage Weil
  1 sibling, 0 replies; 6+ messages in thread
From: Fyodor Ustinov @ 2011-07-19 16:28 UTC (permalink / raw)
  To: Sage Weil; +Cc: ceph-devel

On 07/19/2011 06:49 PM, Sage Weil wrote:
>
> 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.

Ok, I wait this. :)
> 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) = 5
fstat(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.

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

* Re: looks like a bug
  2011-07-19 15:49     ` Sage Weil
  2011-07-19 16:28       ` Fyodor Ustinov
@ 2011-07-19 18:36       ` Sage Weil
  1 sibling, 0 replies; 6+ messages in thread
From: Sage Weil @ 2011-07-19 18:36 UTC (permalink / raw)
  To: Fyodor Ustinov, whooya.xxl; +Cc: ceph-devel

On Tue, 19 Jul 2011, Sage Weil wrote:
> On Tue, 19 Jul 2011, Fyodor Ustinov wrote:
> > On 07/19/2011 05:31 PM, Sage Weil wrote:
> > > 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.
> 
> 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.

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

^ 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.