From owner-freebsd-hackers@FreeBSD.ORG Thu May 12 11:40:27 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C88B1065688; Thu, 12 May 2011 11:40:27 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id B9BBA8FC1C; Thu, 12 May 2011 11:40:26 +0000 (UTC) Received: by wyf23 with SMTP id 23so1460180wyf.13 for ; Thu, 12 May 2011 04:40:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=AcekFGTmbYXb14AC2K3zMNpKTJAGOHfK1eUXO+j9Wz4=; b=QpRwbnsVchPuJSzIWxYTp4ad9KsRTcr3SkCB99Cnl2oOjel95o69yiLK5NBHkI/+eQ CLTFc0WOYnl1QsXRGDWQu8+ou18zqVVk63adGUW/zFr7d/wwUiwqt4HuQYcnDk9WTa51 kwzMSff+2/CYvRtL6GV68hMHtSQdeWV7tMPs4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=Z1b8wIRoqUqduo0+3pc/oE0qCp0uJZD/ChU6YUXk69wh+AWUT/fGAeXXoRAyF/zNCO EedeT3kpfILUWdpQtoZbToInk8V0SaLD8ojTXZNKxj08Vq3ZNaAl7A9fyAVwmbVDZk7I i0JC9vhx1FF54bxKFsGx21RLC0a580Dpaq0AE= MIME-Version: 1.0 Received: by 10.216.30.206 with SMTP id k56mr1655416wea.29.1305200425588; Thu, 12 May 2011 04:40:25 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.216.172.196 with HTTP; Thu, 12 May 2011 04:40:25 -0700 (PDT) In-Reply-To: <20110512111752.GP48734@deviant.kiev.zoral.com.ua> References: <1649118429.20110512113812@serebryakov.spb.ru> <20110512111752.GP48734@deviant.kiev.zoral.com.ua> Date: Thu, 12 May 2011 04:40:25 -0700 X-Google-Sender-Auth: 5a2Ru3M1ND4GnqMzG62cCoMI254 Message-ID: From: mdf@FreeBSD.org To: Kostik Belousov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Lev Serebryakov Subject: Re: Does FreeBSD have replacement for posix_fadvice() or fcntl(F_RDADVISE)? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 May 2011 11:40:27 -0000 On Thu, May 12, 2011 at 4:17 AM, Kostik Belousov wrot= e: > On Thu, May 12, 2011 at 11:38:12AM +0400, Lev Serebryakov wrote: >> Hello, Freebsd-hackers. >> >> =A0 =A0Does FreeBSD have some custom call, which can be used where Linux >> =A0programs uses posix_fadvice() and DARWIN ones fcntl(F_RDADVISE)? >> >> =A0 =A0It is like madvise(2) but for file descriptors. > No, it does not (and I think the function is spelled posix_fadvise()). > > mdf reserved the syscall slot for posix_fadvise in his recent work > on posix_fallocate(). Might be, he could comment more. Whoops, I replied bot forgot to reply-all. Adding a stub for posix_fadvise() is on my list of things to do, since we use it at $WORK in our custom filesystem, but the list is long and spare time is short. Nominally a technically correct implementation can do error checking and then nothing. Even after a stub is added to the OS, each filesystem must implement a VOP to do the work. Cheers, matthew