Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1692176ybg; Wed, 29 Jul 2020 23:25:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAQRWG7CQKpcgdhNXWvZni+w93LuxndYeKQIMtaLJ3cTAu4pcWSj/IqYKqs7Il0rl3MbnW X-Received: by 2002:a17:906:228a:: with SMTP id p10mr1147747eja.23.1596090309772; Wed, 29 Jul 2020 23:25:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596090309; cv=none; d=google.com; s=arc-20160816; b=tf/MAjZj0W4gQcl8bTvD76jzbbKhajTNMsRb6VeysmlNjfPYHNJUQTtZAwmR4cFW/5 lz/GXTXdFwzLmybeUvmJxN+duZFEHhN1F4gvmUqQtribHMPK8kQh7uKgE+KqWACmTaBU ZunQ40Wzi8LcCMvNEb532ki/HDEHGe4YDX0lsT9rhXTg2fjLNAVpH3Ni3YodAPWNbzSV 2JSK4orkTErFkAwqGjNWXBBcFrPeDIvAuIf+F9tHaJSUjf1zrbvMGvPVmRyRQzoazC0G kfS0q6Mh9nepIYvmP8VlSnDALZOYM4EPVfJDo1xNB3S1zivPsXgx5jscYayISFhUELHl zJlA== 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:references:cc:to:from:subject:dkim-signature; bh=Shb9i0LDUlIh9UpG3vq1YdMvlhvbI8HAkHm5WKnBgRI=; b=FsMmm2jWp3r/gRr1Nbiq+VSu/DR91UQfBrX7bCq4L6+c2gA3xR4c/CcaNNj9xctHyS 2xEfoaLJDmJ5Gq2mcuE/bPVhajiO9tDM8yHO7SMZEclsGFK8dCio0Xo2ZswOFhV11JUk mInhkzsLb4GmuTT2h064aHQbUR5kn/InD8J21OOvA5LttQDvYaxYTBYDLm9vOsLpZYGw c1GuKUIB69pVGMay11T5m2Vl5JbZVdY8RFBGqiVUF7zHs/wWsnrq0+OswfTIJwKugIxA IaB8lCMRwPOEPaYEeKMEF4eCggfwrgtwEFQUDwouHm2ko2Dps9+BmT1fHmsRVLY8l1ZB VhHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=De35tnc5; 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 h27si2786944ejd.184.2020.07.29.23.24.46; Wed, 29 Jul 2020 23:25:09 -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=De35tnc5; 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 S1726287AbgG3GYU (ORCPT + 99 others); Thu, 30 Jul 2020 02:24:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726261AbgG3GYT (ORCPT ); Thu, 30 Jul 2020 02:24:19 -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 36D69C061794; Wed, 29 Jul 2020 23:24:18 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id c6so3352632pje.1; Wed, 29 Jul 2020 23:24:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Shb9i0LDUlIh9UpG3vq1YdMvlhvbI8HAkHm5WKnBgRI=; b=De35tnc5xk2HVD/mdWVVmeQxk1EKb045+dYbNw7/gQkxGto19yzGp0yAjDbbQgsnGN rkw+6mA10fyiDLmZq4JiNQHfjZ4wuHm/PbxILPkNikrr6+q6Gr6R25Bfa7mD3DUghi2m umRzj3CMFyFL2qPrvbfov1Dg19ZyyeDOYtwuOmsexkVquJBmWCRKlFV593T80yYAk3JA FcCbAeWPZ98NKQrwuR5Dwb8ShYfMcvpuj+vPjjjwHJwx0eSnN7qcCPD77BI3DK1dT6OH 953zn0EHzO7Tq5PC5XvAB361xxelqUGqUB7/kQFewab31gtiZgKMfbtdV1CnNVLuW0zn N38A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Shb9i0LDUlIh9UpG3vq1YdMvlhvbI8HAkHm5WKnBgRI=; b=Oy/93bXLgxJzCBuGCg7cn49hsZV6HKMs/vq33Dm6QcOanAqLESb6nNxhhBB07CncrO SCwzKkX0hpJ4lCnrIqqSKPIImbFdna+1EdvWDoxs/oDsQj6CWcqhkyP+XL75OJ67ChKg 9rx5MG9r1sL6+nwpPMpUQm+c0vfjHZOUENRXcEH0BYapn2GxPd+PaT6574q9I9nHgATV ZQkckCjc6lS1jWWw6mYMpAw0C4pfaxLbrq7mooKC+7R+556jhPLRZ/TZBpvPMoRkd+7F lGoZgk9XFXY784LfTc5ZLZDQNSgtfCcQ+mn5QyU3A0dNOkA1lTPd942SMIuOT9dy9Mgf hbcA== X-Gm-Message-State: AOAM533FWJLi6W1k54ITewpdQTQaFQglSTl83ladaFRoK2NBCtUt12Ad hNad1u8L2gVMDTASiIsEbpPo4jmwZFM= X-Received: by 2002:a17:902:8bc6:: with SMTP id r6mr18520900plo.289.1596090257450; Wed, 29 Jul 2020 23:24:17 -0700 (PDT) Received: from ?IPv6:2404:7a87:83e0:f800:ccae:99d9:bebb:d2c4? ([2404:7a87:83e0:f800:ccae:99d9:bebb:d2c4]) by smtp.gmail.com with ESMTPSA id d22sm4673206pfd.42.2020.07.29.23.24.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Jul 2020 23:24:17 -0700 (PDT) Subject: Re: [PATCH] exfat: retain 'VolumeFlags' properly From: Tetsuhiro Kohada 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> Message-ID: Date: Thu, 30 Jul 2020 15:24:14 +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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ping.. 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); exfat_set_media_failure() exfat_set_vol_flags(sb, sbi->vol_flag | MEDIA_FAILURE); The implementation is essentially the same for exfat_set_vol_flags(), but I think the intention of the operation will be easier to understand. BR --- Tetsuhiro Kohada