Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1120807ybt; Thu, 18 Jun 2020 00:39:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQIQuehSISAd3uJX7XfXpqQiXpIN1toWfyJHRwWi4LG1Q/QGTxKxmVurhuQzPcQoCQfqeR X-Received: by 2002:a17:906:4c81:: with SMTP id q1mr2797183eju.273.1592465943676; Thu, 18 Jun 2020 00:39:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1592465943; cv=pass; d=google.com; s=arc-20160816; b=S+595GYOOG5DJhcbbPyOe3yBrtAtd+e77Be9k0mqTqbG/DUcKyPwYuGSufHNJ/hBkl 16lWHvBfnzvuKLymvXXUfQQZF6asc4moFZqKAVfaal0aSQQng5S3AKEP8BVuf9lyM9e7 sWMv28tv0r6tEi0zkTcKaY8My8ZoLcJOk5zogm/GB45+wHKnOe2G/VFcYHdYVCAb8Os+ zC6tQnTCbvux7WEGc8bGkKQryW30V0BxjMRYubygzl2JFq/Jv5+Kl8NooAJF3yBqoFR2 LN12zGO8TbejRSgeFP4DmRcJyE9jfk18sPpvz0bKeZm0u1YHBN25cvUv47H5vVygErNE v56Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :wdcipoutbound:content-language:accept-language:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature:ironport-sdr:dkim-signature; bh=DxEbsjfut2DvNvAKenKWv+MRXjpECuOqiGSUQHWq/OA=; b=rnpRMlAw+w+ggrIwsYJxxsgd/B7uufUyi+ffbvHwe8883/m2wxTV2DEK61n9edGiOy 3mVLvYAhT2gjwT4fKHbVlXfctFpABDczokyt3T6w8N7lVa+3QRqy8go4J5v9BZHluPY8 F6VLbvUArIgWwMrnIP2p42oESjnKcrq0MRB0Gxr7nzGYP9k3dkrIuj13GxwWiWy5WAG/ 3p3lLnsSOqQE5uXR5AFy6ZY1QCBOeib3r8n7Yfq56iKkDoGKPtj35SDJyIlXAweh4EKi QFtpD/3NG/ok4S9CaeuSEH8RVCzhWVkEyl5NQS6uzix/fye74awnmypM6NyhHkfFwJU+ qhHQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=XmSuAbvr; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=GW6PXRV3; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id md12si1358854ejb.431.2020.06.18.00.38.41; Thu, 18 Jun 2020 00:39:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=XmSuAbvr; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=GW6PXRV3; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728181AbgFRHeK (ORCPT + 99 others); Thu, 18 Jun 2020 03:34:10 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:53394 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727010AbgFRHeJ (ORCPT ); Thu, 18 Jun 2020 03:34:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1592465650; x=1624001650; h=from:to:cc:subject:date:message-id:references: content-transfer-encoding:mime-version; bh=Jrd76W3vWf5YvMODpLz3UJc2qBFNhXF5ghev1kZQVZ4=; b=XmSuAbvrGrgGvRBVJgGnhRCMYYFQ6rUTrMqdG/NDTyceiqYkU77Fq/bx dbpy4F511rKKaW9E/cia7s5czad3RNnsMetwAE6IpMabnghuNlkvSXCjR 9R0uPz7MsnaZWDHVpS9I7B4QAc+JZEmEAMXMtc5sjf8HxltBMg3cixfjB pxPmOmOk8+oiM2VhiW+8smCpx1l4hXkkLUUQ79BVu5zO/IxgWJ0y8S0TN pD1KPpaerQKRS0XdGbBsJw0CDrADPeIkWb28DUdj9csKnGaRy9kWJtCmt ZFpB6L1njNf4S++K8jUlSbfdDhlqfXtslqK6niy//RkMPkSL6WDDwVrhw w==; IronPort-SDR: BYHn6QN5h9R3n9mCFBVAMmQAWyhR5+6/9ru9SGuKlceSGfcMsWG762ZwOwR/8FlyjB82+TaEk2 MT5lLN2L28tjLqwk+JfHWb4H18h/PqELfRxyYf0agU7wm3Eyq1t3BDZx4tB8Inxrsx+2GB80ml nANoML5gx4aIY4rsYrnPpar7LeLguHvO7EaQOByi0ykKThCZ33RIZ525PFzOlUX/tJomvhS9+8 g9p7W86wXMK0KjqaigtFsRt8lXy7gbkl3IE/uAIfpP9+F/XhjPOYC5eRgynIipve8e8yQhLxrK 8y8= X-IronPort-AV: E=Sophos;i="5.73,525,1583164800"; d="scan'208";a="243255797" Received: from mail-dm6nam12lp2170.outbound.protection.outlook.com (HELO NAM12-DM6-obe.outbound.protection.outlook.com) ([104.47.59.170]) by ob1.hgst.iphmx.com with ESMTP; 18 Jun 2020 15:34:18 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MxSbRDrJ74ZsVrG1EcwLJceU48OLZVAD6qs9zPsUG93MK/AfWvWT6FEZ7NJzpg5wBEFO9xrZY0B/5UzvNPawbPBWZ0mHLP3M23GIYlZ1/enWk/0VAKGFBLgzwwbZec2zt70PWvFxlwwiiaC87fBEG5+9VaF1TbHf46MOn88T6PodXiTBXzeM01BXfomv7JPJdDqnZA+93DY+r3WPN0xzIWfgLIsbLY5uCzRs0bEyJ51ZcxOVXaPFEI477qzEUOm3uXdJ0xFkAyt/EyPospY7jSE+3EVe66JSpBQWhnR4T6XtY43oaoATdSxfG4Q/g8zizUFrO07SKg9iCfXv8zwgPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DxEbsjfut2DvNvAKenKWv+MRXjpECuOqiGSUQHWq/OA=; b=YcmiLkbBv3Z9JbeVWuo6BffdDJgJyLqF4TaoEFssqWdVwBBdFLu1qFd87r2vdpQK/mHGGL53PCkEAQi1QQKF8Bj77Y0cK320ZoVJxRWSpoiJ1D9mwYwl98UA1upJWqWM4Wui5M2sppKI9X4FBhQtjGuK7bLoykQtPsGGJN6uB8YklS1LHiAk+tWvc1F3yk2dgnDz66M1WySeTcj0Lrn75QZGBckHVukm/6ASWFhCT6XaRNbdH/zpQ6SS6zlFyg8IQ0VfySCNuYHhoNyynWWV/aSeLOeOFEzWSZ2w6J5Y0J91Q6SRIuZe4BhLZLa2g3rZXSAc2Ka42Y0Ba+UOzK9JDQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DxEbsjfut2DvNvAKenKWv+MRXjpECuOqiGSUQHWq/OA=; b=GW6PXRV39yUPeRnK3L9bh47AmrzW/5xcPthOLglqn69RlTSm11/ojssxjGGswTEcq6ZHa/8F56JD+ZVCBjZu+vW1uKVqW50CkKw/TL0w4Nvh4uNDZ+okN2EqBiDUllegz9WNcNWHJP/2YXfAoSOzYXsvfUBnikWYbR9H7skwWkM= Received: from CY4PR04MB3751.namprd04.prod.outlook.com (2603:10b6:903:ec::14) by CY4PR04MB0566.namprd04.prod.outlook.com (2603:10b6:903:b5::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Thu, 18 Jun 2020 07:33:57 +0000 Received: from CY4PR04MB3751.namprd04.prod.outlook.com ([fe80::c593:f271:eebe:ac7]) by CY4PR04MB3751.namprd04.prod.outlook.com ([fe80::c593:f271:eebe:ac7%9]) with mapi id 15.20.3088.028; Thu, 18 Jun 2020 07:33:57 +0000 From: Damien Le Moal To: Kanchan Joshi , "axboe@kernel.dk" , "viro@zeniv.linux.org.uk" , "bcrl@kvack.org" CC: "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-aio@kvack.org" , "io-uring@vger.kernel.org" , "linux-block@vger.kernel.org" , "selvakuma.s1@samsung.com" , "nj.shetty@samsung.com" , "javier.gonz@samsung.com" , Arnav Dawn Subject: Re: [PATCH 2/3] aio: add support for zone-append Thread-Topic: [PATCH 2/3] aio: add support for zone-append Thread-Index: AQHWRMyOokzJw5oqGEuSZawTmRChPw== Date: Thu, 18 Jun 2020 07:33:57 +0000 Message-ID: References: <1592414619-5646-1-git-send-email-joshi.k@samsung.com> <1592414619-5646-3-git-send-email-joshi.k@samsung.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: samsung.com; dkim=none (message not signed) header.d=none;samsung.com; dmarc=none action=none header.from=wdc.com; x-originating-ip: [199.255.47.7] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: a8a0e410-a02f-46cf-c38b-08d81359f640 x-ms-traffictypediagnostic: CY4PR04MB0566: x-microsoft-antispam-prvs: wdcipoutbound: EOP-TRUE x-ms-oob-tlc-oobclassifiers: OLM:1284; x-forefront-prvs: 0438F90F17 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jkHOfEFHOmous4CVU0B9OoRuh4U/GCNf+9iz56SMKxVEkSdhZ5MctnBX97aQBcSLkivysihLOBajKtj1wfZqeBEpEl5+Inpzi3ATuQ37U4cJxZMZdTYCcl7MzED8Bv3FJxFgUknqDzVzi86/eZn3zhKAUwv6+GUAqWNqHiMQxoMal/XsjS+InVPBpBCD5Hq/7hvgexm4heJr9bDeiSCBhx3pkvylD+rDAoYBAc5VgbixxFRO4wjerdBH5c5KWP2/4z2AUfdFkkieOmV+pf4lCueHfK5OWSVWPAt0Dv6cRJlARWcG566V8AjKEUo5uxNkzgDZ0HXjNNE1WliLRkfiDg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR04MB3751.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(136003)(346002)(366004)(39860400002)(376002)(396003)(110136005)(8676002)(5660300002)(8936002)(71200400001)(7416002)(2906002)(52536014)(478600001)(4326008)(55016002)(9686003)(316002)(66946007)(66476007)(66556008)(66446008)(64756008)(91956017)(76116006)(7696005)(26005)(186003)(33656002)(53546011)(6506007)(86362001)(54906003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: BPEWvbSf0svhs+9q7KsevJ4UHdRMaGO/6fCui7Ie1y2hOPwO1K7/TQw6pTA7pZBFNDUsrinOwWLJXMrs8E8iwpObBoEe/wFuI5wNqlliC2cLBv6Q4KyesEPbEMq52VKpn5TpL5I1pLQ6nlxAeXLU2TcJqD1Vu9Y1HqPDS25J+5+ToLkhaHTCfDI/H4BSQmlDq2TlLzXbeVH4xTUh/0a0hGvDEHAxbx1gKI7IwErPgmvHWqY0StS8GzreobWgfFOf+6XUroCFbWnkkRlwrytKZ5hvABI7ZP4FiVWybgzyFkIO/g9rUDlNAQZbVDBI/m5SsYpp5nPTkbstuy9NwiT5eSh+pjsmsObJ9RCA+3DloiqiDxTzEpUYbmWfw4R0/9S378BWTFT5sXl6I0bb9tsk6Lrv8Ra1g92JweAQ2xkYru8Ivik2xbO+jXwOGonliZUfWjDhiYwxlT11A4Z5jHEa3s5zmhvGb7eKPvJioM636Bc= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8a0e410-a02f-46cf-c38b-08d81359f640 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jun 2020 07:33:57.5292 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: smPS/Rh1zGKTJFYZ275wTM4NCv5Ld1vd96HwxyX59hTFT9nfj/UO3auKEfiDFV9Q2pPuPxYSud2QR8IzW9kKJA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR04MB0566 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/06/18 2:27, Kanchan Joshi wrote:=0A= > Introduce IOCB_CMD_ZONE_APPEND opcode for zone-append. On append=0A= > completion zone-relative offset is returned using io_event->res2.=0A= > =0A= > Signed-off-by: Kanchan Joshi =0A= > Signed-off-by: Arnav Dawn =0A= > Signed-off-by: SelvaKumar S =0A= > Signed-off-by: Nitesh Shetty =0A= > Signed-off-by: Javier Gonzalez =0A= > ---=0A= > fs/aio.c | 8 ++++++++=0A= > include/uapi/linux/aio_abi.h | 1 +=0A= > 2 files changed, 9 insertions(+)=0A= > =0A= > diff --git a/fs/aio.c b/fs/aio.c=0A= > index 7ecddc2..8b10a55d 100644=0A= > --- a/fs/aio.c=0A= > +++ b/fs/aio.c=0A= > @@ -1579,6 +1579,10 @@ static int aio_write(struct kiocb *req, const stru= ct iocb *iocb,=0A= > __sb_start_write(file_inode(file)->i_sb, SB_FREEZE_WRITE, true);=0A= > __sb_writers_release(file_inode(file)->i_sb, SB_FREEZE_WRITE);=0A= > }=0A= > +#ifdef CONFIG_BLK_DEV_ZONED=0A= > + if (iocb->aio_lio_opcode =3D=3D IOCB_CMD_ZONE_APPEND)=0A= > + req->ki_flags |=3D IOCB_ZONE_APPEND;=0A= > +#endif=0A= > req->ki_flags |=3D IOCB_WRITE;=0A= > aio_rw_done(req, call_write_iter(file, req, &iter));=0A= > }=0A= > @@ -1846,6 +1850,10 @@ static int __io_submit_one(struct kioctx *ctx, con= st struct iocb *iocb,=0A= > return aio_fsync(&req->fsync, iocb, true);=0A= > case IOCB_CMD_POLL:=0A= > return aio_poll(req, iocb);=0A= > +#ifdef CONFIG_BLK_DEV_ZONED=0A= > + case IOCB_CMD_ZONE_APPEND:=0A= > + return aio_write(&req->rw, iocb, false, compat);=0A= > +#endif=0A= > default:=0A= > pr_debug("invalid aio operation %d\n", iocb->aio_lio_opcode);=0A= > return -EINVAL;=0A= > diff --git a/include/uapi/linux/aio_abi.h b/include/uapi/linux/aio_abi.h= =0A= > index 8387e0a..541d96a 100644=0A= > --- a/include/uapi/linux/aio_abi.h=0A= > +++ b/include/uapi/linux/aio_abi.h=0A= > @@ -43,6 +43,7 @@ enum {=0A= > IOCB_CMD_NOOP =3D 6,=0A= > IOCB_CMD_PREADV =3D 7,=0A= > IOCB_CMD_PWRITEV =3D 8,=0A= > + IOCB_CMD_ZONE_APPEND =3D 9,=0A= > };=0A= > =0A= > /*=0A= > =0A= =0A= No need for all the #ifdefs.=0A= =0A= -- =0A= Damien Le Moal=0A= Western Digital Research=0A=