From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [198.137.202.9] ([198.137.202.9]:56399 "EHLO bombadil.infradead.org" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752147AbcCOHdw (ORCPT ); Tue, 15 Mar 2016 03:33:52 -0400 Date: Tue, 15 Mar 2016 00:33:04 -0700 From: Christoph Hellwig To: Bob Peterson Cc: linux-fsdevel@vger.kernel.org, Jan Kara , Al Viro , Dave Chinner , Christoph Hellwig Subject: Re: [vfs PATCH v3 2/4] VFS: Add new __generic_iomap_fiemap interface Message-ID: <20160315073304.GF11669@infradead.org> References: <1457122300-28514-1-git-send-email-rpeterso@redhat.com> <1457122300-28514-3-git-send-email-rpeterso@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1457122300-28514-3-git-send-email-rpeterso@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > + while ((ret == 0) && (start < isize) && len) { no need for both sets of inner braces. > + memset(&iom, 0, sizeof(iom)); > + ret = iomap(inode->i_mapping, start, len, &iom); > + if (ret) > + break; > + > + if (!iomap_needs_allocation(&iom)) { I don't think the iomap_needs_allocation, because the decision if something needs an allocation is up to the beholder. E.g. in this case you want to report block numbers of holes and unwritten extents. > + if (prev_iom.blkno) > + ret = fiemap_fill_next_extent(fieinfo, > + prev_iom.offset, > + blk_to_logical(inode, the iomap interface as used for pnfs and the multi page writes that I pointed you to in the last reply use file system blocks as unit, so the blk_to_logical should go away.