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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 374FDC6FA86 for ; Wed, 14 Sep 2022 10:23:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229791AbiINKXD (ORCPT ); Wed, 14 Sep 2022 06:23:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229761AbiINKWw (ORCPT ); Wed, 14 Sep 2022 06:22:52 -0400 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDB5D7A749 for ; Wed, 14 Sep 2022 03:22:48 -0700 (PDT) Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20220914102244epoutp03330988f28723cf500b4f36d0fd2807ed~Usv2akFBh2684426844epoutp03K for ; Wed, 14 Sep 2022 10:22:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20220914102244epoutp03330988f28723cf500b4f36d0fd2807ed~Usv2akFBh2684426844epoutp03K DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1663150964; bh=3XsgNhx/oEAbk//ISB15e+OTI46PpfVBX4MSK1qwYYk=; h=From:To:Cc:In-Reply-To:Subject:Date:References:From; b=Rw7Ydyo3tRUc2xkK9r7L8ICTn9Hww2qsJ8/nI5fqoVZD4MGU2fdwdAjXAxo5hIqgZ aJPj0uwMqFUJs6Ikwt15DccJcp7EJOtrfz2DbE2epY9xE+G4y8XTaKwzAReWMXfQSZ wsVCGQw6DHFfK3JwXlc8MEIvGdWiJkHA2JVz/4c8= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20220914102244epcas1p46ddb7d06cb5077aa7d37f5053bf5b88a~Usv2LKy0s2766327663epcas1p4O; Wed, 14 Sep 2022 10:22:44 +0000 (GMT) Received: from epsmges1p4.samsung.com (unknown [182.195.38.242]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4MSGcN0QYPz4x9Pr; Wed, 14 Sep 2022 10:22:44 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p4.samsung.com (Symantec Messaging Gateway) with SMTP id 22.00.18616.37BA1236; Wed, 14 Sep 2022 19:22:43 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p1.samsung.com (KnoxPortal) with ESMTPA id 20220914102243epcas1p12cd7638935cddc8a2c81069b41724d0c~Usv1hxWEz3113331133epcas1p1a; Wed, 14 Sep 2022 10:22:43 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220914102243epsmtrp2a154ce60d0c83b139c76cc1b476c836b~Usv1hDkUo0251902519epsmtrp2V; Wed, 14 Sep 2022 10:22:43 +0000 (GMT) X-AuditID: b6c32a38-6cfff700000048b8-a8-6321ab73c501 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id BA.51.14392.37BA1236; Wed, 14 Sep 2022 19:22:43 +0900 (KST) Received: from W10PB11329 (unknown [10.253.152.129]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220914102243epsmtip10b696ac82c72f40ea09f04d7da05eb96~Usv1Udrsg1683016830epsmtip1F; Wed, 14 Sep 2022 10:22:43 +0000 (GMT) From: "Sungjong Seo" To: "'Rover'" <739817562@qq.com>, "'linkinjeon'" Cc: "'linux-kernel'" , "'linux-fsdevel'" , In-Reply-To: Subject: RE: RE: [PATCH v1] exfat: remove the code that sets FileAttributes when renaming Date: Wed, 14 Sep 2022 19:22:43 +0900 Message-ID: <08bb01d8c823$ed1e0dd0$c75a2970$@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQLiLS1ckQU2fx+m2qoL2gnRLP1zpQJkLg6Wq7jCpzA= Content-Language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrPJsWRmVeSWpSXmKPExsWy7bCmvm7xasVkg+V7bCxaXu5gtZg4bSmz xZ69J1ksLu+aw2ax5d8RVgdWj02rOtk8bj1by+rRt2UVo8fnTXIBLFENjDaJRckZmWWpCql5 yfkpmXnptkqhIW66FkoKGfnFJbZK0YaGRnqGBuZ6RkZGesaWsVZGpkoKeYm5qbZKFbpQvUoK RckFQLW5lcVAA3JS9aDiesWpeSkOWfmlIMfqFSfmFpfmpesl5+cqKZQl5pQCjVDST/jGmDH/ 2Uz2gsNKFY8u7mZpYHwq08XIySEhYCJx5tVDxi5GLg4hgR2MErdWrYJyPjFK/Fndww7hfGOU OHPwAzNMy8sd+9kgEnsZJZ5P3wfV8pJR4sjJfhaQKjYBXYknN36CdYgIeEi8f9vCAlLELNDE KHH19wmmLkYODk4BJ4kPa51BaoQFoiVWfZvDBmKzCKhKzPz2A8zmFbCUWDjnG5QtKHFy5hOw +cwC8hLb386BukhBYveno6wQu6wk7mxYxg5RIyIxu7ONGWSvhEArh8Sq3W/ZIBpcJB7O28IE YQtLvDq+hR3ClpL4/G4vVE03MADO8UI0T2CUaLlzlhUiYSzx6fNnRpAHmAU0Jdbv0ocIK0rs /D2XEcIWlDh9rZsZ4gg+iXdfe1hByiUEeCU62oQgSlQkvn/YyTKBUXkWktdmIXltFpIXZiEs W8DIsopRLLWgODc9tdiwwAQ5xjcxgtOqlsUOxrlvP+gdYmTiYDzEKMHBrCTC2xeikCzEm5JY WZValB9fVJqTWnyIMRkY2BOZpUST84GJPa8k3tDE2MD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N1Zkb1Yzb5afkBl1ukipb+G2mJ0L/ZPPbS+c tvPwk1sJ7apa2tbPp4vV32TeeDovM1Jhj/9cY5MFbGufyho88y35f6nQI9lGjeFx/C391B+l VzbIOovJT5onViH758zKHW8uH1j/ddYbJpvMmhuqRo8XF/NZPJvS//hFtkMpz2KG6xKtqwzf tHndqYpacMhzRdCylckd/3eevff+4hOt1RcKtQLqwmTXNyx1MNO7Xu1z2CZ6SVMU3z+W9asO l33IyG1dt/ZExQ53wRfTPkf61v5ynfD/a7Dx4aKaUrUzPVFFThZaDm9c3zAUMe0umvJsQ9Fu B44JSizFGYmGWsxFxYkAi1EXXgMDAAA= X-CMS-MailID: 20220914102243epcas1p12cd7638935cddc8a2c81069b41724d0c X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE X-ArchiveUser: EV CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220914092543epcas1p1526e62ff4587f70d09bcefab3a97cbe2 References: Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org > Hi Sungjong, > > This patch is to remove the duplicate setting ATTR_ARCHIVE when renaming. > > We know that a file will not become a directory after being renamed, and a > directory will not become a file after being renamed. Sure, rename-op does not change any types of files. > >> > >> *epnew = *epold; > So ATTR_ARCHIVE is already set here if rename file. Do you think ATTR_ARCHIVE represents the file type? If so, you probably are misunderstanding ATTR_ARCHIVE. It's just like a flag indicating that there was a change. For example, in case of rename, it's just like a flag indicating that its name has been changed. The current linux exfat implementation does not yet provide an IOCTL to control this attribute, but keep in mind that the ATTR_ARCHIVE may be removed even if it is a file via another exfat driver. B.R. Sungjong Seo > > >> - if (exfat_get_entry_type(epnew) == TYPE_FILE) { > >> - epnew->dentry.file.attr |= > cpu_to_le16(ATTR_ARCHIVE); > No need to set again here. > > >> - ei->attr |= ATTR_ARCHIVE; > ei->attr doesn't change and already set ATTR_ARCHIVE in > exfat_fill_inode() > > >> - } > > Best regards, > Rover > > ------------------ Original ------------------ > From: "Sungjong Seo" ; > Date: Wed, Sep 14, 2022 04:48 PM > To: "Rover"<739817562@qq.com>;"'linkinjeon'"; > Cc: "'linux-kernel'";"'linux- > fsdevel'" fsdevel@vger.kernel.org>;"sj1557.seo"; > Subject: RE: [PATCH v1] exfat: remove the code that sets FileAttributes > when renaming > > > Hi, Rover, > > This patch seems to violate the exFAT specification below. > Please refer to the description for ATTR_ARCHIVE in FAT32 Spec. > > * Archive > This field is mandatory and conforms to the MS-DOS definition. > > * ATTR_ARCHIVE > This attribute supports backup utilities. This bit is set by the FAT file > system driver when a file is created, renamed, or written to. Backup > utilities may use this attribute to indicate which files on the volume > have been modified since the last time that a backup was performed. > > Thanks. > B.R. > > Sungjong Seo > > > When renaming, FileAttributes remain unchanged, do not need to be > > set, so the code that sets FileAttributes is unneeded, remove it. > > > > Signed-off-by: rover &lt;739817562@qq.com&gt; > --- > >  fs/exfat/namei.c | 12 ------------ >  1 file changed, > 12 deletions(-) > > diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c > > index b617bebc3d0f..5ffaf553155e 100644 > --- a/fs/exfat/namei.c > > +++ b/fs/exfat/namei.c > @@ -1031,10 +1031,6 @@ static int > exfat_rename_file(struct inode *inode, > struct exfat_chain *p_dir, > > return -EIO; > >  *epnew = *epold; > -if > (exfat_get_entry_type(epnew) == TYPE_FILE) { > - epnew- > &gt;dentry.file.attr |= > cpu_to_le16(ATTR_ARCHIVE); > - ei- > &gt;attr |= ATTR_ARCHIVE; > -} >  exfat_update_bh(new_bh, > sync); >  brelse(old_bh); >  brelse(new_bh); > @@ - > 1063,10 +1059,6 @@ static int exfat_rename_file(struct inode *inode, > > struct exfat_chain *p_dir, >  ei-&gt;dir = *p_dir; >  > ei-&gt;entry = newentry; > } else { > -if > (exfat_get_entry_type(epold) == TYPE_FILE) { > - epold- > &gt;dentry.file.attr |= > cpu_to_le16(ATTR_ARCHIVE); > - ei- > &gt;attr |= ATTR_ARCHIVE; > -} >  exfat_update_bh(old_bh, > sync); >  brelse(old_bh); >  ret = > exfat_init_ext_entry(inode, p_dir, oldentry, > @@ -1112,10 +1104,6 @@ > static int exfat_move_file(struct inode *inode, > struct exfat_chain > *p_olddir, >  return -EIO; > > *epnew = *epmov; > - > if (exfat_get_entry_type(epnew) == TYPE_FILE) { > -epnew- > &gt;dentry.file.attr |= cpu_to_le16(ATTR_ARCHIVE); > -ei- > &gt;attr |= ATTR_ARCHIVE; > - } > exfat_update_bh(new_bh, > IS_DIRSYNC(inode)); > brelse(mov_bh); > brelse(new_bh); > > -- > 2.25.1 fsdevel@vger.kernel.org> kernel@vger.kernel.org>