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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS 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 8A6D4C43381 for ; Mon, 18 Mar 2019 13:51:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5BC8120857 for ; Mon, 18 Mar 2019 13:51:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726692AbfCRNvN (ORCPT ); Mon, 18 Mar 2019 09:51:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60620 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726466AbfCRNvN (ORCPT ); Mon, 18 Mar 2019 09:51:13 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 515AE88AA2 for ; Mon, 18 Mar 2019 13:51:13 +0000 (UTC) Received: from [10.33.36.77] (unknown [10.33.36.77]) by smtp.corp.redhat.com (Postfix) with ESMTP id 606CE5C28F; Mon, 18 Mar 2019 13:51:10 +0000 (UTC) Subject: Re: [PATCH 1/2] gfs2: Convert gfs2 to fs_context To: David Howells Cc: cluster-devel@redhat.com, linux-fsdevel@vger.kernel.org References: <20190317174027.15291-2-anprice@redhat.com> <20190317174027.15291-1-anprice@redhat.com> <28293.1552915099@warthog.procyon.org.uk> From: Andrew Price Message-ID: <8b0534dc-0ee0-ba7f-8709-30433c04c5a7@redhat.com> Date: Mon, 18 Mar 2019 13:51:09 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <28293.1552915099@warthog.procyon.org.uk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 18 Mar 2019 13:51:13 +0000 (UTC) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On 18/03/2019 13:18, David Howells wrote: > Andrew Price wrote: > >> sget() is still used instead of sget_fc() as there doesn't seem to be an >> obvious replacement for the bdev pointer propagation to the test/set >> functions (yet?) > > Umm... What about the fs_context struct? Why can't that be used to propagate > the bdev pointer? That's kind of what it's for... It would be useful to have the block device pointer in the fs_context since so many of the filesystems use them and it makes for an obvious API migration. > struct super_block *sget_fc( > struct fs_context *fc, > int (*test)(struct super_block *, struct fs_context *), > int (*set)(struct super_block *, struct fs_context *)) > > It looks like you should be able to stash the bdev pointer in the gfs2_args > struct. Sure, but since the new API is young I figured I'd hold off until we had this conversation because adding it to the fs_context might be agreeable :) >> + fsparam_s32 ("commit", Opt_commit), >> + fsparam_s32 ("statfs_quantum", Opt_statfs_quantum), >> + fsparam_s32 ("statfs_percent", Opt_statfs_percent), > > Why s32? Why not u32? They were signed before, I guess because if the user passes a negative number it allows us to range check properly and provide a sensible error message. Is there an issue with them being s32 that I hadn't considered? Thanks, Andy