From owner-freebsd-net Thu Aug 31 1:54:59 2000 Delivered-To: freebsd-net@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id BFFE337B449 for ; Thu, 31 Aug 2000 01:54:56 -0700 (PDT) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 31 Aug 2000 09:54:55 +0100 (BST) To: Bosko Milekic Cc: David Malone , freebsd-net@FreeBSD.ORG Subject: Re: Proposal to clarify mbuf handling rules In-reply-to: Your message of "Wed, 30 Aug 2000 17:44:15 EDT." X-Request-Do: Date: Thu, 31 Aug 2000 09:54:53 +0100 From: David Malone Message-ID: <200008310954.aa57200@salmon.maths.tcd.ie> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > But how would you take care of removing a M_RDONLY flag for an mbuf > referring to certain external storage where that one mbuf is not the only > mbuf referring to it? At the time external storage is first attached to a mbuf you can set M_RDONLY if it must never be written to (eg. sendfile bufs or parts of the NFS zero copy stuff might want to do similar). If the M_RDONLY flag is set you must not write to the buffer, otherwise you can write to the buffer if it's a simple mbuf or if the reference count on the external storage is 1. (Atleast, this is the system I had in mind). David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message