From: Trond Myklebust Subject: Re: [PATCH 2/3] fsstack: Generic get/set lower object functions Date: Fri, 03 Nov 2006 01:25:03 -0500 Message-ID: <1162535103.5635.20.camel@lade.trondhjem.org> References: <20061102035928.679.60601.stgit@thor.fsl.cs.sunysb.edu> <1162483565.6299.98.camel@lade.trondhjem.org> <20061103032702.GB13499@filer.fsl.cs.sunysb.edu> <200611030345.51167.mark.williamson@cl.cam.ac.uk> <20061103035130.GC13499@filer.fsl.cs.sunysb.edu> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Mark Williamson , linux-kernel@vger.kernel.org, Pekka Enberg , Michael Halcrow , Erez Zadok , Christoph Hellwig , Al Viro , Andrew Morton , linux-fsdevel@vger.kernel.org Return-path: To: Josef Sipek In-Reply-To: <20061103035130.GC13499@filer.fsl.cs.sunysb.edu> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, 2006-11-02 at 22:51 -0500, Josef Sipek wrote: > On Fri, Nov 03, 2006 at 03:45:50AM +0000, Mark Williamson wrote: > > > > Why are you defining all these structs that are just wrapping unions? > > > > > > The reason for the union is simple... > ... > > I guess that having a union foo * rather than a struct foo * would be a bit > > unconventional in the kernel. The named struct / anonymous union combo does > > hide the union as merely an implementation detail, which is nice. Was this > > your motivation? > > That's exactly it. Save space & hide the details. Why? What is so special about the details that you need to hide them? This is a union that will always be part of a structure anyway. Trond