From owner-freebsd-stable@FreeBSD.ORG Wed Mar 22 17:24:07 2006 Return-Path: X-Original-To: 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 1B45716A400; Wed, 22 Mar 2006 17:24:07 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C56E43D76; Wed, 22 Mar 2006 17:24:06 +0000 (GMT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.13.4/8.13.4) with ESMTP id k2MHNqkt012946; Wed, 22 Mar 2006 09:23:52 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.13.4/8.13.4/Submit) id k2MHNmu0012943; Wed, 22 Mar 2006 09:23:48 -0800 (PST) Date: Wed, 22 Mar 2006 09:23:48 -0800 (PST) From: Matthew Dillon Message-Id: <200603221723.k2MHNmu0012943@apollo.backplane.com> To: Kostik Belousov References: <200603211607.30372.mi+mx@aldan.algebra.com> <200603212045.39845.mi+mx@aldan.algebra.com> <200603220153.k2M1rouk007739@apollo.backplane.com> <200603212107.48601.mi+mx@aldan.algebra.com> <20060322091010.GA20929@deviant.kiev.zoral.com.ua> Cc: alc@freebsd.org, Mikhail Teterin , stable@freebsd.org Subject: Re: more weird bugs with mmap-ing via NFS 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: Wed, 22 Mar 2006 17:24:07 -0000 My guess is that you are exporting the filesystem as a particular user id that is not root (i.e. you do not have -maproot=root: in the exports line on the server). What is likely happening is that the NFS client is trying to push out the pages using the root uid rather then the user uid. This is a highly probable circumstance for VM pages because once they get disassociated from the related buffer cache buffer, the cred information for the last process to modify the related VM pages is lost. When the kernel tries to flush the pages out it winds up using root creds. On DragonFly, I gave up entirely on trying to associate creds with buffers. I consider this more of a bug on the server side then on the client side. The server should automatically translate the root uid to the exported uid for I/O ops. Or, baring that, we have to add an option to the client-side mount to be able to specify a user/group id to translate all I/O requests to. -Matt