Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933118Ab2K3ObP (ORCPT ); Fri, 30 Nov 2012 09:31:15 -0500 Received: from mx2.fusionio.com ([66.114.96.31]:58192 "EHLO mx2.fusionio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933011Ab2K3ObN (ORCPT ); Fri, 30 Nov 2012 09:31:13 -0500 X-ASG-Debug-ID: 1354285872-0421b508a94d5a0001-xx1T2L X-Barracuda-Envelope-From: clmason@fusionio.com Date: Fri, 30 Nov 2012 09:31:10 -0500 From: Chris Mason To: Dave Chinner CC: Linus Torvalds , Chris Mason , Mikulas Patocka , Al Viro , Jens Axboe , Jeff Chua , Lai Jiangshan , Jan Kara , lkml , linux-fsdevel Subject: Re: [PATCH v2] Do a proper locking for mmap and block size change Message-ID: <20121130143110.GD11004@shiny.int.fusionio.com> X-ASG-Orig-Subj: Re: [PATCH v2] Do a proper locking for mmap and block size change Mail-Followup-To: Chris Mason , Dave Chinner , Linus Torvalds , Chris Mason , Mikulas Patocka , Al Viro , Jens Axboe , Jeff Chua , Lai Jiangshan , Jan Kara , lkml , linux-fsdevel References: <20121129191503.GB3490@shiny> <20121129194840.GC3490@shiny> <20121129212931.GD3490@shiny> <20121130024910.GF6434@dastard> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20121130024910.GF6434@dastard> User-Agent: Mutt/1.5.21 (2011-07-01) X-Barracuda-Connect: mail1.int.fusionio.com[10.101.1.21] X-Barracuda-Start-Time: 1354285872 X-Barracuda-Encrypted: AES128-SHA X-Barracuda-URL: http://10.101.1.181:8000/cgi-mod/mark.cgi X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.115701 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1403 Lines: 30 On Thu, Nov 29, 2012 at 07:49:10PM -0700, Dave Chinner wrote: > On Thu, Nov 29, 2012 at 02:16:50PM -0800, Linus Torvalds wrote: > > On Thu, Nov 29, 2012 at 1:29 PM, Chris Mason wrote: > > > > > > Just reading the new blkdev_get_blocks, it looks like we're mixing > > > shifts. In direct-io.c map_bh->b_size is how much we'd like to map, and > > > it has no relation at all to the actual block size of the device. The > > > interface is abusing b_size to ask for as large a mapping as possible. > > > > Ugh. That's a big violation of how buffer-heads are supposed to work: > > the block number is very much defined to be in multiples of b_size > > (see for example "submit_bh()" that turns it into a sector number). > > > > But you're right. The direct-IO code really *is* violating that, and > > knows that get_block() ends up being defined in i_blkbits regardless > > of b_size. > > Same with mpage_readpages(), so it's not just direct IO that has > this problem.... I guess the good news is that block devices don't have readpages. The bad news would be that we can't put readpages in without much bigger changes. -chris -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/