From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH]QNX6 filesystem (RO) driver Date: Fri, 17 Feb 2012 16:20:06 +0000 Message-ID: <20120217162006.GO23916@ZenIV.linux.org.uk> References: <4F3839CE.8040805@ontika.net> <20120212224358.GW23916@ZenIV.linux.org.uk> <4F3B1DD1.3000202@ontika.net> <20120215061012.GC23916@ZenIV.linux.org.uk> <20120215064728.GE23916@ZenIV.linux.org.uk> <20120215071119.GF23916@ZenIV.linux.org.uk> <20120215075750.GG23916@ZenIV.linux.org.uk> <20120215144037.GH23916@ZenIV.linux.org.uk> <20120216100043.GJ23916@ZenIV.linux.org.uk> <2977b399b903a3b7bff1ffe93e8d3dd9.squirrel@www.ontika.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: Kai Bankett Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:53252 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752221Ab2BQQUH (ORCPT ); Fri, 17 Feb 2012 11:20:07 -0500 Content-Disposition: inline In-Reply-To: <2977b399b903a3b7bff1ffe93e8d3dd9.squirrel@www.ontika.net> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Feb 17, 2012 at 04:06:19PM +0100, Kai Bankett wrote: > - fixed broken mmi superblock handling, broken by the switch to pagemap, > root_node etc. stuff ;) + bh1 = sb_bread(s, s->s_blocksize); in there looks rather fishy... qnx6_lfile_checksum() doesn't use superblock argument anymore (used to be used for conversion, but since you are passing length from the caller...) qnx6_longname() - since you are passing superblock anyway, sbi is redundant... + inode->i_blocks = (inode->i_size >> sb->s_blocksize_bits) + << (sb->s_blocksize_bits - 9); looks too convoluted and if you really want to be pedantic, not 100% correct - you end up rounding it down, not up. FWIW, I would probably simply do (inode->i_size + 511) >> 9 and devil take the rounding effects on big block sizes; it's an approximation anyway, since you are not counting indirect blocks... Other than that (and assuming it survives your testing), I'm fine with that variant.