Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1077422lqp; Fri, 22 Mar 2024 05:10:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUnBugKSc2ynED1buVHjfPVOr1/TfiWmvN+8NfCBfQF9TdurIhQLZtDB+IRiKbUnuypF5atR072WQ2xEqDigJobC9V4cDcZ1aZuhKLn/A== X-Google-Smtp-Source: AGHT+IEjzshs0pvZ6itGm42HHIE67KFVFTrg6XoclsmfCIBo/4jr+2TY+K7YPap27XPv2zObC9go X-Received: by 2002:a05:6a20:918c:b0:1a3:534b:3211 with SMTP id v12-20020a056a20918c00b001a3534b3211mr2664459pzd.8.1711109430443; Fri, 22 Mar 2024 05:10:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711109430; cv=pass; d=google.com; s=arc-20160816; b=BmxUB8QYsgIXgr4jwZSXdFcXjnjwrbjDH0zhw0n33E29hiCRdp7Nvvj5vcW9xOwIs2 /WOEP9BJH8Ex2NsUaoXIulyibHyoZALCsEjJvBqWDEaYdSdPLcYNqscs2Ry3v+I2cPB3 rK/X14jGYfrqiWe+kjfObg49imbfsOS7YCbM3rpw7Zy9cqtWyyifD856pfMckQJtISyn dC7f/64ZUPg3DlwP1l3i3ECKMpEE2MtR7Zt6qhWJ0SOu0WwPKMIHIFm7n8/vA/zShZm6 5VuktBXwKcyFJyjIkcACUtXmK0cxdMQ8JVs0D+1IORMH7HXJrk89JQG2vAaGvCsBBBUs qYIw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:date:message-id:from :references:cc:to:subject; bh=92O8wLVjUyyeMxDNg0DX46nahQ491tErziOgu4u8ErU=; fh=RtLWWpEP4gFwxDxzRZoRDYCDh8uZfLWj32HoVoXIG0Q=; b=dIkD2ivyvgndH/+IyWG8MQoTGnsQbH6uuYRLevbD1qvoYw/TdBw+M9NvoI88uqO1+N oHmaNYvP1exLJjISoY4aJ3xt7s1hwZ1DkIeaQyTSr6V73UEt1THT9HbqB5t7f327BPxB Yh/rzudGM2nnG/AbOoEGw/RZiIowv6mICU0viWR7/zuq3R3jt7hjp2jrswi1Tfb825hm L2OXq25KA+ra4gDQYPIspf7Dcmy4ime8yafMBzLqftJgGzS/or5kdrBLH6p8eEucsJN/ HJyVhuTYbtwI+aJMt+IhjrTksf+f4c9926LqNR4pldyAFBHU0goS+0RzlROn7LuxYB/f nLPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-111405-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111405-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id gx20-20020a056a001e1400b006e716f28888si1789835pfb.309.2024.03.22.05.10.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 05:10:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111405-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-111405-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111405-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 225DE28392E for ; Fri, 22 Mar 2024 12:10:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CAA473FBB1; Fri, 22 Mar 2024 12:10:23 +0000 (UTC) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 239241EF12 for ; Fri, 22 Mar 2024 12:10:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711109423; cv=none; b=iW+B78AUCk7mlec70agt4bb0E+SBtPC3iFqPEIeTwwRrJVN8CS42k5z4sylMEHC1VeTaofcBAj/plvgun6IcLVzYBmDJoZWoNlPagbBnVkPmJURobYi/V1SOU9ViybZGIPmHxgcywRG52C4hmCzqCrIn3UYMcPV7FKUjSZVSy38= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711109423; c=relaxed/simple; bh=fzHpYpqoTDIMku6jNCaWzH3Jusb3SuDQiK7r1jXcAsU=; h=Subject:To:CC:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=W1T1BqqJU5i7KDSfGVYtnhmt4D1EQjtq3XHTBe19tzINPUGOdeDTeacewW2MwicySgw4VCPSKJoU8KhACJsWeV25IVGBEmJ/9KO/hh0ta1rR9nN7NRtyQ8o6xXalvtjN8VbUbV1k9JrE8V93DkgionQmp3ERoxq6ky+s9jMnAhM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.191 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.44]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4V1Ljm15h3z1GCkx; Fri, 22 Mar 2024 20:09:48 +0800 (CST) Received: from kwepemm600013.china.huawei.com (unknown [7.193.23.68]) by mail.maildlp.com (Postfix) with ESMTPS id A03C614013B; Fri, 22 Mar 2024 20:10:13 +0800 (CST) Received: from [10.174.178.46] (10.174.178.46) by kwepemm600013.china.huawei.com (7.193.23.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 22 Mar 2024 20:10:12 +0800 Subject: Re: [RFC PATCH 4/5] ubifs: Introduce ACLs mount options To: Li Zetao , CC: , References: <20240319161646.2153867-1-lizetao1@huawei.com> <20240319161646.2153867-5-lizetao1@huawei.com> From: Zhihao Cheng Message-ID: <4c30c8e4-92fe-9935-b2ee-7b5728f261fc@huawei.com> Date: Fri, 22 Mar 2024 20:10:11 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600013.china.huawei.com (7.193.23.68) 在 2024/3/22 20:05, Li Zetao 写道: > Hi, > > On 2024/3/21 14:49, Zhihao Cheng wrote: >> 在 2024/3/20 0:16, Li Zetao 写道: >>> Implement the ability to enable or disable the ACLs feature through >>> mount options. "-o acl" option means enable and "-o noacl" means disable >>> and it is enable by default. >>> >>> Signed-off-by: Li Zetao [...] >>> @@ -2011,12 +2041,17 @@ static int ubifs_remount_fs(struct >>> super_block *sb, int *flags, char *data) >>>       sync_filesystem(sb); >>>       dbg_gen("old flags %#lx, new flags %#x", sb->s_flags, *flags); >>> +    c->mount_opts.acl = 0; >>>       err = ubifs_parse_options(c, data, 1); >> >> 1. mount -onoacl /dev/ubi0_0 /mnt # After that, mount will show >> 'noacl' option >> 2. mount -oremount,xxx /dev/ubi0_0 /mnt >> If 'xxx' has nothing to do with acl, c->mount_opts.acl is set as '0'. >> Then superblock flag is assigned with 'SB_POSIXACL' and mount will not >> display 'nocal'. Will it make user confused? > I have tested this use case and it works fine. This is because the mount > options will be re-parsed during remount, just like the last mount. But > this is indeed redundant. I adjusted it to make it more reasonable. Yes, parameter 'data' carries old mount information. Removing the redundant assignment is fine.