Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754406AbeAKNoC (ORCPT + 1 other); Thu, 11 Jan 2018 08:44:02 -0500 Received: from verein.lst.de ([213.95.11.211]:52682 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752735AbeAKNoA (ORCPT ); Thu, 11 Jan 2018 08:44:00 -0500 Date: Thu, 11 Jan 2018 14:43:58 +0100 From: Christoph Hellwig To: Jeff Moyer Cc: Christoph Hellwig , viro@zeniv.linux.org.uk, Avi Kivity , linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 30/32] aio: add delayed cancel support Message-ID: <20180111134358.GA5926@lst.de> References: <20180110155853.32348-1-hch@lst.de> <20180110155853.32348-31-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Wed, Jan 10, 2018 at 06:26:39PM -0500, Jeff Moyer wrote: > >> The upcoming aio poll support would like to be able to complete the > >> iocb inline from the cancellation context, but that would cause > >> a lock order reversal. Add support for optionally moving the cancelation > >> outside the context lock to avoid this reversal. > >> > >> Signed-off-by: Christoph Hellwig > > > > Acked-by: Jeff Moyer > > Actually, let's move these two defines: > > #define AIO_IOCB_DELAYED_CANCEL (1 << 0) > #define AIO_IOCB_CANCELLED (1 << 1) > > to include/linux/aio.h so that drivers outside of fs/aio.c can make use > of them. struct aio_kiocb is private to aio.c, so just exposing them won't do anything useful. If we really need these elsewhere we'll need to come up with a proper interface.