From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31AB5C10F03 for ; Thu, 25 Apr 2019 07:59:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 088E7217D7 for ; Thu, 25 Apr 2019 07:59:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728667AbfDYH7t (ORCPT ); Thu, 25 Apr 2019 03:59:49 -0400 Received: from verein.lst.de ([213.95.11.211]:60006 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726380AbfDYH7t (ORCPT ); Thu, 25 Apr 2019 03:59:49 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 689A368AFE; Thu, 25 Apr 2019 09:59:33 +0200 (CEST) Date: Thu, 25 Apr 2019 09:59:33 +0200 From: Christoph Hellwig To: Andreas Gruenbacher Cc: cluster-devel@redhat.com, Christoph Hellwig , Bob Peterson , Jan Kara , Dave Chinner , Ross Lagerwall , Mark Syms , Edwin =?iso-8859-1?B?VPZy9ms=?= , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 1/2] iomap: Add a page_prepare callback Message-ID: <20190425075933.GA9374@lst.de> References: <20190424171804.4305-1-agruenba@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190424171804.4305-1-agruenba@redhat.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Wed, Apr 24, 2019 at 07:18:03PM +0200, Andreas Gruenbacher wrote: > Add a page_prepare calback that's called before a page is written to. This > will be used by gfs2 to start a transaction in page_prepare and end it in > page_done. Other filesystems that implement data journaling will require the > same kind of mechanism. This looks basically fine to me. But I think it would be nicer to add a iomap_page_ops structure so that we don't have to add more pointers directly to the iomap. We can make that struct pointer const also to avoid runtime overwriting attacks.