Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp3825670imd; Mon, 29 Oct 2018 13:01:09 -0700 (PDT) X-Google-Smtp-Source: AJdET5e+38OF2g/L9sKh/s3HmPeddiSInp8ZO0LKJ98EkfT0kM1RpeIQqAgPW1pZTuhx2iOfK4LP X-Received: by 2002:a17:902:7847:: with SMTP id e7-v6mr15806240pln.104.1540843269459; Mon, 29 Oct 2018 13:01:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540843269; cv=none; d=google.com; s=arc-20160816; b=KLfDamZOd3auTzHzngWWRbLmFpjLMI45pfnC3rU0OMrx4XWC3QXr8P2k7iUQ3WhpD9 GzHTHqpiza998eGXknts35PBUMh/sJyEfgdqEgc6jp2kbAkkhXGHeUpavK7r8Vng19Oz ldx3024pYM515FA0GMXWXSCCTzfAeGJamVqd/9g4PhN87Kb7xle/QIV3MWaJskYFzisO UL9dERdaW0p7OPLy9/SBVPIFZ9oEApod9TKxDKZS9npd0VwXVt7mEG+fvKBkcwDmXW7e DZt1MWkTXZKO3D3B9YXgm4j4cs7ycJyBYZUxk16XJmIht4/wXPVH4t+MpBUNkdI1A3uc U8+A== 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=LkVrQucNt584PJkOCDxzNBGaaHPJ5tmrxtNtTesCpTQ=; b=srg6UPL/C5kXmNW5HMR/rjn0JGgY+8Hg6G4yNGsWGyqVlGZngWKdjw0pTVzdKrsToG l78mhAqRHsnNVZwBGHWGR3ZauZrrgp3iW6PM18B+VZpdntrHf5hcq33EmBOGkoitK5NR Ce+a+BwdHM3l4F0owipq5X4HQ12eiG2pFd85IM5uZ2rbaYEJfzb2q+BRNNc+o+bVxF88 yy4CNR/zqyCT+aI0DNGO0XR+OR9+IcVtAY/Wt1uzvoB/kDUWMGC9ShtuXJHE3hLlMtiP xYeBsYATTRu6CyL9YJC6s9bIT4qUnOpmcD4zUQkUnj+9Q4eS/IjU/RyosmX5prgnkRw7 dYKQ== 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 s12-v6si20312645plr.307.2018.10.29.13.00.54; Mon, 29 Oct 2018 13:01: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 S1729570AbeJ3Eue (ORCPT + 99 others); Tue, 30 Oct 2018 00:50:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35022 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725781AbeJ3Eue (ORCPT ); Tue, 30 Oct 2018 00:50:34 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 92776720AD; Mon, 29 Oct 2018 20:00:23 +0000 (UTC) Received: from asgard.redhat.com (ovpn-200-27.brq.redhat.com [10.40.200.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4F9755C69F; Mon, 29 Oct 2018 20:00:21 +0000 (UTC) Date: Mon, 29 Oct 2018 21:00:50 +0100 From: Eugene Syromiatnikov To: linux-kernel@vger.kernel.org Cc: Alexander Viro , Jeff Layton , "J. Bruce Fields" , Greg Kroah-Hartman , Ingo Molnar , Shaohua Li , Jens Axboe , linux-raid@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH v2 1/2] fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint Message-ID: <1ecb0e6b12027fb6a96e101a7a1e94171ae35d9b.1540843065.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.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 29 Oct 2018 20:00:23 +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 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 0831851..9f7f57e 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 6448cdd..e8f878a 100644 --- a/include/uapi/linux/fcntl.h +++ b/include/uapi/linux/fcntl.h @@ -57,7 +57,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 @@ -65,6 +65,13 @@ #define RWH_WRITE_LIFE_EXTREME 5 /* + * The originally introduced spelling remained from the first + * versions of the patch set that introduced the feature, + * 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 6448cdd..e8f878a 100644 --- a/tools/include/uapi/linux/fcntl.h +++ b/tools/include/uapi/linux/fcntl.h @@ -57,7 +57,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 @@ -65,6 +65,13 @@ #define RWH_WRITE_LIFE_EXTREME 5 /* + * The originally introduced spelling remained from the first + * versions of the patch set that introduced the feature, + * 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