Received: by 10.192.165.148 with SMTP id m20csp5530526imm; Wed, 9 May 2018 06:35:05 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrVV7sAB38UbgjynSkgc82HzrXQ18R1m/cRj7X34SCNm4TrZBjueW8qfcyD2bDCYvVPPLGF X-Received: by 2002:a17:902:7b97:: with SMTP id w23-v6mr38697281pll.116.1525872905801; Wed, 09 May 2018 06:35:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525872905; cv=none; d=google.com; s=arc-20160816; b=SSQT5zW0tNf+Yf4864PnyT9Ale1hEZcWeRYXWDB28RehdwbY6r0wyyEVUXLjHwMrJm FPZzBtm5RxWx67mUa29paUtpgoM/j4M2nJtJVIbc6JJezbG8U38AF1e0glTGuBQpAttd vaXVWcNmwaum3AeL+FNpy6lJC4+SIhwL9PTd/bUzZ90k+kU0HwUvQrtmH2zjqdx8QvGT RtAUcn/9SYVT3nSefQQTugzIYp/hwShQi2kDbMbaYD89reoQhGo7cJS3dmNVJLlR3VNF Q30YHEKXg/2HrbNs+/+kGJim3cHlTeoBANxqtz3w7rtnRzi2J/Un98No/w9So1kFBxaa 0vaA== 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:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=5QAbWWKUTgiPfva1hGhh2VzES4TV3H9Ou4xeu0N1jvg=; b=stITwahA1aya2gWMBDLSCrCAmnzyoCwhGCauydPWBOhjwvvj43O42FUXtIfO0eYShf jkbiUYkxxFdyUMIcIRij3PYhcJsO8T5Vut/mZNrsVkW1xWB/+G05le7kdLaEp4TCOU5/ 5lG4lp9oDGECfjioQc77mnTZ+NTIacf5d1oAKu2+alfJl2s2gDirVIpGXvyoBh6IWuf2 FeDllz05JZNXbrWZPvxVQtBt3GvIbNb92OpfwIKEx54IdXh9ABUFcV4ioEqK4sHiGQvV z62UGhOW/HL0nnUSE/+BfMMEIZj4sqLWmuUL9l7uxI+9xSSJDIEKfQAZcpT33Wa9JtkN PcPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@thunk.org header.s=ef5046eb header.b=Hp+LZOMC; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l65si25151649pfb.69.2018.05.09.06.34.51; Wed, 09 May 2018 06:35:05 -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; dkim=fail header.i=@thunk.org header.s=ef5046eb header.b=Hp+LZOMC; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934806AbeEINei (ORCPT + 99 others); Wed, 9 May 2018 09:34:38 -0400 Received: from imap.thunk.org ([74.207.234.97]:59620 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934110AbeEINeg (ORCPT ); Wed, 9 May 2018 09:34:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; 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:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=5QAbWWKUTgiPfva1hGhh2VzES4TV3H9Ou4xeu0N1jvg=; b=Hp+LZOMCjjCLEPywFYb+fcvhNp 1y/xWfgzPFvbpzCZy0yOeOwYYX14p32DKCMDmGh2R02ww/bXaocObekOKXzo94WFKjjRg1BlN2GGX SMK8b/QmEuHrPQwQwDINXojMUcLhPAAkzOXi8vuSv/KPG4epLhfMIw2LyrwpFNDZ69uI=; Received: from root (helo=callcc.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.89) (envelope-from ) id 1fGPEn-0005d1-Sx; Wed, 09 May 2018 13:34:33 +0000 Received: by callcc.thunk.org (Postfix, from userid 15806) id CCA907A5995; Wed, 9 May 2018 09:34:32 -0400 (EDT) Date: Wed, 9 May 2018 09:34:32 -0400 From: "Theodore Y. Ts'o" To: adam.manzanares@wdc.com Cc: viro@zeniv.linux.org.uk, bcrl@kvack.org, linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, linux-api@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/3] fs: Convert kiocb rw_hint from enum to u16 Message-ID: <20180509133432.GD28388@thunk.org> Mail-Followup-To: "Theodore Y. Ts'o" , adam.manzanares@wdc.com, viro@zeniv.linux.org.uk, bcrl@kvack.org, linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, linux-api@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180508174202.2537-1-adam.manzanares@wdc.com> <20180508174202.2537-3-adam.manzanares@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180508174202.2537-3-adam.manzanares@wdc.com> User-Agent: Mutt/1.9.5 (2018-04-13) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 08, 2018 at 10:42:01AM -0700, adam.manzanares@wdc.com wrote: > diff --git a/include/linux/fs.h b/include/linux/fs.h > index 760d8da1b6c7..7a90ce387e00 100644 > --- a/include/linux/fs.h > +++ b/include/linux/fs.h > @@ -284,6 +284,8 @@ enum rw_hint { > WRITE_LIFE_EXTREME = RWH_WRITE_LIFE_EXTREME, > }; > > +#define MAX_KI_HINT ((1 << 16) - 1) /* ki_hint type is u16 */ > + Do we really think there will be *ever* be a need for more than 16 I/O priority levels? I would much rather use the low four bits of KI_HINT for the priority level, and reserve the rest of the 16 bits in KI_HINT for some future use. (For example, we might want to use some number of bits for a stream ID.) - Ted