Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp2357576ybg; Thu, 30 Jul 2020 18:31:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzv4H3u0CvPrp6hlUZ44GWsn3kyIZcWwYBgSn6OfZtM7l9o/neRqT8ywWSchUsRoZrGbkD4 X-Received: by 2002:aa7:d809:: with SMTP id v9mr1745676edq.94.1596159065805; Thu, 30 Jul 2020 18:31:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596159065; cv=none; d=google.com; s=arc-20160816; b=GbYDu66nKKIk5MksiFQvoLcq8sA4TJZOhs0P8GYT+zmdRe43y13XYWiXZ31vxzYt42 7UCtoZGs2Alpp6b3Es5dB4A2zx/2tEKnAGBa3bNbNMwuFZCuvpVPxij0RWUsQUpJflhV 08fe1ZMl7piR6QSmrj121QvBaUicFvWO4kY4cUTl5J2ErbsIdc4dcEPPoGNULX/XjLkV YAFGcnqFUn5LaIENXOqrQyPQnDeqyjOwN4yDH/zs+QLqsyr0KQqX5UlttW6Lq3gpRx6g ft417ZguR6fNM+fmoFq7Nw95ALGrFNenkXu0qPJjKHqZOGJ1hSBAYa6GUK0VstdEcN2k eSaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=BPX14SfgZIqanMjmDVIeyMD8ehnyG/kjpUhwRu/f6rQ=; b=c4DnY4EOxZ6f88U1z7qKSzY/GXoHfods5qHnRP4LIygR16KDrlTT87vY1KJhK1n9Ka qBwzth/uFcwLhnhFiWLrpKbLgDNhqI8opdiZRjTgrb5mEJCCRsDRnwGZB7jrVKXiXa+t jMRrM6NJuAjY5LdAZDTfLq9CUT3W/8SUxgJNwh7Tv4ASL2xkwoIJ8daBkSM6Vpp9XOxc ANt7swXHONxyUOcgHlV/Qp5ZQQmpufx2qS2giAnyw7A1njRKAsrUKBD4D7nFrppJhIob g9r5fb2oiKu4FK+vcWSq/gAdlhwMX72kit+Jfsokj5ODnv9O964dFEsD72/e3WkMyeAf pwFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BHp2ipeZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id g8si4097530ejm.100.2020.07.30.18.30.38; Thu, 30 Jul 2020 18:31:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BHp2ipeZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1730910AbgGaB3r (ORCPT + 99 others); Thu, 30 Jul 2020 21:29:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727039AbgGaB3q (ORCPT ); Thu, 30 Jul 2020 21:29:46 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69B77C061574; Thu, 30 Jul 2020 18:29:46 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id ha11so6259531pjb.1; Thu, 30 Jul 2020 18:29:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=BPX14SfgZIqanMjmDVIeyMD8ehnyG/kjpUhwRu/f6rQ=; b=BHp2ipeZ58rNCZXiTbuFYzN3/UUzDE4xRhyn4L5TXcE7Zd9Yrb9xUk9PMk9cZgp5tL GBLU4JizBTs60MEHH6uBeZPyjDcgtJ23sa4+qduV9YbUI05YrZQjNuDdK7c872RUcbgm Lmw6eAqBNhO/ZwF7Va1hP224Q4+i0uABlQLv1UISs67lRkgUodTSMMX9CB5GrD//G3Ov CWmvtXq9vklvj4ECGv5l4YJoZ9qZjU8a6mkj0NP51mQyklFon/uFx7A4eWmCXqUg1kFH MxI3YozfdOdZvzE6pNdZ2dT0wizGuXwRLywbWNG9XBTPPKCqaueL+j9WfAUIXoRHBPA2 iRcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=BPX14SfgZIqanMjmDVIeyMD8ehnyG/kjpUhwRu/f6rQ=; b=RroAQOlq0q7iSWoDUkaDYaGObQETqR/sKjFofXmgcfeik5zlQSyHV2LCOPKFqaXr+T uYzi7e/NjCYGPqF3IQ2x7tMUFQVejGLnd+/vol4uy8jYz2KUXZ/nCTLPvs5FahRYmgDG jGvDocHYFSBBwlNvAZ8LEPBkFkczlBPYk8i6imO9yiY6O7yPjn8f/WdwjoCvXt2G07yZ ry38ACA4m5OpopMlbjW6X8+naP7wvB8CI2L2CwsWFWMIhWa40AOu+tyrEdh1cdS9HaNN bVRV63C0DzgZDCuV+DtCKx+UNVxwfeHjJidWG0HgIK1JJYWkBZd8X+rH4SQzc+0PDsXx IdSw== X-Gm-Message-State: AOAM531DM6DLVlmPTBV1fFH98EE9C97PlHLZGTKIXuatypV8u+BJEb/R xHMCMoxVSDMNUekv8gwXQddTrMb6MqE= X-Received: by 2002:a17:902:830a:: with SMTP id bd10mr1636513plb.206.1596158985620; Thu, 30 Jul 2020 18:29:45 -0700 (PDT) Received: from ?IPv6:2404:7a87:83e0:f800:3191:c776:c32a:7a53? ([2404:7a87:83e0:f800:3191:c776:c32a:7a53]) by smtp.gmail.com with ESMTPSA id f18sm7656107pgv.84.2020.07.30.18.29.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Jul 2020 18:29:45 -0700 (PDT) Subject: Re: [PATCH] exfat: retain 'VolumeFlags' properly To: Namjae Jeon , Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp Cc: Mori.Takahiro@ab.MitsubishiElectric.co.jp, Motai.Hirotaka@aj.MitsubishiElectric.co.jp, 'Sungjong Seo' , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200708095746.4179-1-kohada.t2@gmail.com> <005101d658d1$7202e5d0$5608b170$@samsung.com> <015801d65a4a$ebedd380$c3c97a80$@samsung.com> <015e01d6663e$e99e4ec0$bcdaec40$@samsung.com> From: Tetsuhiro Kohada Message-ID: Date: Fri, 31 Jul 2020 10:29:41 +0900 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <015e01d6663e$e99e4ec0$bcdaec40$@samsung.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/07/30 15:59, Namjae Jeon wrote: >> Ping.. > Hi Tetsuhiro, Thank you for your reply. >> On 2020/07/15 19:06, Tetsuhiro Kohada wrote: >>>> It looks complicated. It would be better to simply set/clear VOLUME DIRTY bit. >>> >>> I think exfat_set_vol_flags() gets a little complicated, because it >>> needs the followings (with bit operation) >>> a) Set/Clear VOLUME_DIRTY. >>> b) Set MEDIA_FAILUR. >> >> How about splitting these into separate functions as below? >> >> >> exfat_set_volume_dirty() >> exfat_set_vol_flags(sb, sbi->vol_flag | VOLUME_DIRTY); >> >> exfat_clear_volume_dirty() >> exfat_set_vol_flags(sb, sbi->vol_flag & ~VOLUME_DIRTY); > Looks good. > >> >> exfat_set_media_failure() >> exfat_set_vol_flags(sb, sbi->vol_flag | MEDIA_FAILURE); > Where will this function be called? We don't need to create unused functions in advance... Sorry. I ran ahead without explaining. I would like to set MEDIA_FAILURE when a format error is detected so that fsck will be run on the next mount. This patch is the basis for setting MEDIA_FAILURE. But, I have no reason to implement this right now, as you say. I'll add it in a patch that sets MEDIA_FAILURE. BTW I would like your opinion on the timing of clearing VOLUME_DIRTY. https://lore.kernel.org/linux-fsdevel/c635e965-6b78-436a-3959-e4777e1732c1@gmail.com/#t BR --- Tetsuhiro Kohada >