Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3446661pxk; Mon, 7 Sep 2020 13:16:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRlp1wT08jxC0HlszBFWLHsgZ4QMn5KvgXKcNQqpi94VsVVpolNe/mEer86ND6ZNXThosl X-Received: by 2002:a17:906:3791:: with SMTP id n17mr22201342ejc.216.1599509812077; Mon, 07 Sep 2020 13:16:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599509812; cv=none; d=google.com; s=arc-20160816; b=qQ62uOZf+381m7WT3pU9HioGYyy7E76gVuB8oN0epk4ITOzWBWIXD8trohWNf69CXJ WeOU1LYL7S8bPNIC9kb+GG1hSafwLWZHQCu7mKEu1mVOLGsigpo7A+hMoCbG7d6haGIc yxTEZsXGZoAmCeZ0/Bt+8jZkUAS/Fzb2Z8L7V/fnE4hrslcs6LgQjzxBhZyOHDtlXvUt DsR5YiNLoSPRcHKq3bQP6AVoD/Fb4nojMuaewrtXGupFFsZ9JXflg6LRXUWyZpYW20JR 5fliaaKXGbGIKCVSdpt618YGaZNXQCL9+b6sA3/8XrN3xoFyFAmzS77C2TZyidGz/zPL sbdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=HFgEvpW3R88BEO0W4TSH3T3fDAqlzxYsLL7Hu+xZbDk=; b=ajTAfrjFHjA0JRDRtK9iIDHmp10uY59SFMpCdzAaruhAqGeL1riF25aUE6FqTOpYMQ U0dy/TjHaJrN5WPjcJSUxJ9jNAc2mBSOHaKngaA2cqYnVYdW5UYDc0/iTExYtKvzHoIa 2IGif250VZYmUPLYGNdHJCaAZWEResle2cbDbxvmVXPowhVLHOfKALGyw6sBBAZjByVc SpnIlrM4ZlzVKVL82lWrcUl/OXHlXt4/WEB4jJ9EvmvYn/jLEi1NVS3LMb3DUGGE6A0h I0phndWXJqmZvcqOQmpj3ql04lTl0p9xs5kmSGZEfJRe9AZYfW8ptXrIRiBF8xoLVNl5 ZcRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=aiJetSAJ; 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 k20si10045834eje.105.2020.09.07.13.16.29; Mon, 07 Sep 2020 13:16:52 -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=fail header.i=@infradead.org header.s=casper.20170209 header.b=aiJetSAJ; 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 S1729355AbgIGUPU (ORCPT + 99 others); Mon, 7 Sep 2020 16:15:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728834AbgIGUPU (ORCPT ); Mon, 7 Sep 2020 16:15:20 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98596C061573; Mon, 7 Sep 2020 13:15:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=HFgEvpW3R88BEO0W4TSH3T3fDAqlzxYsLL7Hu+xZbDk=; b=aiJetSAJfdkq2mh4ZZZDTgDH+/ Ie8NLiM2SBOSMVrp6U1arwYlqWE/Eo7L1GvO+mumyvIKb3pXf2OvUTMbNtqiec50Yzppr40TT3rLJ MacFYA88gNS6w/wSHlUblr5xFGBonsGmLvl1Vugh96YU5HprbUDtJ/Ygg5CiDf13Y8Zg8UrieyKf6 ishVTLin826hOaiVwCseYjJ+/eQU7mFqgirgNNeWnc04FKYw/RESX96q4gdUbQsxx2n+aST7+snYg 3ZcVc90rjMvVgWdWPlilljSLcGDkJ8HNSyZRLn23jhhrMnh4DWFsWB2Kn8XQrGpet07mHWrB5/Ril DchM4ukA==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFNXo-0007o8-OB; Mon, 07 Sep 2020 20:15:17 +0000 Date: Mon, 7 Sep 2020 21:15:16 +0100 From: Matthew Wilcox To: Jens Axboe Cc: linux-fsdevel , "linux-kernel@vger.kernel.org" , Alexander Viro , Jann Horn Subject: Re: [PATCH] fs: align IOCB_* flags with RWF_* flags Message-ID: <20200907201516.GC27537@casper.infradead.org> References: <95de7ce4-9254-39f1-304f-4455f66bf0f4@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <95de7ce4-9254-39f1-304f-4455f66bf0f4@kernel.dk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 31, 2020 at 12:08:10PM -0600, Jens Axboe wrote: > We have a set of flags that are shared between the two and inherired > in kiocb_set_rw_flags(), but we check and set these individually. > Reorder the IOCB flags so that the bottom part of the space is synced > with the RWF flag space, and then we can do them all in one mask and > set operation. > > The only exception is RWF_SYNC, which needs to mark IOCB_SYNC and > IOCB_DSYNC. Do that one separately. > > This shaves 15 bytes of text from kiocb_set_rw_flags() for me. > > Signed-off-by: Jens Axboe Suggested-by: Matthew Wilcox (Oracle)