Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13185071ybl; Sun, 29 Dec 2019 06:17:35 -0800 (PST) X-Google-Smtp-Source: APXvYqw7R8PcsyEXUIzz36gHl7mF0tXhAimL6JByNBs8PxkpikQ7tzXpTn68Of3vB7lnHU/RM8bk X-Received: by 2002:a9d:7ac9:: with SMTP id m9mr65876371otn.80.1577629055092; Sun, 29 Dec 2019 06:17:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577629055; cv=none; d=google.com; s=arc-20160816; b=r5L/i6qjO1+6AtRwubMsh3UiGELf3nBQe3JhN/gMMvMW4VmQVZUHnsF11PQ5M0DTIV 1qDhn2/NrSvfxOKKi3ebuzBLRHDB1BFIvG0BK+E+PyQkofm05Yh73MST/UpL1OGBAwXg YYwNBTUBk9Lk3066X8haQVCoVVt2u6m5szbEu+JNT1YMtbyaao31pPR+V2ztdSnfQ8Lh 32MFh8b4xd3N4SKR+X5MPHPYHbBBsBcYYYsFQRYCCd6ryQUWupkb8SPfOpG8+pkCIpZw hXpRQh9YP7X9ggTIdirvg8pGPyf4w555D0Sjnlq8wRDR0La9RhpS/hy3aUxVDrAptQHD 4A7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4//S+eihLFgQG+FF44tL/nOReEy4FYmTgBB/nNp98dA=; b=v6hv6r9UN58Ty0k64nBTNfyxeK5a0srapk4azKD2vCXV5rEiyrDvbxT6PDr2ZbZrjz veG5lmkrFY+Mex1DwTqRKOwaN/8SYpVLzOwV10xW/KYXs8DEIV+/p2c6RwV6SvevnJIA YBC50b3qmpxFHYoL0zKcHRAEbRqw09dLzbLYzgFBt263cyhxWpCRv+oRGXIP0G8FFJ0T P31bXbTb3LYbvvcw2L6zJ5EZWqoWzApEZkXeotYRJmw3M6AGAxs7qpZn4EkMG5xq79eI rW79XFGoTKVPagyNcQeQeeoL23boIc31wM9zifB1J9hhBRgJ/jUJg7Qp/YxZRDiIb0DJ 0oQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iKyPsE20; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q26si17835810oij.38.2019.12.29.06.17.23; Sun, 29 Dec 2019 06:17:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iKyPsE20; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726543AbfL2OPy (ORCPT + 99 others); Sun, 29 Dec 2019 09:15:54 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:51490 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726189AbfL2OPy (ORCPT ); Sun, 29 Dec 2019 09:15:54 -0500 Received: by mail-wm1-f66.google.com with SMTP id d73so12084778wmd.1; Sun, 29 Dec 2019 06:15:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=4//S+eihLFgQG+FF44tL/nOReEy4FYmTgBB/nNp98dA=; b=iKyPsE201SxsR8H44GP3fTCkY5HdrjjKDl3LaddDq+wwXiFu/c4eH08j74sTRfE8s2 314Ww5t4THV0rl/og5y6SgHGhr18daXQ3R296MYXKunhgZZg+OAxYzF7J21UWGxum8wo ZH1j9pX0xl3K3z0ClwUHh6S9VqbjyOP7YzFCJ+oHIu9Ha4Q2M46NTHNThs530MqUbMMs lvg+Yw5JZUotzYJEvRFLfPe9g1TtJV19DmcQ5QZUT/WNHG87rRfeANzHO20dJvH2eDYq anCdqfox+KlYVOqIk0rVfDsyZWa0YwJHh2tRM/PCInkAxKW02sjAKYB78hahyGjMGL49 V/kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=4//S+eihLFgQG+FF44tL/nOReEy4FYmTgBB/nNp98dA=; b=U3mW6OJQSBC8o0r0R9FXqoWRfQcLKDdWoLTAPODuGgiV517gg1iaUbFc5JOsCy875d DlrMjC0zJhYPVIWgdTlg2fEtzV7fQFujGzTR9YBoLE588hLbMs2Ws8AdA8T02+G0uinL lojkvcsTu34lE6Ip1ifPl3r5Lu578F+VDvuy64PMBeCFsfxB3w5SGiEFUCCm0mPveWOW xGWKcS6MhHW1VYhPg23WPNH2Eo7hcSJ4IxwuGfbCG5Qj8v5Q4gTUmWVoiFPnBl9flAhy BSGKdNCOEC4+tPHQXyTCU/u1vdXSQH4ZkBWu7Q5e8MeNkGCE+cG0o7mZFjt4B3KX8F5i EVGA== X-Gm-Message-State: APjAAAUeSKlLqhRd5A5F5LbTeOmqWpVttj9WNHYqCB4MBXUxfHGkFuPN CmjmHapdQ6XTxZiSPtHYUMw= X-Received: by 2002:a05:600c:220e:: with SMTP id z14mr29389578wml.114.1577628951694; Sun, 29 Dec 2019 06:15:51 -0800 (PST) Received: from pali ([2a02:2b88:2:1::5cc6:2f]) by smtp.gmail.com with ESMTPSA id 4sm17525795wmg.22.2019.12.29.06.15.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 29 Dec 2019 06:15:51 -0800 (PST) Date: Sun, 29 Dec 2019 15:15:50 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Namjae Jeon Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, gregkh@linuxfoundation.org, valdis.kletnieks@vt.edu, hch@lst.de, sj1557.seo@samsung.com, linkinjeon@gmail.com Subject: Re: [PATCH v8 03/13] exfat: add inode operations Message-ID: <20191229141550.w66jnp2ayvd4bkk3@pali> References: <20191220062419.23516-1-namjae.jeon@samsung.com> <20191220062419.23516-4-namjae.jeon@samsung.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nfhy2aomfwhdigtr" Content-Disposition: inline In-Reply-To: <20191220062419.23516-4-namjae.jeon@samsung.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --nfhy2aomfwhdigtr Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Friday 20 December 2019 01:24:09 Namjae Jeon wrote: > This adds the implementation of inode operations for exfat. >=20 > Signed-off-by: Namjae Jeon > Signed-off-by: Sungjong Seo > --- > fs/exfat/inode.c | 694 ++++++++++++++++++++++ > fs/exfat/namei.c | 1459 ++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 2153 insertions(+) > create mode 100644 fs/exfat/inode.c > create mode 100644 fs/exfat/namei.c =2E.. > diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c > new file mode 100644 > index 000000000000..1bda97b82ef4 > --- /dev/null > +++ b/fs/exfat/namei.c =2E.. > + > +/* > + * Name Resolution Functions : > + * Zero if it was successful; otherwise nonzero. > + */ > +static int __exfat_resolve_path(struct inode *inode, const unsigned char= *path, > + struct exfat_chain *p_dir, struct exfat_uni_name *p_uniname, > + int lookup) > +{ > + int namelen; > + int lossy =3D NLS_NAME_NO_LOSSY; > + struct super_block *sb =3D inode->i_sb; > + struct exfat_sb_info *sbi =3D EXFAT_SB(sb); > + struct exfat_inode_info *ei =3D EXFAT_I(inode); > + > + /* DOT and DOTDOT are handled by VFS layer */ > + > + /* strip all trailing spaces */ > + /* DO NOTHING : Is needed? */ Hello, this comment looks like a TODO item which should be fixed. > + > + /* strip all trailing periods */ > + namelen =3D __exfat_striptail_len(strlen(path), path); > + if (!namelen) > + return -ENOENT; > + > + /* the limitation of linux? */ And this one too. > + if (strlen(path) > (MAX_NAME_LENGTH * MAX_CHARSET_SIZE)) > + return -ENAMETOOLONG; > + > + /* > + * strip all leading spaces : > + * "MS windows 7" supports leading spaces. > + * So we should skip this preprocessing for compatibility. > + */ > + > + /* file name conversion : > + * If lookup case, we allow bad-name for compatibility. > + */ > + namelen =3D exfat_nls_vfsname_to_uni16s(sb, path, namelen, p_uniname, > + &lossy); > + if (namelen < 0) > + return namelen; /* return error value */ > + > + if ((lossy && !lookup) || !namelen) > + return -EINVAL; > + > + exfat_chain_set(p_dir, ei->start_clu, > + EXFAT_B_TO_CLU(i_size_read(inode), sbi), ei->flags); > + > + return 0; > +} > + --=20 Pali Roh=C3=A1r pali.rohar@gmail.com --nfhy2aomfwhdigtr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQS4VrIQdKium2krgIWL8Mk9A+RDUgUCXgi1FAAKCRCL8Mk9A+RD UtZbAJ9kvwSHrQAHJ7JZmR7C4bLPpG997QCfaxuwF41zC5bTAs1dH8LEqlm3zhQ= =sQej -----END PGP SIGNATURE----- --nfhy2aomfwhdigtr--