From owner-freebsd-hackers Wed Oct 24 2: 2:21 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id 4B73337B401 for ; Wed, 24 Oct 2001 02:02:19 -0700 (PDT) Received: from localhost (ilmar@localhost) by fledge.watson.org (8.11.6/8.11.5) with ESMTP id f9O92Er46068 for ; Wed, 24 Oct 2001 05:02:14 -0400 (EDT) (envelope-from ilmar@watson.org) Date: Wed, 24 Oct 2001 05:02:13 -0400 (EDT) From: "Ilmar S. Habibulin" To: freebsd-hackers@freebsd.org Subject: how can i wipeout swap pages? Message-ID: <20011024044458.U45888-100000@fledge.watson.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I'm trying to implement wiping of freed swap pages inside swap_pager. I'm using 2.2-branch, here is my thoughts and steps: I have a (starting) block number of swapped page, i know page size, and i know that i have to use some pool of buffers inside kernel. So i get buffer with getpbuf(), then fill in b_data, b_blkno, b_bcount, b_bufsize, b_proc and b_flags fields and call pbgetvp(swapdev_vp,bp) and VOP_STRATEGY(bp). Then i analize error flag in b_flags and call pbrelvp(bp) and relpbuf(bp). This code was copied from getpages/putpages routines, but it hangs kernel and PC. So i misunderstand something and need help. How can i successfully write down some data to the known block number on the known device from the kernel? Or maybe someone can point me where can i find more information on I/O in kernel? Thank you. PS. I've read -current manpages, but they didn't help me much. :( To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message