From patchwork Thu May 26 18:19:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Peterson X-Patchwork-Id: 9137331 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 818ED6075A for ; Thu, 26 May 2016 18:20:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59FFB26FC9 for ; Thu, 26 May 2016 18:20:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4E05428098; Thu, 26 May 2016 18:20:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2AFB26FC9 for ; Thu, 26 May 2016 18:20:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754501AbcEZSUH (ORCPT ); Thu, 26 May 2016 14:20:07 -0400 Received: from mx6-phx2.redhat.com ([209.132.183.39]:40431 "EHLO mx6-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753637AbcEZSUG (ORCPT ); Thu, 26 May 2016 14:20:06 -0400 Received: from zmail12.collab.prod.int.phx2.redhat.com (zmail12.collab.prod.int.phx2.redhat.com [10.5.83.14]) by mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u4QIJw2X043988; Thu, 26 May 2016 14:19:59 -0400 Date: Thu, 26 May 2016 14:19:57 -0400 (EDT) From: Bob Peterson To: Christoph Hellwig Cc: xfs@oss.sgi.com, vishal l verma , linux-fsdevel@vger.kernel.org Message-ID: <1391795572.11287486.1464286797723.JavaMail.zimbra@redhat.com> In-Reply-To: <20160524131058.GA21094@lst.de> References: <1462783638-4968-1-git-send-email-hch@lst.de> <1462783638-4968-10-git-send-email-hch@lst.de> <1651455378.10041082.1464034166002.JavaMail.zimbra@redhat.com> <20160524131058.GA21094@lst.de> Subject: Re: [PATCH 09/15] fs: iomap based fiemap implementation MIME-Version: 1.0 X-Originating-IP: [10.3.116.126] X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF46 (Linux)/8.0.6_GA_5922) Thread-Topic: iomap based fiemap implementation Thread-Index: CpK7WZ8kPxzEPM00EEC6uC/InNDFjA== Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ----- Original Message ----- | On Mon, May 23, 2016 at 04:09:26PM -0400, Bob Peterson wrote: | > I've been looking at this again. Where are the calls to the fs-specific | > bits | > for fiemap? | | In the iomap_ops structure passed to iomap_fiemap. | | > It looks like iomap_fiemap calls iomap_apply, which calls | > iomap_fiemap_actor, but that doesn't call any ops->iomap_get_iomap or | > similar. | > It calls the iomap_begin (which BTW has a comment that says "Execute a | > iomap | > write" which is probably wrong and should be more generic, as for cases | > like | > fiemap) and it calls iomap_end. But it never calls an fs-specific actor | > anywhere. Am I missing something? My earlier version passed in the actor | > function, as per Dave Chinner's request, but yours doesn't. | | The iomap_begin callback is where you do the mapping. the iomap_end | callback does any required cleanup, which in case of GFS2 probably | would be dropping the cluster lock protecting the mapping. | Okay, got it. So a couple things: 1. I verified that the vfs bits of the patch set work properly for GFS2 using a modified iomap-based fiemap. And it's fast. 2. I'm not sure I like the fact that instead of begin->main->end it is essentially begin->end with begin doing all the work. It works, and it's better than we have today. But I'd prefer either renaming the first function from "iomap_begin" to something that indicates it's more than just a precursor to the actual function? Or else split it into begin->main->end? I was kinda hoping to pass in the iomap_actor somehow. It's not a tragic loss, but the way I've got the gfs2 function coded, the begin function does: locking plus the main functionality, and all the fiemap_end function basically does is unlock. 3. I had to do something like this to get "make menuconfig" to work: index 276fcfb..daa129c 100644 rather than getting pulled along size the xfs-specific bits? (Which is essentially what I've done for GFS2; I did not drag in all the xfs bits). Regards, Bob Peterson Red Hat File Systems --- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/fs/Kconfig +++ b/fs/Kconfig @@ -11,7 +11,7 @@ config DCACHE_WORD_ACCESS if BLOCK config FS_IOMAP - bool + bool "File IOMAP Support" 4. I don't suppose you could split this patch set up so that the vfs bits are independent, so someone like Al Viro could grab them