Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6920C6FD1D for ; Sat, 18 Mar 2023 00:01:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229942AbjCRABG (ORCPT ); Fri, 17 Mar 2023 20:01:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229733AbjCRABF (ORCPT ); Fri, 17 Mar 2023 20:01:05 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D02AFD526 for ; Fri, 17 Mar 2023 17:01:03 -0700 (PDT) Received: from [0.0.0.0] ([149.28.201.231]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1N4hvb-1qcOZI1eQ3-011hk6; Sat, 18 Mar 2023 01:01:00 +0100 Message-ID: <93f12c38-719c-ce15-e662-d94dc48b57a1@gmx.com> Date: Sat, 18 Mar 2023 08:00:56 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH 2/3] btrfs-progs: sync ioctl from kernel Content-Language: en-US To: dsterba@suse.cz, Qu Wenruo Cc: linux-btrfs@vger.kernel.org References: <3b6d9333e90103336e49e0b6a52118617928e3e4.1676115988.git.wqu@suse.com> <20230316152714.GZ10580@twin.jikos.cz> From: Qu Wenruo In-Reply-To: <20230316152714.GZ10580@twin.jikos.cz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:23Z1VR52mK3MH9PjKww7VwPBw9FzBKOlWM+vCv+XgXB1FCesAlh SYy7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fOPqYxeVVdWvyMj0 zSCKYSxxqddyA5oUo4xDKfTjkQWWMDfRVpIVKpP/kHlf2cucKPagf61mtyE2XoQAsXKmB617g mxdwjjkEXOARTL14fBxtFKJB2W4= Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On 2023/3/16 23:27, David Sterba wrote: > On Sat, Feb 11, 2023 at 07:50:31PM +0800, Qu Wenruo wrote: >> This sync is mostly for the new member, btrfs_ioctl_dev_info_args::fsid. >> >> Signed-off-by: Qu Wenruo >> --- >> ioctl.h | 13 ++++++++++++- >> libbtrfs/ioctl.h | 13 ++++++++++++- >> 2 files changed, 24 insertions(+), 2 deletions(-) >> >> diff --git a/ioctl.h b/ioctl.h >> index 1af16db13241..034f38dd702a 100644 >> --- a/ioctl.h >> +++ b/ioctl.h >> @@ -214,7 +214,18 @@ struct btrfs_ioctl_dev_info_args { >> __u8 uuid[BTRFS_UUID_SIZE]; /* in/out */ >> __u64 bytes_used; /* out */ >> __u64 total_bytes; /* out */ >> - __u64 unused[379]; /* pad to 4k */ >> + /* >> + * Optional, out. >> + * >> + * Showing the fsid of the device, allowing user space >> + * to check if this device is a seed one. >> + * >> + * Introduced in v6.4, thus user space still needs to >> + * check if kernel changed this value. >> + * Older kernel will not touch the values here. >> + */ >> + __u8 fsid[BTRFS_UUID_SIZE]; >> + __u64 unused[377]; /* pad to 4k */ >> __u8 path[BTRFS_DEVICE_PATH_NAME_MAX]; /* out */ >> }; >> BUILD_ASSERT(sizeof(struct btrfs_ioctl_dev_info_args) == 4096); >> diff --git a/libbtrfs/ioctl.h b/libbtrfs/ioctl.h >> index f19695e30a63..0b19efde4915 100644 >> --- a/libbtrfs/ioctl.h >> +++ b/libbtrfs/ioctl.h >> @@ -215,7 +215,18 @@ struct btrfs_ioctl_dev_info_args { >> __u8 uuid[BTRFS_UUID_SIZE]; /* in/out */ >> __u64 bytes_used; /* out */ >> __u64 total_bytes; /* out */ >> - __u64 unused[379]; /* pad to 4k */ >> + /* >> + * Optional, out. >> + * >> + * Showing the fsid of the device, allowing user space >> + * to check if this device is a seed one. >> + * >> + * Introduced in v6.4, thus user space still needs to >> + * check if kernel changed this value. >> + * Older kernel will not touch the values here. >> + */ >> + __u8 fsid[BTRFS_UUID_SIZE]; >> + __u64 unused[377]; /* pad to 4k */ > > Please don't change libbtrfs interface, it's supposed to be frozen and > not changed anymore. The libbtrfsutil/btrfs.h should be changed instead. Got it, I'll only update this patch to sync the headers for libbtrfsutil instead. Thanks, Qu > >> __u8 path[BTRFS_DEVICE_PATH_NAME_MAX]; /* out */ >> }; >> BUILD_ASSERT(sizeof(struct btrfs_ioctl_dev_info_args) == 4096); >> -- >> 2.39.1