Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5026527rwb; Mon, 21 Nov 2022 15:34:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf7Xebn8nbbpBQi7meaMYtkpcZ/N896A9Cze+ekyW37rsoHfp6fCC2dB1PbT+WsOHHBFvG4k X-Received: by 2002:a17:906:2552:b0:7ad:917b:61ec with SMTP id j18-20020a170906255200b007ad917b61ecmr3618505ejb.513.1669073685784; Mon, 21 Nov 2022 15:34:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669073685; cv=none; d=google.com; s=arc-20160816; b=s84zrOiMhypjNTlZ1/JtzjMPe1VGMBW6f/Rg6AtGHtFd7w0A+K91fyp2D2rVdn0YXv NfiiOPUlUpjf5ic37uF6z8AAEupNky3zPg5JY3MIwA3BYPq4jGkFYcq+WLhE9jD/ZmtC zk5y6A+rkK6iPWBNhtIjrDFMJgscaNY6Ko5MU8thT90H/lTRuu45Dytif3hfNFzkwfFV fFwASOHe9eAuMLE4BPGqVcbY983vwaap8mi7A1l9apaRf8Qq185b219Nur2yFKZn9BTy WecSizXyo0F3dTEEtM2An9VIxZoN/3MYVX5Zh8CGG2joTdZC6wEGtr0mD8HIUP6OUiZa iYkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5NPqgSPsoKfJn0uOOPN9O9DTl+jaPUH9m9QVbYbym7I=; b=D084UCKGd+sujCSq4kGwByzZqTCbukG5WOSckP16PVG//c4fwWe5KsW6rcoeSbYJR+ EwAudQPb/iAJI8TGuw9QJv0zp7tu2p1DxRVWg09lgwsv+HKv2EL1y0vpQe2vN7gQ2Lim JHBzg2QL5zJZOgugx2tHXnIjqus03a1BvInPh+f3fMSMNsSSonHD9AHa7NmHeQeV8hbg sb+a0MdVEMKfGxhpFA9btLJ1jYBAvewHZTj9U/l5yUUTgK+acPUPTMaiEEBXyw9nOrmV Vc1sPHS7iGQ/WfcbuZmy5EhmBB3MU56dbY2JfC9ezreIGelpGU9StcQeWB2ltvIKAuy/ 4hrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fromorbit-com.20210112.gappssmtp.com header.s=20210112 header.b=1jqgc7FQ; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c18-20020aa7c992000000b00469bac8510csi1855633edt.583.2022.11.21.15.34.05; Mon, 21 Nov 2022 15:34:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@fromorbit-com.20210112.gappssmtp.com header.s=20210112 header.b=1jqgc7FQ; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231390AbiKUXUP (ORCPT + 99 others); Mon, 21 Nov 2022 18:20:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229676AbiKUXUO (ORCPT ); Mon, 21 Nov 2022 18:20:14 -0500 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D97DFC6628 for ; Mon, 21 Nov 2022 15:20:13 -0800 (PST) Received: by mail-pg1-x529.google.com with SMTP id s196so12550283pgs.3 for ; Mon, 21 Nov 2022 15:20:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fromorbit-com.20210112.gappssmtp.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=5NPqgSPsoKfJn0uOOPN9O9DTl+jaPUH9m9QVbYbym7I=; b=1jqgc7FQCoWCh503no+jq3J2NfLcBFrn37VzcRMQJq5Rob5kTTt9dZ1HqHuSjT+2N+ +6d+ypSgTLCEbdolZCY217OedVM1heZT3eXmYoLL2ACwTPFguTQjv+enl0WFOiyLXxjK sNTK/yY1u7BexvvokD2a/bYm5Jy9pTKUU7oQjJPQmHiTzxZdKZi3W956NauctvdfIwNP PV8VG9PCvsMBmkGHrncb6VhJbYO5PlxHIizuYtTY91jnoMYWmTp1XTAhjkx5lVnqU8F4 /jSd5hqg1lpM9dKgrwMU80uZYS3Uk7XsJUYPPQi5Qtf8l6pmCWWCWNY5z3rDOKc2Hw1Q Pupw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=5NPqgSPsoKfJn0uOOPN9O9DTl+jaPUH9m9QVbYbym7I=; b=RSSKQKQGBD01DUCf6LoYUM2n7oMKYnlih7IdPG+vRuhXW14XTOHouwlZCgP6Z0c7tF ZJx2b8lPdWgplCXtTr48prlYBnbjDDGFXDVg/UZBpPE9NfcQTZEEQf+qSn4r2ZmB2BBu tTg4ZwSp+0GAMB3LFNFL8FlKTis7CwTUiTEg4Hf8shLhDsK6FKd+ZJp8ysctjt3ivxmX ZPfS7b8hAulhucYkmTjxoH0+daL6S+lXg+bTbYkR2yzOO8/kAQDJzSeYx9N5CcZg8UTt 8sxDHRXzw+0ldgVhDISUxt/yhDSir8JsQDDCdbq3RnylRMGdqeNXLFqm4tu2kgkMpe8d s2/A== X-Gm-Message-State: ANoB5pmfGXj5mjtJeoP0vfrGK8xCBKYdZh9WLduRSV+W9vrMkPByhfQX 5RJBzY8w9c1S41Pm3i5PdAJ7tg== X-Received: by 2002:a65:6049:0:b0:477:2ac1:9d2c with SMTP id a9-20020a656049000000b004772ac19d2cmr951198pgp.184.1669072813390; Mon, 21 Nov 2022 15:20:13 -0800 (PST) Received: from dread.disaster.area (pa49-186-65-106.pa.vic.optusnet.com.au. [49.186.65.106]) by smtp.gmail.com with ESMTPSA id k186-20020a6324c3000000b0046fd180640asm8043926pgk.24.2022.11.21.15.20.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Nov 2022 15:20:12 -0800 (PST) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1oxG5C-00H36z-59; Tue, 22 Nov 2022 10:20:10 +1100 Date: Tue, 22 Nov 2022 10:20:10 +1100 From: Dave Chinner To: "Darrick J. Wong" Cc: Catherine Hoang , linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org Subject: Re: [PATCH v2 2/2] xfs: add FS_IOC_GETFSUUID ioctl Message-ID: <20221121232010.GN3600936@dread.disaster.area> References: <20221118211408.72796-1-catherine.hoang@oracle.com> <20221118211408.72796-3-catherine.hoang@oracle.com> <20221121210223.GJ3600936@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Nov 21, 2022 at 02:18:47PM -0800, Darrick J. Wong wrote: > On Tue, Nov 22, 2022 at 08:02:23AM +1100, Dave Chinner wrote: > > On Fri, Nov 18, 2022 at 01:14:08PM -0800, Catherine Hoang wrote: > > i.e. > > if (fsuuid.fsu_flags != 0) > > return -EINVAL; > > > > error = xfs_fs_get_uuid(&mp->m_sb, uuid, &fsuuid.fsu_len, NULL); > > if (error) > > return -EINVAL; > > > > Also, uuid_copy()? > > Why does xfs_fs_get_uuid use memcpy then? Did the compiler reject the > u8* -> uuid_t * type conversion? No idea, I've completely forgotten about the reasons for the code being written that way. These days people seem to care about making the compiler do all the type checking and type conversions for us. The use of UUIDs and various types within XFS has been quite ad hoc, so I'm just suggesting that we improve it somewhat. Using types and APIs that mean we don't have to code the length of UUIDs everywhere seems like a Good Idea for newly written code... > Alternately there's export_uuid(). But we don't need that if we use uuid_t for all the local representations of the UUID.... Cheers, Dave. -- Dave Chinner david@fromorbit.com