From mboxrd@z Thu Jan 1 00:00:00 1970 From: viro@parcelfarce.linux.theplanet.co.uk Subject: Re: [PATCH] fs-private data in struct block_device Date: Thu, 1 Jan 2004 23:21:37 +0000 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20040101232137.GR4176@parcelfarce.linux.theplanet.co.uk> References: <20040101164219.GB654@lst.de> <20040101151017.3f7bc407.akpm@osdl.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org Return-path: Received: from parcelfarce.linux.theplanet.co.uk ([195.92.249.252]:23186 "EHLO www.linux.org.uk") by vger.kernel.org with ESMTP id S261931AbUAAXVi (ORCPT ); Thu, 1 Jan 2004 18:21:38 -0500 To: Andrew Morton Content-Disposition: inline In-Reply-To: <20040101151017.3f7bc407.akpm@osdl.org> List-Id: linux-fsdevel.vger.kernel.org On Thu, Jan 01, 2004 at 03:10:17PM -0800, Andrew Morton wrote: > Christoph Hellwig wrote: > > > > Al had some critism about a per-blockdev XFS datastructure a while ago > > and so I tried to follow the suggestion in favour of using struct > > block_device directly. Unfortunately XFS requires a little bit more > > information than what's available in struct block_device, in particular > > whether the blocksize (not sector size) for that devices is identical > > to the page size, and we can't really get that from elsewhere due to > > layering constraints. > > Why doesn't `if (bdev->bd_block_size == PAGE_SIZE)' work? > > Or sb->s_blocksize? > > Generally, redundant info like this is a hassle because it has to be kept > coherent with the thing which it is duplicating. > > I suspect I don't understand the problem. > > Nathan Scott scott suggested turning the bd_invalidated fields into a > > flags field where the filesystem uses the so far unused flags for it's > > purposed (similar to struct buffer_head), but I think maybe the variant > > below that just adds a unsigned long for filesystem usage might be more > > useful as it also allows storing a pointer if needed. Comments? Obvious: we need at least some rules regarding who can and who can not play with that field. IOW, which filesystem?