Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 07 Oct 2002 14:54:22 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Mikhail Teterin <mi+mx@aldan.algebra.com>
Cc:        arch@FreeBSD.org
Subject:   Re: swapon some regular file
Message-ID:  <3DA2028E.87632EE1@mindspring.com>
References:  <200210071630.42512.mi%2Bmx@aldan.algebra.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DA2028E.87632EE1>