From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: block_device_operations change since 2.6.27.X Date: Mon, 10 May 2010 23:06:38 +0200 Message-ID: <20100510210637.GA23924@quack.suse.cz> References: <20100504150021.11153dkucqae5zs5@www.ralf-hornik.de> <20100506150000.78121ikdk2550768@www.ralf-hornik.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: Ralf Hornik Mailings Return-path: Received: from cantor.suse.de ([195.135.220.2]:37540 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932229Ab0EJVGn (ORCPT ); Mon, 10 May 2010 17:06:43 -0400 Content-Disposition: inline In-Reply-To: <20100506150000.78121ikdk2550768@www.ralf-hornik.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu 06-05-10 15:00:00, Ralf Hornik Mailings wrote: > Ralf Hornik Mailings wrote: > > >I'm trying to port adics cvfs module to any newer kernel and had > >to figure out that the prototype of "block_device_operations" has > >become incompatible with code formerly used against kernel <= > >2.6.27.46 > > > >Unfortunately the documentation in filesystems/Locking does still > >point to the old prototype. > >Can somebody give me some hints how to use the new > >block_device_operations defined in blkdev.h or send me some new > >dokumentation? > > Can noone tell me how to use the new object? It's a bit hard to tell without knowing more details about the problem you have. I guess your problem is that originally the functions were passed struct inode * and struct file * while now they are passed struct block_device and fmode_t. That should be fairly easy to solve as most drivers use just inode->i_bdev (now passed directly) and file->f_flags (also passed directly in the new convention). You can have a look e.g. at commit 0338e29178795f0df0e1f3705b5d3effe9c95ff7 where drivers/scsi/sd.c is converted. Honza -- Jan Kara SUSE Labs, CR