From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: [PATCH] fs-private data in struct block_device Date: Thu, 1 Jan 2004 17:42:19 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20040101164219.GB654@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from verein.lst.de ([212.34.189.10]:49328 "EHLO mail.lst.de") by vger.kernel.org with ESMTP id S264511AbUAAQmZ (ORCPT ); Thu, 1 Jan 2004 11:42:25 -0500 To: akpm@osdl.org, viro@parcelfarce.linux.theplanet.co.uk Content-Disposition: inline List-Id: linux-fsdevel.vger.kernel.org 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. 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? --- 1.276/include/linux/fs.h Mon Dec 29 22:37:20 2003 +++ edited/include/linux/fs.h Thu Jan 1 13:42:08 2004 @@ -353,6 +353,7 @@ int bd_invalidated; struct gendisk * bd_disk; struct list_head bd_list; + unsigned long bd_fspriv; /* file-system private data */ }; /*