From owner-freebsd-arch Mon Oct 7 14:55:57 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 768F637B401 for ; Mon, 7 Oct 2002 14:55:56 -0700 (PDT) Received: from falcon.mail.pas.earthlink.net (falcon.mail.pas.earthlink.net [207.217.120.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3495743E42 for ; Mon, 7 Oct 2002 14:55:56 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0113.cvx22-bradley.dialup.earthlink.net ([209.179.198.113] helo=mindspring.com) by falcon.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17yfqr-0000ug-00; Mon, 07 Oct 2002 14:55:45 -0700 Message-ID: <3DA2028E.87632EE1@mindspring.com> Date: Mon, 07 Oct 2002 14:54:22 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Mikhail Teterin Cc: arch@FreeBSD.org Subject: Re: swapon some regular file References: <200210071630.42512.mi+mx@aldan.algebra.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Mikhail Teterin wrote: > Currently, swapon(2) will only succeed if the argument vn_isdisk(9), or > if it is an NFS-accessed file. > > Users wishing to swap onto a local regular file have to go through the > vnconfig/mdconfig gimnastics. Is that intentional? Yes. You have to understand that the code that does the swapping for NFS is different than the code that does it for devices. Local swap to files is via the device pager. > If not, should it be fixed by relaxing the swapon(2)'s to not require > the VFCF_NETWORK for regular files, or -- cosmeticly -- by modifying the > swapon(8) to do the vnconfig/mdconfig-ing inside? And writing a "file_pager.c to live in /usr/src/sys/vm... 8-). > In both cases, pstat will, probably, need improving to display the > regular file name in the -s case. It would have to be recorded (it's not), because there might be multiple links to it. The name really doesn't matter, since the file might have been removed from the FS (e.g., it may no longer *have* a name). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message