Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8611273ybl; Thu, 16 Jan 2020 20:53:39 -0800 (PST) X-Google-Smtp-Source: APXvYqw8mXNjx41ttC4T5GpuXxnEwSFf+a5MsGq0X6IAI1sBJHLk9153a9shvb0Fr0TcLwW+amrf X-Received: by 2002:a05:6808:a8e:: with SMTP id q14mr2020746oij.173.1579236818887; Thu, 16 Jan 2020 20:53:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579236818; cv=none; d=google.com; s=arc-20160816; b=D1A4z+O+9/LO777/ZN3sfvOsIrE0XchqgWwNmnt/Lb2kAZykZNa6vc6uK+61QRJ+Qk sbqHxaqIusW4w4LkVhJ+qBjbxkmL7yijP8QqOq7PNN21bS0nbgoac/7QRAbtlIN9PEqB WtGnfB2Zh3eMVQCf1dvXD+W8VWprt8bYYTA5NKR/D8g0AsJl9XN+Ny1HGW26pW7WgHeD lmcDprtkOQGdrRtU5Cw6PpKZsOk2vb7naeBCwKetm+6svQHzQ9rklAasSWUHS8Iv0q50 yI4LdkmSJDh4IgfR3XR0qeL7qpnar3y1xaFi/F62XmWkGymX2QInjNPAUpbeaS6DDAQm lCaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type :thread-index:content-language:content-transfer-encoding :mime-version:message-id:date:subject:in-reply-to:cc:to:from :dkim-signature:dkim-filter; bh=KjrIkDdlRMvRt8qo00N+7BUNTvZULChW1Gqc6V6oOLM=; b=mxWc9JzNIQvqKJsko1X/0xwwSb3sVO0gXDg5q0OQEJ1s5RbDQXkFEoc3dRt2jmHyqF gdecr/Ot8NIoD4Hymh6Gc1zvZ9VcvaB3EHzRGs1JLnWGSv1xjcKnn6mXSW30hc18B8qi iJp9yw67rwIsKQxecguVdVUI4tOzlZhFgcY88KVWUlj2Wsr+aXF26uGNpV/GO3lsd8rS ZZXUnZ2X/cxrl7DKPoPfh2+C2031GzYRbf9MTjM0wl8EnBAAnELcmVHSDPJb3e8xBX3R H3BXgDHIzBOI3J8Ambm3pukfdpdeoeTQRDQwnYJIW9DUJKtUqn/vh9X+XQXhBBVBTOSb 9KUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="RTkmzx/c"; 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=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m24si12226779oic.11.2020.01.16.20.53.27; Thu, 16 Jan 2020 20:53:38 -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=@samsung.com header.s=mail20170921 header.b="RTkmzx/c"; 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=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389095AbgAQC7g (ORCPT + 99 others); Thu, 16 Jan 2020 21:59:36 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:17850 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389065AbgAQC7f (ORCPT ); Thu, 16 Jan 2020 21:59:35 -0500 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20200117025931epoutp03068772249564c9941b73a68a4a6ec190~qjUrC75F40836908369epoutp03V for ; Fri, 17 Jan 2020 02:59:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20200117025931epoutp03068772249564c9941b73a68a4a6ec190~qjUrC75F40836908369epoutp03V DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1579229971; bh=KjrIkDdlRMvRt8qo00N+7BUNTvZULChW1Gqc6V6oOLM=; h=From:To:Cc:In-Reply-To:Subject:Date:References:From; b=RTkmzx/cVh4iOvCABsgsSkvseIF0rOcHVbWZvHz2G1KlHY7RWceAL8oZKk220SWf3 ZW4XyUwsJB2p79UYdqF0Ruonp55b5bC2sl5vYFVwqTJ2KioVXB5GNt/mSqPoBbo3Nn 4EwyuVwaxg2A0d1nyN5w/yogzDbr281lwZo5nRUo= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20200117025930epcas1p2b70ca37d444b8ef5e0df2acbd6ef5004~qjUqU8XeA0521805218epcas1p21; Fri, 17 Jan 2020 02:59:30 +0000 (GMT) Received: from epsmges1p4.samsung.com (unknown [182.195.40.165]) by epsnrtp4.localdomain (Postfix) with ESMTP id 47zQl56B8YzMqYkb; Fri, 17 Jan 2020 02:59:29 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p4.samsung.com (Symantec Messaging Gateway) with SMTP id 21.6A.48019.113212E5; Fri, 17 Jan 2020 11:59:29 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p3.samsung.com (KnoxPortal) with ESMTPA id 20200117025929epcas1p3daf55818eec5a1acecb1d793ad7b0173~qjUo6RSu51290112901epcas1p3_; Fri, 17 Jan 2020 02:59:29 +0000 (GMT) Received: from epsmgms1p2new.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200117025929epsmtrp1e42ceb2a912f02e102dacde746c5f5c9~qjUo2tCxU0516405164epsmtrp1M; Fri, 17 Jan 2020 02:59:29 +0000 (GMT) X-AuditID: b6c32a38-257ff7000001bb93-9b-5e212311d954 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2new.samsung.com (Symantec Messaging Gateway) with SMTP id D8.0F.06569.113212E5; Fri, 17 Jan 2020 11:59:29 +0900 (KST) Received: from namjaejeon01 (unknown [10.88.104.63]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200117025929epsmtip2a5457aa015a9cd02d66054cc8bf8c9bd~qjUou_59z1176811768epsmtip2p; Fri, 17 Jan 2020 02:59:29 +0000 (GMT) From: "Namjae Jeon" To: "'Arnd Bergmann'" Cc: "'Namjae Jeon'" , , "'Linux FS-devel Mailing List'" , "'gregkh'" , =?UTF-8?Q?'Pali_Roh=C3=A1r'?= , "'Valdis Kletnieks'" , "'Christoph Hellwig'" , In-Reply-To: Subject: RE: [PATCH v10 09/14] exfat: add misc operations Date: Fri, 17 Jan 2020 11:59:29 +0900 Message-ID: <002801d5cce2$228d79f0$67a86dd0$@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Content-Language: ko Thread-Index: AQDl4arpJeuFoAiOGgh7zDYNQFC3mAHvmPGdAYS70pMCTZrZ/wIalS1qAZ8YAg8BhDMOogFX8NFhAlVLKr8BX6mCFwHtIwURqT4Yc0A= X-Brightmail-Tracker: H4sIAAAAAAAAA02Ta0hTYRjHe3e2czZxdZxWL5a2jihZqJtz81guhCzWBVoFIUKuo568tBs7 m6QWCYK3xNIv2lQshEIzFNM004xZill90NAmWZJmaZGpmJYXOvMo+e33Pu//ef7P816EiKQV 9RamGK20xUjpCdSN/7grMDjIw29vnOzdhJxcKenGyOzqepSsefCSRw6NDCNke0cvnxxoq0DJ 4r4lHtm0+kJA9k//4keJNEt/S4DmiX0E03RW1mGap84sVFPUVAs0c42+GkfLD1SLxeojk2kq kbZIaWOCKTHFmKQmTp7THdEpVTJ5kDyCDCekRspAq4noU9qgYyl6tjVCmkbpbWxISzEMEXI4 0mKyWWlpsomxqgnanKg3y2XmYIYyMDZjUnCCyXB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wDMmietvO9ghOvpYJa4fms8IUsUpEChx6fB7dhBb WMASyD4GZrMAdT/Y0wNWwwsUX9N8gwXCFpQ4OfMJmM0soC3R+7CVEcZetvA1M8SlChI/ny5j hYiLSMzubGOGuKhM4tWPSYwTGIVnIRk1C8moWUhGzULSvoCRZRWjZGpBcW56brFhgVFearle cWJucWleul5yfu4mRnDkaWntYDxxIv4QowAHoxIP74wghTgh1sSy4srcQ4wSHMxKIrwnZ8jG CfGmJFZWpRblxxeV5qQWH2KU5mBREueVzz8WKSSQnliSmp2aWpBaBJNl4uCUamAM49Pf3P7X 4/eU+5se7+FfvEk7QyVfvKh9Of8ejndrj2z8mLbq+tFjRmLtXxf0rvRMNL4XlvNHUPF1kwhv mvjJLuP8W0nzY1N22Sq5qr72PXTP68WNr30HTDxXr69wje1YlahUarPrVrXKFv4GrX1fX79W jfwit2bWl29M839o8y3lXJJ7dIeEEktxRqKhFnNRcSIAxHOEf7gCAAA= X-CMS-MailID: 20200117025929epcas1p3daf55818eec5a1acecb1d793ad7b0173 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20200115082824epcas1p4eb45d088c2f88149acb94563c4a9b276 References: <20200115082447.19520-1-namjae.jeon@samsung.com> <20200115082447.19520-10-namjae.jeon@samsung.com> <20200115133838.q33p5riihsinp6c4@pali> <20200115142428.ugsp3binf2vuiarq@pali> <20200115153943.qw35ya37ws6ftlnt@pali> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org =20 > This is what I think the timezone mount option should be used > for: if we don't know what the timezone was for the on-disk timestamp, us= e > the one provided by the user. However, if none was specified, it should b= e > either sys_tz or UTC (i.e. no conversion). I would prefer the use of UTC > here given the problems with sys_tz, but sys_tz would be more consistent > with how fs/fat works. Hi Arnd, Could you please review this change ? /* Convert a EXFAT time/date pair to a UNIX date (seconds since 1 1 70). */ void exfat_get_entry_time(struct exfat_sb_info *sbi, struct timespec64 *ts, __le16 time, __le16 date, u8 tz) =7B =20 u16 t =3D le16_to_cpu(time); u16 d =3D le16_to_cpu(date); =20 ts->tv_sec =3D mktime64(1980 + (d >> 9), d >> 5 & 0x000F, d & 0x001= F, t >> 11, (t >> 5) & 0x003F, (t & 0x001F) << 1= ); ts->tv_nsec =3D 0; =20 if (tz & EXFAT_TZ_VALID) /* Adjust timezone to UTC0. */ exfat_adjust_tz(ts, tz & =7EEXFAT_TZ_VALID); else =20 /* Convert from local time to UTC using time_offset. */ ts->tv_sec -=3D sbi->options.time_offset * SECS_PER_MIN; =7D /* Convert linear UNIX date to a EXFAT time/date pair. */ void exfat_set_entry_time(struct exfat_sb_info *sbi, struct timespec64 *ts, __le16 *time, __le16 *date, u8 *tz) =7B struct tm tm; u16 t, d; time64_to_tm(ts->tv_sec, 0, &tm); t =3D (tm.tm_hour << 11) =7C (tm.tm_min << 5) =7C (tm.tm_sec >> 1); d =3D ((tm.tm_year - 80) << 9) =7C ((tm.tm_mon + 1) << 5) =7C tm.t= m_mday; *time =3D cpu_to_le16(t); *date =3D cpu_to_le16(d); /* * Record 00h value for OffsetFromUtc field and 1 value for OffsetV= alid * to indicate that local time and UTC are the same. */ *tz =3D EXFAT_TZ_VALID; =7D Thanks=21