From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH] fs-private data in struct block_device Date: Fri, 2 Jan 2004 00:22:12 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20040101232212.GA5143@lst.de> References: <20040101164219.GB654@lst.de> <20040101151017.3f7bc407.akpm@osdl.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: viro@parcelfarce.linux.theplanet.co.uk, linux-fsdevel@vger.kernel.org Return-path: Received: from verein.lst.de ([212.34.189.10]:46005 "EHLO mail.lst.de") by vger.kernel.org with ESMTP id S264299AbUAAXWR (ORCPT ); Thu, 1 Jan 2004 18:22:17 -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? Because it's different from the XFS block size. In XFS terms it's the sector size. > Or sb->s_blocksize? Would work, except that we don't get at per-superblock data in the place we need that information - it's in pagebuf which is the IRIX buffercache interface reimplemented ontop of the Linux pagecache, and that has neither access to Linux VFS nor XFS-internal data structures. > Seems sane. You'll need to decide whether that field should be operated > upon with atomic ops. If so, document it. If not, document its locking, > please. That's completly left to the filesystem. For XFS it would be set once at mount time and then left constant.