From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 12:08:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57E2DE38; Fri, 9 Jan 2015 12:08:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43077C61; Fri, 9 Jan 2015 12:08:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t09C8qu9025073; Fri, 9 Jan 2015 12:08:52 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t09C8qJD025072; Fri, 9 Jan 2015 12:08:52 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201501091208.t09C8qJD025072@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Fri, 9 Jan 2015 12:08:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276884 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2015 12:08:52 -0000 Author: rwatson Date: Fri Jan 9 12:08:51 2015 New Revision: 276884 URL: https://svnweb.freebsd.org/changeset/base/276884 Log: Remove a 'This is dumb' comment that has been incorrect for at least a decade: m_pulldown() is willing to consider ordinary mbufs writable. Retain another, related, and also outdated comment, but with a caveat that it is partially stale. Do not, for now, address the problem that it raises (that only EXT_CLUSTER external storage is considered writable, regardless of the results of M_WRITABLE() on the mbuf). MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/sys/kern/uipc_mbuf2.c Modified: head/sys/kern/uipc_mbuf2.c ============================================================================== --- head/sys/kern/uipc_mbuf2.c Fri Jan 9 10:59:49 2015 (r276883) +++ head/sys/kern/uipc_mbuf2.c Fri Jan 9 12:08:51 2015 (r276884) @@ -131,6 +131,8 @@ m_pulldown(struct mbuf *m, int off, int } /* + * The following comment is dated but still partially applies: + * * XXX: This code is flawed because it considers a "writable" mbuf * data region to require all of the following: * (i) mbuf _has_ to have M_EXT set; if it is just a regular @@ -148,10 +150,6 @@ m_pulldown(struct mbuf *m, int off, int * M_WRITABLE(). For now, we only evaluate once at the beginning and * live with this. */ - /* - * XXX: This is dumb. If we're just a regular mbuf with no M_EXT, - * then we're not "writable," according to this code. - */ writable = 0; if ((n->m_flags & M_EXT) == 0 || (n->m_ext.ext_type == EXT_CLUSTER && M_WRITABLE(n)))