Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp897646rwd; Thu, 1 Jun 2023 07:58:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6GMG7jWLVAu4g2eSKYewILEs9D4LfcH7DmhyWMRWoVsIV5fP34ICpl0WbR6Med55lXLndw X-Received: by 2002:a05:6a20:2588:b0:10b:dca5:74e5 with SMTP id k8-20020a056a20258800b0010bdca574e5mr8359892pzd.0.1685631528076; Thu, 01 Jun 2023 07:58:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685631528; cv=pass; d=google.com; s=arc-20160816; b=DCA32jhOuKs7N4jpLgvU6ZXE+xJQR9B3hs7eIdPXFZY36/eBViIqHbnQb9lGdRzJVe PoUAxA5G6ZhEdMdoWMNVUHILCN33T/LkadVQzSGtox7sJjJQGUqQPjiI3OOPfh/0KwVN TNtWItQ5uy2MOqY3Sg9qki2bMm7nZILwb5Bgm+5J4Hyge9ouBOXjshlEjL68EokaEis/ yVLYH74S2IfYvTiiHJnxp0VOhMwB19bYMM3cv4fJ0PG5PsYGL735/WXLTUwY1h+pMDcE r2Ip+uIcX2XitcV8kuzrvxFcQ3GDHsYW3VzQCBHKbqEh7hqDnzMpHqZ6IwmwY6NO9d+2 Vv2A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=dqNw+Pw8Pc/qPdLXNgzyXTTWBPNjQes+YJGdDqgr6k8=; b=TVRtpVuGOdV9rfyWsa8GN78D8JYHeZIbixpuEWdX7WZ+8zE/WVtSqIOIm9nv7IARM+ fNolu2GjPM2SFkppe2nDJmpPb4ELkWk+ptXewirWbr29zkQWbUlwSeG7hROimze7BBdC geXyqUHs/Z74KiAdB+j9Ls8zorRZcFJC5N2dIBBXclhdU8W0QsVu2ZLT/yxpDzFuHU5o zx8RX8/wp6NaPo03+1xDaeIyBJn0H5FOrZvTCfL9sWQGXmjR993y+NJWqN0NA5t/uGQH yAtN+s60X/5UJc5McJKwqRAiT0fTiYaEtzHa3IaFfK5tKajr2dlsAadCnwj1GhKWYZvn nBpg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oppo.com header.s=selector1 header.b=i1jDort5; arc=pass (i=1 spf=pass spfdomain=oppo.com dkim=pass dkdomain=oppo.com dmarc=pass fromdomain=oppo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=oppo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s22-20020a170902989600b001a99ace3e76si2704258plp.554.2023.06.01.07.58.34; Thu, 01 Jun 2023 07:58:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@oppo.com header.s=selector1 header.b=i1jDort5; arc=pass (i=1 spf=pass spfdomain=oppo.com dkim=pass dkdomain=oppo.com dmarc=pass fromdomain=oppo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=oppo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232258AbjFAOi3 (ORCPT + 99 others); Thu, 1 Jun 2023 10:38:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232425AbjFAOi1 (ORCPT ); Thu, 1 Jun 2023 10:38:27 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2069.outbound.protection.outlook.com [40.107.215.69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF0DCE75 for ; Thu, 1 Jun 2023 07:38:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C+0llvVMveDchMehDCntivXtGiT/gwbQrlRz97QRJuYkIYJQCWvhVDYyNI0aPHF7f+oDRGbW8to/jRBnhJ+7y7HGazx31HBdEK2x4GGfhGN6n9KuSoMJnCfeN8ebUoq475AVAacMk1Cw4p0xefd8rv3nJjbc6oOh0FdcOO39TRZTwT9ttehu6Iq37tXR3lyaXgo0TNISGzX5RbbJ6SqNp4bHDDbx2Gs/yAF1kfXThfLQpEXeUAyJ+D5HbemxVqnfIPxUUOAuIGBmp7KOuSpppFLaadMWeNpfZxI2PmQVAC/nKmYfcmnktouiklpSWXhZmSosuuDG1NLYjI7SlMGxFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dqNw+Pw8Pc/qPdLXNgzyXTTWBPNjQes+YJGdDqgr6k8=; b=ZggXdcVi4gtwKdrf6lMIxMlR1XdYNh+Bsix8PEfFRRHxl5p+mqDAuf9BND5BoVdviwwejBJitSTOHGTNULmS10u1wKYeK6XbjdSl5zgTpUzkMAvI0xhDDLTLR/GPkQYvbKIpXTgkhRiQZvtYwzNM2FLZw+3wuObeDqwSu0A8c3sw14JGMIsT3oV2zwLu+llBHQtp2bXEz3i1LpP2doYFU1z+Vphw0d5nPGI9YoV9x2SEh4jj0yYC/eyzEtNmGWtXhlDgPk28Fi0/LxdRcoJ2TSw/Aiv4tIR1I9a/JxdVsWYRy6FnM31GsSdss1mSbNb7chLYxonq6F72CHwrUkRmOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oppo.com; dmarc=pass action=none header.from=oppo.com; dkim=pass header.d=oppo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oppo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dqNw+Pw8Pc/qPdLXNgzyXTTWBPNjQes+YJGdDqgr6k8=; b=i1jDort5Bk1gTafB9WbC64LpZbZn1tyantIFNZHHSQTK46zxNEiIqgX5/VPg5gEFJgSrOPauSXlqDpOqopw9u9YiJArBPoQoXLeOT6yRSpysex/CoZD88NYOTC+7VfFTs7cFmR12Qnjh8uPYDlZ2rlvoErlKg/PxesypteoJ5vo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oppo.com; Received: from SI2PR02MB5148.apcprd02.prod.outlook.com (2603:1096:4:153::6) by TYZPR02MB5988.apcprd02.prod.outlook.com (2603:1096:400:1f3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.8; Thu, 1 Jun 2023 14:37:27 +0000 Received: from SI2PR02MB5148.apcprd02.prod.outlook.com ([fe80::1bc4:fbb5:b757:83ee]) by SI2PR02MB5148.apcprd02.prod.outlook.com ([fe80::1bc4:fbb5:b757:83ee%5]) with mapi id 15.20.6455.020; Thu, 1 Jun 2023 14:37:27 +0000 Message-ID: Date: Thu, 1 Jun 2023 22:37:24 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [f2fs-dev] [PATCH] f2fs: add f2fs_ioc_[get|set]_extra_attr Content-Language: en-US To: Eric Biggers Cc: jaegeuk@kernel.org, chao@kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net References: <20230529013502.2230810-1-shengyong@oppo.com> <20230601031658.GA728@quark.localdomain> From: Sheng Yong In-Reply-To: <20230601031658.GA728@quark.localdomain> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SG2PR02CA0025.apcprd02.prod.outlook.com (2603:1096:3:18::13) To SI2PR02MB5148.apcprd02.prod.outlook.com (2603:1096:4:153::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SI2PR02MB5148:EE_|TYZPR02MB5988:EE_ X-MS-Office365-Filtering-Correlation-Id: f03563c0-ea3a-4d08-7f30-08db62adb8cc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /sE5GZyGlCuI9c7m4aIp+wteo9yO5T8EmjFPqcM5X8g+tl6HeME65eQCYFjVb3ghnoOX0WhZVlXtwAtoRnZ3LRpE+4dvYppBMydIrFt6LW0F+JUMZHvFfnJBPfqMJnPH8LyQlmWs8EXDrCadByo7pmxSqSI0p5zMD4rVL7tenM4VV09IYnY/AolGUEHaZ0duMCe9VjvhcC4v2R4rODRRABa7AWLfBfj0ZyUhsJiA4oYRO9jV5XIROR7tnbB+gTU9AupkjSFBsqyw6Cpn9sqZ5ZaWkPFmVAbzV1qFWu5LU7OslUdmtKYdA3M8RHx6Qjwb2yn4LskzuhneyZwp4D80DS/GXJpZC6wuIztgWGbpJ8xS5Yr2DASJvKyUuKifYdEQNr8P2wu+v37Z3/TlWP0mOJyaZSfCQsiBIRAwK6FdORiWff0EKoG5XVrYdtSv2SvTbKkLoJGTl5fBV3JqPD05JQEWG0NC5tHkLi7i8nMq8m2LjRwvTfVEGRiHW1JTE0TMXIvSnIFmMmE5E2OcSXJ5bcvXgQ4HKsxix3Jro/gYt/0M9vWesVpAfgYUGCHZSk4wcY4Go38CXoSpBPZyvKluXQdrrZf1FUFmdL1S89ULSSMthAenqxYp1PuESbJpUW1B1hiaL/ArTiEfpe0IUMsTpA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SI2PR02MB5148.apcprd02.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(396003)(366004)(346002)(39860400002)(136003)(451199021)(478600001)(8676002)(8936002)(5660300002)(36756003)(2906002)(31696002)(86362001)(6916009)(4326008)(66946007)(66476007)(316002)(66556008)(38100700002)(41300700001)(83380400001)(31686004)(186003)(6506007)(26005)(6512007)(53546011)(2616005)(6486002)(6666004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SkV2Tjg0NXVrT253Vy8vam54bXcrOXcvVVZhWW5pSjFUL0ZuZTRNU0JULyt3?= =?utf-8?B?TDR2TzJybHlIbHcwUXYwOGZOSDhXWlNkQUo5Wjh3K1V6OUdaZnVoTDdTUXpq?= =?utf-8?B?QUtPMWd0RXYzc0s1d0dFRVl4ZkpCUlR0ZmdHSG1EQ0RFZ2FrVWh0amovYk8x?= =?utf-8?B?Z3dCbk8weEdjeUtDYU9Sb09vbTZjcFY1UkNnTk9YUVFMU2habXpTd3huaExN?= =?utf-8?B?Rk9aNHlFZGI2bE1jY2pucHJRWmRyRXhpcjNlYUJOeUxoNWpRbGllOWI2NStJ?= =?utf-8?B?UmcweWJ2MkFGeGNzNW41K1pmZk5lTzVnNFpLV0NJM1lsbS9pRFBKM0VLUm4w?= =?utf-8?B?S0JUYXloRmpaSC9CWVdFV1R0VERQOGl3TXNzVmh0T2I0am9YT0hFT1FSZmt3?= =?utf-8?B?Mm9Ub29ZYU43TlIyaXRZZFM4cG13ckJETGVuTU44UnhDekxsTE4rS1pia1Bn?= =?utf-8?B?ak4vMkdyRmduS2dQTm9kVmJLQTlCTGg3T0JrUFNHcDZ6M1ZsMUZoakpRdHpZ?= =?utf-8?B?QW5hbEh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l4?= =?utf-8?B?c0pTWGpoRjZEOExBd24rcWZmNmNTYU9GUjlwb1NhbXoxWVQxWk5FTzlrb3RZ?= =?utf-8?B?bHhvUURrVFdPM3dFYnNuM21LY2FJTkdEUnZobW5EQWJnYXR4S1Z4UDlEWXAy?= =?utf-8?B?cWUrZDkwaTg5di9TQmM4akRaUlZvK2V4eXNlT0RnUkVvdE9ycFJzbUR5c29r?= =?utf-8?B?WFlyem9rblZjMEM0MGIrQWJZR0xjb2VJM1B4ZDliSlVVSk1KYkNXczhCUEpz?= =?utf-8?B?T0VVSitsQmU2RzZlL0JUbFJFak5DUFluL2xQV1dzTTZZNHdKVVdrUUdQeFNL?= =?utf-8?B?SCt2azBDTHFzb01DMjRoMHdhSjVOU2p0SmpSM1Y2RzJ1WVMvZWdwNDhXd3J1?= =?utf-8?B?V2RXalNzMFVQMTdZNkhneG1GZzZoR3JNbmpNQ2JmQUY0OTFqSjFxM241Tzdi?= =?utf-8?B?WTFPaG9zeEErR1M0ZWlJUzI2MHJvMXU3QkU3bisxclp0TFAxZmJUN2srK3dz?= =?utf-8?B?bE5VQlB6T3ZjMVVLcy9pUlA1VGdzNjBnVnI0MjM5SDZKckZCb0krSUxFWTBJ?= =?utf-8?B?THZ5RkZVWGRidGVyeFNSQnBhM3RqRDZqbHNpc011S3hRSk5sTmQzLytPOGpF?= =?utf-8?B?a05EUlVLdWZoV1ltczZNTzhwMFdjTlFwZ3NlT1p0WjdKZUZYMm9rZER1OFJy?= =?utf-8?Q?vSFA8kWdb0ajBdQHddBvww0dJ?= X-OriginatorOrg: oppo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f03563c0-ea3a-4d08-7f30-08db62adb8cc X-MS-Exchange-CrossTenant-AuthSource: SI2PR02MB5148.apcprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2023 14:37:27.3301 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f1905eb1-c353-41c5-9516-62b4a54b5ee6 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +HcCrOxbCvnGvHMUJUGJlIeD5oDKvVGZU62yo/Nu4n7zUNGEY2g2Ev6tyDsRydepRI2YuBPKyfm47GeAGIl4/g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR02MB5988 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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-kernel@vger.kernel.org On 2023/6/1 11:16, Eric Biggers wrote: > On Mon, May 29, 2023 at 09:35:00AM +0800, Sheng Yong via Linux-f2fs-devel wrote: >> This patch introduces two ioctls: >> * f2fs_ioc_get_extra_attr >> * f2fs_ioc_set_extra_attr >> to get or modify values in extra attribute area. >> >> The argument of these two ioctls is `struct f2fs_extra_attr', which has >> three members: >> * field: indicates which field in extra attribute area is handled >> * attr: value or userspace pointer >> * attr_size: size of `attr' >> >> The `field' member could help extend functionality of these two ioctls >> without modify or add new interfaces, if more fields are added into >> extra attributes ares in the feture. >> >> Signed-off-by: Sheng Yong > > Aren't there enough things called extra or extended attributes already? Besides > the standard "extended attributes" retrievable with the getxattr() system call, > there is already the FS_IOC_FSGETXATTR ioctl too. Hi, Eric, The name extra_attr is a bit confusing :-( But f2fs usually extends new features through extra_attr, like compression, inode chksum. Since this area is easy to extend, new features could also be added here in the future. To avoid adding new ioctls for new features, these two could help integrate with all extra_attr related ioctls. And it seems not appropriate to add new fields or get/set f2fs-only attributes by FS_IOC_FSGETXATTR/FS_IOC_FSGETXATTR. xattrs could not be accessed through these two, only inline xattr size is allowed to be modified for an empty file. thanks, shengyong > > - Eric