Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp1784576ybj; Sun, 22 Sep 2019 11:52:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqypzpe4VTLV5tPAJIwVvhw20Pl/ZNeIsKPXPNB5jovdaUSlmsFa6vnDrmvHSoMF/klXlf5m X-Received: by 2002:a17:907:211c:: with SMTP id qn28mr13160075ejb.244.1569178329463; Sun, 22 Sep 2019 11:52:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569178329; cv=none; d=google.com; s=arc-20160816; b=yq649rhKLjG5ygGCTrHeC/V2FQvX7PV0FIUgzfls0L1h36/z/ENABfbea0Qtzj4GGC Ti5DoFY7ahU0vcjNds3TDZazOMTwnPSXqUdcvoZD84dSlXmgAwEKrTC7pNPP6PJJcYEB KBl+is95zffEQ34Rytkdc5+7dlbZ4La7lUQktr4jI1thj1uw0hGOEhm/8rjWyGB9MbEz 4Idz/GssmzHkcnWb0MMOzEOZQqOdnLPRnwtwMT8ILxZ4KIRX2mr6TWJfeh21m2xQwMD2 K0gfe2o9klYkY44I2RhnzST0AljVHdGQtfXLJdV7i9QkR1xtPzowzj1owjd+nyAqaFx1 NMhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=XEzgUe8KodrQlveVI8uUhOlggL5Ps6TjHUKcRR86vEY=; b=BoiV5vdUVM2D5NdE65OaLphq2joJyPD+/8kRvQvLoejV3eG8x7uzmYQK8W/l5MjWje 3TqFxk/65525OnDoNWEU9A9qm32nFimCr/vICkBqQbDIGcotWIlfRX6hPIkzdjFTLcnA 5EahmRB2uTFXOMwKcmu90JrdWs0QHFMAlEkyYS8Rag9scGJGQrMSFLBfN+r+2J71/wy+ vPovIdk2IE1CCUp3ZgpNaUX1f8NXa0Fr4hN6rfAR/bOFtww/WbQPwvOniOyLtO9+YqH8 HmA23W21ylmzfrjXhNzpFY1lMmOqnd8DSnHJhSkehZn8aD5UosaR/X1tSZJalKgIXK+J WxEA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g5si5356536edb.324.2019.09.22.11.51.45; Sun, 22 Sep 2019 11:52:09 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728392AbfITP6s (ORCPT + 99 others); Fri, 20 Sep 2019 11:58:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46222 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726828AbfITP6s (ORCPT ); Fri, 20 Sep 2019 11:58:48 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1C7338A1C8E; Fri, 20 Sep 2019 15:58:48 +0000 (UTC) Received: from asgard.redhat.com (ovpn-112-68.ams2.redhat.com [10.36.112.68]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C21CF19C5B; Fri, 20 Sep 2019 15:58:43 +0000 (UTC) Date: Fri, 20 Sep 2019 17:58:21 +0200 From: Eugene Syromiatnikov To: linux-kernel@vger.kernel.org Cc: Alexander Viro , Jeff Layton , "J. Bruce Fields" , Arnaldo Carvalho de Melo , Greg Kroah-Hartman , Ingo Molnar , Shaohua Li , Jens Axboe , linux-raid@vger.kernel.org, Song Liu , linux-fsdevel@vger.kernel.org Subject: [PATCH v3 1/3] fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint name Message-ID: <8a7ab0242b9aa8dc89bab0f8054b742162bb10d9.1568994791.git.esyr@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.69]); Fri, 20 Sep 2019 15:58:48 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org According to commit message in the original commit c75b1d9421f8 ("fs: add fcntl() interface for setting/getting write life time hints"), as well as userspace library[1] and man page update[2], R/W hint constants are intended to have RWH_* prefix. However, RWF_WRITE_LIFE_NOT_SET retained "RWF_*" prefix used in the early versions of the proposed patch set[3]. Rename it and provide the old name as a synonym for the new one for backward compatibility. [1] https://github.com/axboe/fio/commit/bd553af6c849 [2] https://github.com/mkerrisk/man-pages/commit/580082a186fd [3] https://www.mail-archive.com/linux-block@vger.kernel.org/msg09638.html Fixes: c75b1d9421f8 ("fs: add fcntl() interface for setting/getting write life time hints") Signed-off-by: Eugene Syromiatnikov --- fs/fcntl.c | 2 +- include/uapi/linux/fcntl.h | 9 ++++++++- tools/include/uapi/linux/fcntl.h | 9 ++++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/fs/fcntl.c b/fs/fcntl.c index 3d40771..41b6438 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -261,7 +261,7 @@ static int f_getowner_uids(struct file *filp, unsigned long arg) static bool rw_hint_valid(enum rw_hint hint) { switch (hint) { - case RWF_WRITE_LIFE_NOT_SET: + case RWH_WRITE_LIFE_NOT_SET: case RWH_WRITE_LIFE_NONE: case RWH_WRITE_LIFE_SHORT: case RWH_WRITE_LIFE_MEDIUM: diff --git a/include/uapi/linux/fcntl.h b/include/uapi/linux/fcntl.h index 1d33835..1f97b33 100644 --- a/include/uapi/linux/fcntl.h +++ b/include/uapi/linux/fcntl.h @@ -58,7 +58,7 @@ * Valid hint values for F_{GET,SET}_RW_HINT. 0 is "not set", or can be * used to clear any hints previously set. */ -#define RWF_WRITE_LIFE_NOT_SET 0 +#define RWH_WRITE_LIFE_NOT_SET 0 #define RWH_WRITE_LIFE_NONE 1 #define RWH_WRITE_LIFE_SHORT 2 #define RWH_WRITE_LIFE_MEDIUM 3 @@ -66,6 +66,13 @@ #define RWH_WRITE_LIFE_EXTREME 5 /* + * The originally introduced spelling is remained from the first + * versions of the patch set that introduced the feature, see commit + * v4.13-rc1~212^2~51. + */ +#define RWF_WRITE_LIFE_NOT_SET RWH_WRITE_LIFE_NOT_SET + +/* * Types of directory notifications that may be requested. */ #define DN_ACCESS 0x00000001 /* File accessed */ diff --git a/tools/include/uapi/linux/fcntl.h b/tools/include/uapi/linux/fcntl.h index 1d33835..1f97b33 100644 --- a/tools/include/uapi/linux/fcntl.h +++ b/tools/include/uapi/linux/fcntl.h @@ -58,7 +58,7 @@ * Valid hint values for F_{GET,SET}_RW_HINT. 0 is "not set", or can be * used to clear any hints previously set. */ -#define RWF_WRITE_LIFE_NOT_SET 0 +#define RWH_WRITE_LIFE_NOT_SET 0 #define RWH_WRITE_LIFE_NONE 1 #define RWH_WRITE_LIFE_SHORT 2 #define RWH_WRITE_LIFE_MEDIUM 3 @@ -66,6 +66,13 @@ #define RWH_WRITE_LIFE_EXTREME 5 /* + * The originally introduced spelling is remained from the first + * versions of the patch set that introduced the feature, see commit + * v4.13-rc1~212^2~51. + */ +#define RWF_WRITE_LIFE_NOT_SET RWH_WRITE_LIFE_NOT_SET + +/* * Types of directory notifications that may be requested. */ #define DN_ACCESS 0x00000001 /* File accessed */ -- 2.1.4