Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp944349pxx; Thu, 29 Oct 2020 19:41:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLFC8zPAtYyw8Tl59b9mlHWXU2uToffhYwWiOQxjn5ZeWGl1upli2qxKBCdXc2moESKvU5 X-Received: by 2002:a17:906:4bc2:: with SMTP id x2mr349235ejv.525.1604025706347; Thu, 29 Oct 2020 19:41:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604025706; cv=none; d=google.com; s=arc-20160816; b=pdbTjn6K2clEy4xK2OZ2++6wNPv5a3SAQKxRL6tcxr5nx3vpPx6MD1rnJMHAr/NN/w 1Ly1z7+gc1ziL1wH144kxVkmywcqS0WjcMDUqV8u20Sc4SUB5XztXkvn0MzWPK8zNuGq zcVXI50bBuTOLFOCGARhK6PTlZGhlbd/E/TiYCX0Rqh6lFzLYpYTax3ir+VguyZ4pFAR 2F+63RYgvi94yyEHdZPOn8kNBnRVe/qfeN1z3Zp+BKDM3WiB38o0yBGeF94xX+KgEL+z BddzcJ+4LCag9+ACArx4EFTVSwo1MgbUow6xmQlednNJQp67CU71IbRDDj7CH7VPkNF5 rL0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:from:subject; bh=zrRRUAJFPridZfM/u/ExFQ6aq+bhT4nn1lKI4vxNtqI=; b=yWKP0sOYPbUv7oT0RnA24MmaM/yP7hqPQfM08oDoEcA0TbtdKxJhmX2pm3ZgPcznl3 GOzx9vx3RcHrXqrm4qVxmHIMZC9C5ZISx1z5gVE9GhVoEEwVtKY4rZ2Y2bK3bnUzy09M CGz8yvih2r9Sb4R+1rEdCL66zL92v0dBG+XHhzPipxXjWi2H6yXhTBuIkjQ4BmZbmOqj m+0KW4XqXKYc+EtJC9j6l2YGipg05iV043wqgkeuu8Z4MW97somYDN9xLv9IGLEjWOy3 TjiqnAwteS/F0gU1rOzyCAL8cJt66sJKGYZSQev9PYWuedy0pBA38jOWIZ6oge0Pq1U5 crww== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k3si3336357edx.575.2020.10.29.19.41.24; Thu, 29 Oct 2020 19:41:46 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726239AbgJ3Chx (ORCPT + 99 others); Thu, 29 Oct 2020 22:37:53 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:6991 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725815AbgJ3Chw (ORCPT ); Thu, 29 Oct 2020 22:37:52 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4CMmgh63FFzhd3g; Fri, 30 Oct 2020 10:37:52 +0800 (CST) Received: from [10.136.114.67] (10.136.114.67) by smtp.huawei.com (10.3.19.211) with Microsoft SMTP Server (TLS) id 14.3.487.0; Fri, 30 Oct 2020 10:37:45 +0800 Subject: Re: [f2fs-dev] [PATCH v5 1/2] f2fs: add F2FS_IOC_GET_COMPRESS_OPTION ioctl From: Chao Yu To: Daeho Jeong , , , CC: Daeho Jeong References: <20201029041538.4165209-1-daeho43@gmail.com> <861e569d-feae-c521-35b7-dcb8b79cdfba@huawei.com> Message-ID: <61d43f5d-f26c-525a-6405-bae0ca495c6d@huawei.com> Date: Fri, 30 Oct 2020 10:37:45 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <861e569d-feae-c521-35b7-dcb8b79cdfba@huawei.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.136.114.67] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/10/29 15:24, Chao Yu wrote: > On 2020/10/29 12:15, Daeho Jeong wrote: >> + inode_lock(inode); > > It's minor, > > inode_lock_shared()? > >> + >> + if (!f2fs_compressed_file(inode)) { >> + inode_unlock(inode); > > inode_unlock_shared()? > >> + return -ENODATA; >> + } >> + >> + option.algorithm = F2FS_I(inode)->i_compress_algorithm; >> + option.log_cluster_size = F2FS_I(inode)->i_log_cluster_size; >> + >> + inode_unlock(inode); > > ditto. Any comments? Thanks,