From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: Kernel 3.1.0-rc4 oops when connecting iPod Date: Sun, 11 Sep 2011 10:14:26 -0400 Message-ID: <20110911141426.GC23339@infradead.org> References: <1315748768.65310.YahooMailClassic@web29513.mail.ird.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Pavel Ivanov , linux-fsdevel@vger.kernel.org, linux-kernel , Christoph Hellwig To: Hin-Tak Leung Return-path: Received: from 173-166-109-252-newengland.hfc.comcastbusiness.net ([173.166.109.252]:46321 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754608Ab1IKOO2 (ORCPT ); Sun, 11 Sep 2011 10:14:28 -0400 Content-Disposition: inline In-Reply-To: <1315748768.65310.YahooMailClassic@web29513.mail.ird.yahoo.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun, Sep 11, 2011 at 02:46:08PM +0100, Hin-Tak Leung wrote: > > +?????* and difference between it > > and alloc_blksz_shift will be always in > > +?????* fs_shift. > > +?????*/ > > +??? err = > > generic_check_addressable(sb->s_blocksize_bits, > > +??? ??? ??? > > (u64)sbi->total_blocks << sbi->fs_shift); > > ??? if (err) { > > ??? ??? printk(KERN_ERR > > "hfs: filesystem size too large.\n"); > > ??? ??? goto out_free_vhdr; > > Why is the u64 needed? If it is needed, it probably means sbi->total_blocks should have been u64 in the first place. No. When you shift values to the left they obviously become larger. The total_blocks count on disk 32-bit so there is no need to store it in a larger variable in the in-core superblock.