From owner-freebsd-stable@FreeBSD.ORG Sun Oct 30 14:21:25 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C254116A41F for ; Sun, 30 Oct 2005 14:21:25 +0000 (GMT) (envelope-from nike_d@cytexbg.com) Received: from mail.interbgc.com (mx02.interbgc.com [217.9.224.227]) by mx1.FreeBSD.org (Postfix) with SMTP id B94E343D45 for ; Sun, 30 Oct 2005 14:21:23 +0000 (GMT) (envelope-from nike_d@cytexbg.com) Received: (qmail 72865 invoked from network); 30 Oct 2005 14:21:20 -0000 Received: from nike_d@cytexbg.com by keeper.interbgc.com by uid 1002 with qmail-scanner-1.14 (uvscan: v4.2.40/v4374. spamassassin: 2.63. Clear:SA:0(-2.5/8.0):. Processed in 4.625836 secs); 30 Oct 2005 14:21:20 -0000 X-Spam-Status: No, hits=-2.5 required=8.0 Received: from unknown (HELO tormentor.totalterror.net) (213.240.205.57) by mx02.interbgc.com with SMTP; 30 Oct 2005 14:21:15 -0000 Received: (qmail 38326 invoked from network); 30 Oct 2005 14:21:12 -0000 Received: from qmail by qscan (mail filter); 30 Oct 2005 14:21:12 +0000 Received: from unknown (HELO ?10.0.0.3?) (ndenev@10.0.0.3) by tormentor.totalterror.net with (DHE-RSA-AES256-SHA encrypted) SMTP; 30 Oct 2005 14:21:12 -0000 Message-ID: <4364D6D3.6010508@cytexbg.com> Date: Sun, 30 Oct 2005 16:21:07 +0200 From: Niki Denev User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-stable@freebsd.org References: <436311C2.6090708@cytexbg.com> <20051029061513.GG36235@tnn.dglawrence.com> <43631721.50504@cytexbg.com> <4363E333.5000803@cytexbg.com> In-Reply-To: <4363E333.5000803@cytexbg.com> X-Enigmail-Version: 0.92.1.0 OpenPGP: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: sendfile + non local filesystem + lighttpd = EOPNOTSUPP X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Oct 2005 14:21:25 -0000 Niki Denev wrote: > > > I get the same behaviour also with 6.0-RC1 (cvsupped an hour ago) > Ok, In this awful piece of code created for testing purposes if i set FILETOSEND to local file it works ok, but if the file is located on smbfs sendfile returns "Operation not supported". If this is not a bug, maybe it should be documented? (also the error code that sendfile returns) (again, the machine is 6.0-RC1 cvsupped yesterday, with SMP kernel) ---[sendfile_test.c]--- #include #include #include #include #include #include #include #include #include #include #include #include #include #define FILETOSEND "/var/log/messages" //#define FILETOSEND "/mnt/smb/somefile.dat" int main() { int fd; int sock; int result; struct sockaddr_in sa; fd = open(FILETOSEND, O_RDONLY); sock = socket(PF_INET, SOCK_STREAM, 0); memset(&sa, 0, sizeof(sa)); sa.sin_family = AF_INET; sa.sin_port = htons(9); /* discard enabled in inetd */ inet_aton("127.0.0.1", &sa.sin_addr); printf("connecting socket ... "); errno = 0; result = connect(sock, (struct sockaddr *)&sa, sizeof(sa)); printf("%s\n", errno?strerror(errno):"ok"); printf("calling sendfile ... "); errno = 0; result = sendfile(fd, sock, 0, 0, NULL, NULL, 0); printf("%s\n", errno?strerror(errno):"ok"); close(fd); close(sock); return(0); } ---[end of sendfile_test.c]---