From owner-svn-src-head@freebsd.org Tue Aug 29 16:20:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C926DDF985 for ; Tue, 29 Aug 2017 16:20:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F3B8B683BF for ; Tue, 29 Aug 2017 16:20:23 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x231.google.com with SMTP id s101so22616254ioe.0 for ; Tue, 29 Aug 2017 09:20:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=4ET+7qGycGLZJQp806QMRoep7rOmB9y+4YSLIZotwmI=; b=UiacjQ7fMQrPM2pqcNAnCrz7Nuh6DkwxGjAeU572mybvOlC6OIv1M4PCOc87+gkspe NZhiF4ENftXhBWqDHrvKCXNijU2UoZd1oXGRb7cNpwbTj5pC6/yz/PepJZJllISw1vh6 92UauhrMCquISM1q5STACbnoVWDyle+CTOISwPgODByA/nI1hPbtQSBRbXOI16agvVfD TVFngA1Aw/7ASHLzYN/ylJ/a3WTZGj7Uwnhv5EceeyWibM0yykQGIojvMcGNIZjugnOz e9mWnMvsAwDS1UvQvAdypYF5CZU+JS397myEXjqvKW4BagUFUBUB/KcBGZ0XRYLpdLI+ L+4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=4ET+7qGycGLZJQp806QMRoep7rOmB9y+4YSLIZotwmI=; b=ZfalOfPdpXTzAb6GnNKnJdeRuXnc5muUXSDDy/ibcl1ONWhKROqTimv9i3xmUwP5qO WYkWTe51ecoQ1ub3gX5fcycV7ASKUbPZWraWxsM1/eegzYWmac6KGYoR0BXF9Uu6LiTi 8dWBmCZ4qMohj1M5DSmSQUtuQpC3stGxs31zrHGaP9jDQuY1CL9GEjk1l7WShyiEf1CG lRdazyds0JkBWFENOPecWyvaB4N33C0xmLdeMVAW7EtqsfL5khkbDpjnJ/zVT2aLGMlh KHlIeiFM36QFduD4H83FLcVNQlPNyUpPpz6/wkqDjTiB1/j8GqW74mUYCNZvGFzvOUC3 PWPA== X-Gm-Message-State: AHYfb5hWl8f41yDH2UZC/29jQMVJkEUIuCajKfxuEcYUeu7PSw2ECHMF K2kaTLX9ZMTjDmaZ2rdGYVXuEnbeo7FC X-Received: by 10.107.148.4 with SMTP id w4mr4731660iod.91.1504023623253; Tue, 29 Aug 2017 09:20:23 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.10.71 with HTTP; Tue, 29 Aug 2017 09:20:22 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:b0a6:3a71:334e:4a8d] In-Reply-To: <6350259.n2rmZ9RnEY@ralph.baldwin.cx> References: <201708281554.v7SFs8fr014268@repo.freebsd.org> <2937323.CvTEtZnL2T@ralph.baldwin.cx> <6350259.n2rmZ9RnEY@ralph.baldwin.cx> From: Warner Losh Date: Tue, 29 Aug 2017 10:20:22 -0600 X-Google-Sender-Auth: VykDQ2wm-QroKPXT4mwSa4rX2_A Message-ID: Subject: Re: svn commit: r322969 - in head: sbin/mdconfig sys/dev/md sys/sys To: John Baldwin Cc: Maxim Sobolev , Ryan Libby , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Aug 2017 16:20:24 -0000 On Tue, Aug 29, 2017 at 8:30 AM, John Baldwin wrote: > On Monday, August 28, 2017 04:40:49 PM Maxim Sobolev wrote: > > John, well, this depends on how you look at it. The padding element size > is > > "int", which when you account for the alignment has the nice property on > > both 32 and 64-bit arches that no matter what kind of element you add > > (char, short, int or void *), you only need to bring down MDNPAD by 1 to > > keep the structure size the same. > > That's only true once. Add a second pointer and this trick won't work > again > on 64-bit platforms. It only worked this time by accident because there > was > unaccounted-for padding at the end of the structure, not on purpose. In > other places in the tree where ABI is more carefully maintained we use > explicit spare pointers or spare longs instead (e.g. padding in > kinfo_proc). > Yes, as someone that's lived through the 'All the World's a VAX' wars and the 'All the world's 32-bit' wars or even the more ancient 16-bit -> 32-bit wars, there's a reason we have uintptr_t and why it may not be an int... Warner