Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754357AbdLDQNW (ORCPT ); Mon, 4 Dec 2017 11:13:22 -0500 Received: from mail-eopbgr20121.outbound.protection.outlook.com ([40.107.2.121]:43473 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754134AbdLDQNQ (ORCPT ); Mon, 4 Dec 2017 11:13:16 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Subject: [PATCH 2/5] aio: Export aio_nr_lock and aio_max_nr initial value to include/linux/aio.h From: Kirill Tkhai To: axboe@kernel.dk, bcrl@kvack.org, viro@zeniv.linux.org.uk, tj@kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-aio@kvack.org, oleg@redhat.com, ktkhai@virtuozzo.com Date: Mon, 04 Dec 2017 19:13:09 +0300 Message-ID: <151240398921.10164.10950241945347389472.stgit@localhost.localdomain> In-Reply-To: <151240305010.10164.15584502480037205018.stgit@localhost.localdomain> References: <151240305010.10164.15584502480037205018.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR07CA0015.eurprd07.prod.outlook.com (2603:10a6:7:67::25) To DB6PR0801MB1333.eurprd08.prod.outlook.com (2603:10a6:4:a::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d74e6355-253c-4457-3d91-08d53b31eb26 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(7168020)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603286);SRVR:DB6PR0801MB1333; X-Microsoft-Exchange-Diagnostics: 1;DB6PR0801MB1333;3:cRmkcpeyD7uyw5ySu0rZ2z2OqHHYEaSMcsnRdYyGs9/uG3sGPJ4KlbzKBf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RvbbAF1vWEdDNvd9UZ4WPa3vj+ul3hykKDGlDikYa0XoGCACNbGvdIu2y/VlX0z0P3khPE0NefziDC1OtQcvjn6GAWYWxOostV9GWUVuHwudnkIcwYHS1dG8VvqqME8wqBabPdvsb10JTmEsSlDq4rFMhyYNY+v4t8EWEJagBI+oplOA3LByE7qJy5S1zA=;4:WH/AVjAaVfsuBbdhTRvHo3AGGrtJcRn/uAvOH048XRmFH8juBmOz0aHK/yH6PmvLFHpyydsGxTEP2UjHruiyi+lwItx7FRqn55VJHXublpIkBqqP8YG4OJGv4zQNm1yY3+ljt4nxjHvQqgtSMGprbX/i+McUuFaJ5BeJYLtAx2RK+YTZIHlSP+y1jItz+Tk1muExxkAqB3c4WFshHZ/IayCXuOgd64BzoEb7jws2fxyuze3yKeye9Pi2JyC7vEvM63hmylbRTie4lA8sbJcTTw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(8121501046)(5005006)(3002001)(3231022)(93006095)(93001095)(10201501046)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(20161123562025)(20161123560025)(20161123555025)(6072148)(201708071742011);SRVR:DB6PR0801MB1333;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:DB6PR0801MB1333; X-Forefront-PRVS: 051158ECBB X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(6009001)(346002)(376002)(366004)(189002)(199003)(54356011)(2906002)(47776003)(8676002)(478600001)(5660300001)(2950100002)(6116002)(105586002)(81166006)(106356001)(230700001)(81156014)(66066001)(97736004)(76176011)(3846002)(58126008)(9686003)(25786009)(8936002)(7736002)(16526018)(7696005)(53936002)(316002)(189998001)(2486003)(103116003)(305945005)(52116002)(6506006)(23676004)(61506002)(33646002)(55016002)(55236003)(101416001)(83506002)(68736007)(86362001)(50466002);DIR:OUT;SFP:1102;SCL:1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-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2017 16:13:11.9099 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d74e6355-253c-4457-3d91-08d53b31eb26 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1333 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1235 Lines: 40 Next patch will use the values in more files, so let's make them visible external. Signed-off-by: Kirill Tkhai --- fs/aio.c | 4 ++-- include/linux/aio.h | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index 04209c0561b2..9dc98a29077c 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -188,10 +188,10 @@ struct aio_kiocb { struct eventfd_ctx *ki_eventfd; }; +DEFINE_SPINLOCK(aio_nr_lock); /*------ sysctl variables----*/ -static DEFINE_SPINLOCK(aio_nr_lock); unsigned long aio_nr; /* current system wide number of aio requests */ -unsigned long aio_max_nr = 0x10000; /* system wide maximum number of aio requests */ +unsigned long aio_max_nr = AIO_NR_DEF; /* system wide maximum number of aio requests */ /*----end sysctl variables---*/ static struct kmem_cache *kiocb_cachep; diff --git a/include/linux/aio.h b/include/linux/aio.h index 9d8aabecfe2d..5dda2663802f 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h @@ -10,6 +10,10 @@ struct mm_struct; #define KIOCB_KEY 0 +#define AIO_NR_INF (-1UL) +#define AIO_NR_DEF 0x10000 + +extern spinlock_t aio_nr_lock; typedef int (kiocb_cancel_fn)(struct kiocb *); /* prototypes */