From owner-freebsd-current Mon Dec 31 11: 9:55 2001 Delivered-To: freebsd-current@freebsd.org Received: from swan.prod.itd.earthlink.net (swan.mail.pas.earthlink.net [207.217.120.123]) by hub.freebsd.org (Postfix) with ESMTP id 3F58637B428; Mon, 31 Dec 2001 11:09:49 -0800 (PST) Received: from pool0439.cvx21-bradley.dialup.earthlink.net ([209.179.193.184] helo=mindspring.com) by swan.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16L7oZ-00017c-00; Mon, 31 Dec 2001 11:09:40 -0800 Message-ID: <3C30B7F6.C01CECCF@mindspring.com> Date: Mon, 31 Dec 2001 11:09:42 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Michal Mertl Cc: dillon@freebsd.org, sheldonh@starjuice.net, current@freebsd.org Subject: Re: ntfs and sendfile problem (corrupted data) References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Michal Mertl wrote: > Sorry to bloat the list but I forgot to mention that the panics occur when > I actually try to read from ntfs partition (after appliing pach from > previous email). cd works ok but ls panics the kernel. You can't use the patch provided on NTFS. It's doesn't make fake backing objects. The problem is that you are going to need an NTFS specific "getpages" for reading. If you do a write, you are also going to need a "putpages"; for executables, this will not be necessary, since the copy-on-write will assign anonymous pages to the dirtied ones, and they will get swap assigned, if they need to be swapped out. As I said, the easiest thing to do would be to not use "external" mbufs in the sendfile case on NTFS. Whether this ends up being a check for an FS specific getpages, or you have an attribute bit for use in all FS's that can tell the sendfile code to use the old approach (non-external mbufs) for FS's implementing only transient backing ubjects, is up to you. A third approach, which I don't recommend, would be to make the sendfile() code FS specific, so that it can use block-sized mbufs, whatever they happen to be (this would hold a reference to the block rather than the backing page, which would also "fix" the problem). I don't recommend the approach, since it would make the mmap() and sendfile code rather slow, even if functional, and doing page gathering could result in a significant speedup. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message