Received: by 10.192.165.148 with SMTP id m20csp901925imm; Wed, 2 May 2018 10:35:21 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpk5GF6ioBPBKHtOQb+8k0tl8DSwoIicIp4JD4y+PJK8Y94i7lf1IChiftgEBiOVnv5ee4c X-Received: by 2002:a17:902:710f:: with SMTP id a15-v6mr16266300pll.171.1525282521533; Wed, 02 May 2018 10:35:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525282521; cv=none; d=google.com; s=arc-20160816; b=BrpaG32AWY1tbDVyCyaTq/fTC5Nov2r+5EmTlXb7HLvWmvOnFiGCjvTPvF9oQrI2Lp 4tviMgyKvuZ9g0ktTB2EBDdzTWCpA70Q5oJI4yNq5ibqzgKih661pBGuJ9zCYYWl4V0S OV9bxr45bP4L03wXbGZyCwCLLtGSO0zR0zVnuDosXRM+4J6h7sg+ZtBQFvmuoyo3AprF eKfVQwCWT53oDhmni2ctrr3Mz8OIMWNeSWPbZrVyc8tftH818Rz6zG6V7KFsZOcjcydY K9LsCam7ciV/Cr0kK0myOQedokEXHHTQa4AoX8HoXDsZ5zS2dIsKBG97REMD8Pkry896 MDKw== 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:dkim-signature:arc-authentication-results; bh=uvCyUiKJyhZVOBn2JALKaA160AeUlt6nr0UHu9JIPlc=; b=XtA/Zc4eXqfo1/r8IsIpp4W8Rk4JJhERxVFvRxAgk8xQntu5YFgg+M6L6eQxurDlFx nFSPit015+TAuUl+vH18WZByMBL5aP+cJH+Q30chzV6/4m4HtetP6I65+0GeuMq8wj8T 74HwK3xt/Df4mCQ9N9r9ZBm04nO/DOSyGi2/CgEY+Xbs7bRZY4g+QYasZEyCZ/marWl2 jkWsRluZY0PDrPS1ameOIchUhARdh3OdhNLeoFX/6yfntCa8rzS+s0wqdqa5vFhfQizt fFX1LW49Y4dgf+S3tdBNlBINYyTv6cfQuz4zULP9I9TLAW+JrUgtX1LWuVWayLRqzizw 6D1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=VqJ/1u7b; 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 e187-v6si10010543pgc.127.2018.05.02.10.35.07; Wed, 02 May 2018 10:35:21 -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=@infradead.org header.s=bombadil.20170209 header.b=VqJ/1u7b; 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 S1751377AbeEBRdZ (ORCPT + 99 others); Wed, 2 May 2018 13:33:25 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46126 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751045AbeEBRdY (ORCPT ); Wed, 2 May 2018 13:33:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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: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=uvCyUiKJyhZVOBn2JALKaA160AeUlt6nr0UHu9JIPlc=; b=VqJ/1u7btH8uPzdAIlejKKjs6 CGIOZwTOO+j5Go3nNrtWgjg8NV9m7chCuT6PItzAuPpEE0B6guWnNnCIvXV/K4lvb07vteqJw8NpO C/84MMqIQhz2wJv1yEygqfCfblgmPnwhop2h12FcWzOSLH7iTDYQBYmAl4DiTcwpaIJvmCg+KBUdz +bKkws96gyRylN9026rSNUgD7cTVzklrSCR+J1FiQd1o+p+Dk92Wfes5AF7pNPpwYi1xW4Mh8LH4U ZBiJ4u1medTtiXCixUf5UKap7rfRr6R8GuWb1h7tpqV8l4x/7075ghp7SmSWzvRr4MVmxNYSU+V7p 3zg54FV0g==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fDvd5-0007Qd-2M; Wed, 02 May 2018 17:33:23 +0000 Date: Wed, 2 May 2018 10:33:22 -0700 From: Christoph Hellwig To: adam.manzanares@wdc.com Cc: viro@zeniv.linux.org.uk, bcrl@kvack.org, linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, linux-abi-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] fs: Add aio priority support for block_dev Message-ID: <20180502173322.GB27997@infradead.org> References: <20180430165740.2842-1-adam.manzanares@wdc.com> <20180430165740.2842-3-adam.manzanares@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180430165740.2842-3-adam.manzanares@wdc.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > --- a/fs/aio.c > +++ b/fs/aio.c > @@ -1603,6 +1603,15 @@ static int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, > goto out_put_req; > } > > + if (req->common.ki_flags & IOCB_IOPRIO) > + /* > + * The IOCB_IOPRIO flag is set when the user supplied iocb > + * aio_rw_flag field has the RWF_IOPRIO flag set. If so, > + * aio_reqprio is interpreted as a I/O scheduling class and > + * priority. > + */ > + req->common.ki_ioprio = iocb->aio_reqprio; Do we need any validation of the field here? The only other thing I am a bit worried about is bloating struct kiocb with a field for a relatively uncommon feature, but I can't really see any much better way to pass it.