From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.133]:41432 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750969AbeECSdz (ORCPT ); Thu, 3 May 2018 14:33:55 -0400 Date: Thu, 3 May 2018 11:33:53 -0700 From: Matthew Wilcox 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 v2] fs: Add aio iopriority support for block_dev Message-ID: <20180503183353.GC1562@bombadil.infradead.org> References: <20180503182114.2797-1-adam.manzanares@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180503182114.2797-1-adam.manzanares@wdc.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, May 03, 2018 at 11:21:14AM -0700, adam.manzanares@wdc.com wrote: > If we want to avoid bloating struct kiocb, I suggest we turn the private field > into a union of the private and ki_ioprio field. It seems like the users of > the private field all use it at a point where we can yank the priority from > the kiocb before the private field is used. Comments and suggestions welcome. Or we could just make ki_hint a u8 or u16 ... seems unlikely we'll need 32 bits of ki_hint. (currently defined values are 1-5) > @@ -300,6 +301,7 @@ struct kiocb { > void *private; > int ki_flags; > enum rw_hint ki_hint; > + u16 ki_ioprio; /* See linux/ioprio.h */ > } __randomize_layout; > > static inline bool is_sync_kiocb(struct kiocb *kiocb)