From: Andreas Dilger Subject: Re: [PATCH 5/5] generic block based fiemap implementation Date: Thu, 29 May 2008 17:24:16 -0600 Message-ID: <20080529232416.GL2985@webber.adilger.int> References: <20080525000235.GO8325@wotan.suse.de> <20080528153112.GA23090@unused.rdu.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT Cc: Mark Fasheh , linux-fsdevel@vger.kernel.org To: Josef Bacik Return-path: Received: from sca-es-mail-1.Sun.COM ([192.18.43.132]:57163 "EHLO sca-es-mail-1.sun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754021AbYE2XYV (ORCPT ); Thu, 29 May 2008 19:24:21 -0400 Received: from fe-sfbay-09.sun.com ([192.18.43.129]) by sca-es-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m4TNOKJn020305 for ; Thu, 29 May 2008 16:24:20 -0700 (PDT) Received: from conversion-daemon.fe-sfbay-09.sun.com by fe-sfbay-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0K1N00C01KZ3WE00@fe-sfbay-09.sun.com> (original mail from adilger@sun.com) for linux-fsdevel@vger.kernel.org; Thu, 29 May 2008 16:24:20 -0700 (PDT) In-reply-to: <20080528153112.GA23090@unused.rdu.redhat.com> Content-disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On May 28, 2008 11:31 -0400, Josef Bacik wrote: > +int generic_block_fiemap(struct inode *inode, > + struct fiemap_extent_info *fieinfo, u64 start, > + u64 len, get_block_t *get_block) > +{ This still doesn't do any validity checking on fieinfo->fi_flags. You can't assume that the check in ioctl_fiemap() is correct for this routine. As soon as some new flag is added (e.g. FIEMAP_FLAG_XATTR) this code would do the wrong thing. Cheers, Andreas -- Andreas Dilger Sr. Staff Engineer, Lustre Group Sun Microsystems of Canada, Inc.