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:32:27 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20040101233226.GA5286@lst.de> References: <20040101164219.GB654@lst.de> <20040101151017.3f7bc407.akpm@osdl.org> <20040101232137.GR4176@parcelfarce.linux.theplanet.co.uk> <20040101232345.GB5143@lst.de> <20040101232832.GS4176@parcelfarce.linux.theplanet.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , linux-fsdevel@vger.kernel.org Return-path: Received: from verein.lst.de ([212.34.189.10]:58805 "EHLO mail.lst.de") by vger.kernel.org with ESMTP id S261812AbUAAXcc (ORCPT ); Thu, 1 Jan 2004 18:32:32 -0500 To: viro@parcelfarce.linux.theplanet.co.uk Content-Disposition: inline In-Reply-To: <20040101232832.GS4176@parcelfarce.linux.theplanet.co.uk> List-Id: linux-fsdevel.vger.kernel.org On Thu, Jan 01, 2004 at 11:28:32PM +0000, viro@parcelfarce.linux.theplanet.co.uk wrote: > > Okay, let's make it more general. Throw the filesystem completly out of > > the few and say the private data can be used by the owner of that > > blockdevice as established by bd_claim, okay? > > OK... One question: what rules do you want wrt multiple claims with the > same owner? I'd say this is the owners problem and add a big comment about that. What about something like the version below?: --- 1.276/include/linux/fs.h Mon Dec 29 22:37:20 2003 +++ edited/include/linux/fs.h Fri Jan 2 01:30:42 2004 @@ -353,6 +353,13 @@ int bd_invalidated; struct gendisk * bd_disk; struct list_head bd_list; + /* + * Private data. You must have bd_claimed the block_device + * to use this. NOTE: bd_claims allows an owner to claim + * the same device multiple timers, the owner must take special + * care to not mess up bd_private for that case. + */ + unsigned long bd_private; }; /*