From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 2 23:49:57 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 651B437B401 for ; Mon, 2 Jun 2003 23:49:57 -0700 (PDT) Received: from stork.mail.pas.earthlink.net (stork.mail.pas.earthlink.net [207.217.120.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB4EE43FAF for ; Mon, 2 Jun 2003 23:49:56 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfj2f.dialup.mindspring.com ([165.247.204.79] helo=mindspring.com) by stork.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19N5cE-0000kq-00; Mon, 02 Jun 2003 23:49:51 -0700 Message-ID: <3EDC44CB.26675FAF@mindspring.com> Date: Mon, 02 Jun 2003 23:48:43 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Vijay.Singh@nokia.com References: <4D7B558499107545BB45044C63822DDE02C08E7B@mvebe001.americas.nokia.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4f0bbfa1ff9722b59408c7d94f1de8eb8350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c cc: freebsd-hackers@freebsd.org Subject: Re: sendfile in FreeBSD 2.2 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2003 06:49:57 -0000 Vijay.Singh@nokia.com wrote: > > Hi, I am following up my own post. I have been able to do most > of the porting, but I have one question. What do I replace the > OFF_TO_IDX() macro with? I could start with code that always > passes the offset as 0 (sending the complete file). Any help > would be appreciated. See vm/vm_object.h in a more recent set of sources. Basically, all it does is, given a file offset, return a page index by dividing by the page size (shifting rught PAGE_SHIFT worth of bits). -- Terry