Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5414659pxu; Thu, 22 Oct 2020 01:23:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwHkPYXFIfEJq5c6rYaAMU2QfZyCqb0IYmXxvXSy8t8/EewOP79Xa+vB/3tA0DT1usOpze X-Received: by 2002:a17:906:80c9:: with SMTP id a9mr1233237ejx.235.1603355034358; Thu, 22 Oct 2020 01:23:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603355034; cv=none; d=google.com; s=arc-20160816; b=nvw1RgW5qvCuPUxKU1Dyc+wGsNPBod59GSh9sU6JaYlXkATKEm61hyr/30W3svrSuX y7cirbg/cilrnEJqMKiFTQAgyo6ChKvtKGc2ptSwZFLebB9FmSwnQSxlJuYubBnI4HVt T0o6jh0vkO/2tOP8BTjf/f8OpddgRD82WpFLPWA6YkA50Lem7ZPWrXTUgVQ36UWYwUZQ w2IzMF4R/WBmXWEE/0jDY0vbH1/DeWjBHp2mL1djtArUn5Dh4J3S2km80qIvhJtuH+Qz EPJbufHyZqEZjwoC3GtUelKXDzpl+BsA4aCJMslpTdrVnXofEcu10oB+iDfbRqorGGKH 5/Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hvPu2orPfIA1FP9D3ZMrhdO5eFOH5Xcit4mx2sladi4=; b=yTQfE0J0owG/+qIMHadktKX/2XqvVdKqgd/DSPlItdRh2t8yxSHv6YUrSS7XRfehpS 6bjO/c14iLPNQRW/WvXmr8U87cNHnLJauafmyZXs3ldoTjDfwkQpT9PtGdfiPzAGcn5w 20hiaM2kvEAYTaPiQpmUFhxlRooMZKyJ2mV7Da2AJT9rwGFUP6AqCbMLGk2uxoX3BxNy Yx88jSNfVbCQpETdOAC6fErrukZd7pc3Ts95XrDpO2l3qTVhgJ5NlhBkbstj0PVjRNs9 xQli2URMAjWABc1ut4o58gMTcw/dbsQptxIKBtEJ+EN/yCji5E1fuQVn2bHezkSlFzMW 3Iig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="vp/iU+WQ"; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cb20si422125ejb.685.2020.10.22.01.23.31; Thu, 22 Oct 2020 01:23:54 -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=@kernel.org header.s=default header.b="vp/iU+WQ"; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726212AbgJVEW7 (ORCPT + 99 others); Thu, 22 Oct 2020 00:22:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:51668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726188AbgJVEW7 (ORCPT ); Thu, 22 Oct 2020 00:22:59 -0400 Received: from sol.localdomain (172-10-235-113.lightspeed.sntcca.sbcglobal.net [172.10.235.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 97F58223C7; Thu, 22 Oct 2020 04:22:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603340578; bh=abK6GnFdkR0gb+0CmFFSKSBybEXxiaGX7kjbc9XN674=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vp/iU+WQQk/3dF0vOi29eutcyfki6Gh3RadGlE+BrR4V8jSmn7zOw0T5ovw6+w4IR Vb1D8MuHqywZqN7Q+cNJ5x0jVoFx0Xbwe80fUMNUpEObV4AXiJQTxPBuJcqeBfA4yg m21uPK4QSjDz99Z6xksAMK4f1hBpamMHmLSEXEqA= Date: Wed, 21 Oct 2020 21:22:57 -0700 From: Eric Biggers To: Daeho Jeong Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com, Daeho Jeong Subject: Re: [f2fs-dev] [PATCH v2 1/2] f2fs: add F2FS_IOC_GET_COMPRESS_OPTION ioctl Message-ID: <20201022042257.GA857@sol.localdomain> References: <20201022035848.976286-1-daeho43@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201022035848.976286-1-daeho43@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 22, 2020 at 12:58:47PM +0900, Daeho Jeong wrote: > + if (!f2fs_compressed_file(inode)) { > + inode_unlock(inode); > + return -EINVAL; > + } How about using ENODATA here? EINVAL tends to be used for lots of different reasons, and it's not always clear what it means. Note that FS_IOC_GET_ENCRYPTION_POLICY fails with ENODATA when called on an unencrypted file, which is a similar case. - Eric