From patchwork Mon Jul 8 11:42:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 13726451 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D29E42B9D4; Mon, 8 Jul 2024 11:42:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720438976; cv=fail; b=rTgvHNErs6aViuwU2YQdbOkGY0mNck6BVgXE81xrPaXtw3ep6PopwCOjUZ0pau9uECvgze+L/i/+gEIZNNg4fSihpKgfM7IeaFpSBWcY7FBnGTRuMf/zbppZpuuexgiTC5CtZqAxW1JFMhOoXCC99qmgxdHgLqWq/h0HPl6pSAI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720438976; c=relaxed/simple; bh=5bQ8NX86qRxb5I1gv88lk0UbcjwfB0MQa2SHXTR5LhE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=HDGjsdVxCgBhbzSUGUxJ9g+JyLAgKZ5dJfJxMKVJ9ohdFroiFi/+SqbTPsplwOKJzHRW7RH1OuSUFi6uleipCcSr/DJmBxxlp4fDTUm+INcmJXEibtZPhCbnp0oHENvL0hMavJnUjU19xR5admO7SZZYNytr7i6z+FFz5L4gwv0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=mDRIGh3b; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=vAQWwuWt; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="mDRIGh3b"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="vAQWwuWt" Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4687fYSD011958; Mon, 8 Jul 2024 11:42:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=xb/OUh+Fp2Beb9QpU/oFatH5trNYo+2QIQK9nzjzGg0=; b= mDRIGh3bCdwWgfEWOoEXxz14jra8QeYjuXq7Ktdy6hwcsVrZM+/brWV63m6T8nTd 8rtgwYfr5B7tNHnkmvG1gVZdT+NoVyWsRoxAODPXuqWZpWCdI3/0x/8hfa080rPB JQkvLU51IVdkak32S8gZSTa9DcjC9SO9VpbXRBCX+lPJ0tjcdREubF/7xrVTxldc cTD3I1qLwcvuxSb0UnAaR3TLL8WpfSqKX56L/23WEYOBYXLIh8Rh6xLHNrzUorqU O3OLwnKUsRuQcGEDfZV113yjoiyxARs/hq/1E41r8l3mkPAiMcNIMh/xDPZajQaY qhmHhv6GJKhuXOH2MAccQg== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 406wybje3c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 08 Jul 2024 11:42:47 +0000 (GMT) Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 468BF9Ih014343; Mon, 8 Jul 2024 11:42:46 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2174.outbound.protection.outlook.com [104.47.58.174]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 407txf98yu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 08 Jul 2024 11:42:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P9r2lHzUC0c/fNrLp0DbkdQi8hraQ+bmw+aEBW81ULRKdyf5sq/UDI/iqeds+YPLfrLJAISU+/RTfo16fkxiYmghc9iTfLQKmwuAAcDlvPOzfx5QS0M3/cJy6Ff5tlqOcx5Y5MaVxEEBCx6sRfqGZwvP/za8RzWwO/lt2VhZwYu7MI0EjD+XNMyFI/9LTr0Gld8pBljz10dB6bKaavWMwX3nPyYtROz4Ra2/o6kmmLi2cinGlOfLkJ4nKcv8DuQ2QfuWBUXsQQI51d/uhzQJ+DSqf3d5jNKxMVkBMwwA6q07DqaTPwUaIIMkfKNVQKWDWDUYhygGxtCK9tvl3mMcpQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xb/OUh+Fp2Beb9QpU/oFatH5trNYo+2QIQK9nzjzGg0=; b=IsLT5yZOtLVjn31id9gH1UbRRJSlW5ZJkR0daiVJvq8cRzS6h2bHLBRtZee3hE/lozLoL02A1dRuAxc9r2jm8ptgjSXVX6QpnzUFN+OAXZ1NQkv9uK/A4tTTaEE4ObLlAvmWxl+OK0+RewQAGoHoEmms65bV8FGx0AamReyysJVBjs/qpXwDX4BrOfSTPrhk/KMUWavClcV94P7Rc9EuFH27xcHqbVM1CGRbV5lAAg/RQoDi29Dul2FKbZ+Hp7Z2fflGcmt+bj9PYWexBoPySJEAXQK0lz5DhwVGItlAB5zH33nTy5isx5GHqP99ui6h1XZaHBFSMtjwW8Q2RKJqAw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xb/OUh+Fp2Beb9QpU/oFatH5trNYo+2QIQK9nzjzGg0=; b=vAQWwuWtqxUs+t9nHxSrGs6//Dl+gM1iZkxPz4f8gcDrN3ajo+OtT4F/UBhnQPPHnoc+nZ+Y+3mHpmPCWiRzQMEWncGW6X1S4y0LRUElkApNeJBlr98J1DE9csCBTakAbnz//FIgL8NtJBclfOpowsYsRQmQZH/n1KsKRC2J79w= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by PH0PR10MB4454.namprd10.prod.outlook.com (2603:10b6:510:3a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.36; Mon, 8 Jul 2024 11:42:44 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::4f45:f4ab:121:e088]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::4f45:f4ab:121:e088%6]) with mapi id 15.20.7741.033; Mon, 8 Jul 2024 11:42:44 +0000 From: John Garry To: alx@kernel.org Cc: linux-man@vger.kernel.org, linux-fsdevel@vger.kernel.org, axboe@kernel.dk, hch@lst.de, djwong@kernel.org, dchinner@redhat.com, martin.petersen@oracle.com, Himanshu Madhani , John Garry Subject: [PATCH v3 2/3] readv.2: Document RWF_ATOMIC flag Date: Mon, 8 Jul 2024 11:42:26 +0000 Message-Id: <20240708114227.211195-3-john.g.garry@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240708114227.211195-1-john.g.garry@oracle.com> References: <20240708114227.211195-1-john.g.garry@oracle.com> X-ClientProxiedBy: BLAPR03CA0145.namprd03.prod.outlook.com (2603:10b6:208:32e::30) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4313:EE_|PH0PR10MB4454:EE_ X-MS-Office365-Filtering-Correlation-Id: b0ddb2f2-c099-4b37-31ce-08dc9f43151d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: Y9Iy27Q2bOCwqSfo2vclDjjhmk0RbXLpWVv+54EHe0p29kS05n3qtFdKmte1jjp4Gsq7yW2UM70SYlEY9afjty4dXJVB/PeYKSM6FKHfzLuN5+uUH4Zw63Q5IW5FJLp0/Js6wKJMbg/6kdeIycKOQEQGAnnDlJDdUcIErJ0MVwvUt9f2a1K0kqNYBQBs8m0DzWjORczeQsV1VrM8oqCKR//q2cfuagV7BST98rHTfj2RxfULAScFoeBt58R91B1Z5U7NXm23f0s2+U3zvzjC1wN4YKrBG2nXUkewznmUv9SI4+MC5gXIY62Bvf6iAucl0sisc+Ad5Eb1FuqGNnvd8+Yje9F10F1dhWMpfzZTBQbWuRZruIHH1qRiJ0fFT7Ctf67mXJHARxUh9q0xJVVLkcqOvlxlG/gTg0zE3HmJzBnR9LKEvcepJMk1UKITs7Zr1MGj3jUsbSFML8O2mypWgGA/0IpmvdETB5Co3xr5E3JcC5cCpb11CoWv0w4p3wdV5WZ8Yx0GbcVWxp680W9yo84N7LkuNceXQzJ2zEqtl31Mw55gAQCSaZaFbCGeAldCNWGo+4X4cGIngQqVfEOK0aZF9pUjYgQ2QPLdqg49dFAEE1tAIB3CC9vvi5geMapyW2UhTXnl0XXamnSZcmVKI9yhYRn6jnqcFhYAjttbFTfmssLWd8Auq29SSk/xEnzzJqEqokwJCvOjyjFXaB47DSFmsD3SfWXxKlhAzE/4Q9iH1zGPyqN4XPQDMcaZHnaoOYuor71Yo9FxY2bDqMHDPbakIXrjrtxPYkOJ+0lUIVGfT1cfqTdUCWnBPW3RxUXy4Ox935G7/yG4/vS9muCm5TpVo/M9QdOZkV+00UnrnsIerLvuTEcNCyUjKvm47sAewP6Aw9T6A4SqYr/WXZhtWlUC17312gtrxTQy9yVzSLyM4rP3FDgB85msAb+wnbekU8nJHyvLY47uQ1URtm723kxWGfp2JPXE2mJfPTFdt23jdvEACnnthN21YYOQwlMi7ht48tYt8/t6PQGNomfenAYMFXJ0SU3C/DdXa3RM7fgx3BXDWNkrc7/rCf+fQO19+y8i97YciYjlgaPOJQVYvemS0pIrNko9wTgM7UD6dKBb+AXHwHI/0ryJQwcHBSXRb2fQK8HhFK6qnW0X8bNXap+hV1EoQFQHNBNW9GKMrPnDdL/F/ALZvWdc2sXg7HgZGdEt7h1rjYqHnmEIt+jq6bUX2vKMskleYf0/qdN3wcmVqyfDyf0iq1kv9HkGQ6sek7bVTvM/DvCH1gOFHBbBTmQZIg8HtNWRqtnJQggd2jNhv7Eti0aCicmGzF6+pXg7QwmEYdglULs6HLev/luqLw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR10MB4313.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014);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PNwa/bPvefUQuQ2wQbGClINaMrBbztBBRPX83HEQ01XkMtu6GLkRRV7uWaFP2Kpa0HSs3fpYACjdWQT63rzbJaY868nJCWYWj+jl0pbyGn385zIeE6WgVrDaUV0ci09uGae9XqT6zxlnRRa+dIJgpYfK/ZZh2J2UaJclY14cdQdcT34Ioc2Vzp/95FCbzQJOGdtS+5gaH+sd29DvT9HJKod++Hs1WCkDbyF5d9qZoUnhUHu8BVaHV93WGUrw9p+w= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b0ddb2f2-c099-4b37-31ce-08dc9f43151d X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2024 11:42:44.6421 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: JPmSBIA6KSaUN08CBPSehBEVMPcB2UBtyox7FqqxhoevzXcRg8FiGi42HI7j9dkAgy1u7luRtwvKgc3DbfgEaw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4454 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-07-08_06,2024-07-05_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 suspectscore=0 malwarescore=0 bulkscore=0 mlxscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2406180000 definitions=main-2407080089 X-Proofpoint-GUID: 4Vq8wO0UQKHSTHOYwNZc4tYVVpBCuhVo X-Proofpoint-ORIG-GUID: 4Vq8wO0UQKHSTHOYwNZc4tYVVpBCuhVo From: Himanshu Madhani Add RWF_ATOMIC flag description for pwritev2(). Signed-off-by: Himanshu Madhani [jpg: complete rewrite] Signed-off-by: John Garry --- man/man2/readv.2 | 73 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/man/man2/readv.2 b/man/man2/readv.2 index eecde06dc..78d8305e3 100644 --- a/man/man2/readv.2 +++ b/man/man2/readv.2 @@ -193,6 +193,61 @@ which provides lower latency, but may use additional resources. .B O_DIRECT flag.) .TP +.BR RWF_ATOMIC " (since Linux 6.11)" +Requires that writes to regular files in block-based filesystems be issued with +torn-write protection. Torn-write protection means that for a power failure or +any other hardware failure, all or none of the data from the write will be +stored, but never a mix of old and new data. This flag is meaningful only for +.BR pwritev2 (), +and its effect applies only to the data range written by the system call. +The total write length must be power-of-2 and must be sized between +.I stx_atomic_write_unit_min + and +.I stx_atomic_write_unit_max +, both inclusive. The +write must be at a naturally-aligned offset within the file with respect to the +total write length - for example, a write of length 32KB at a file offset of +32KB is permitted, however a write of length 32KB at a file offset of 48KB is +not permitted. The upper limit of +.I iovcnt +for +.BR pwritev2 () +is in +.I stx_atomic_write_segments_max. +Torn-write protection only works with +.B O_DIRECT +flag, i.e. buffered writes are not supported. To guarantee consistency from +the write between a file's in-core state with the storage device, +.BR fdatasync (2), +or +.BR fsync (2), +or +.BR open (2) +and either +.B O_SYNC +or +.B O_DSYNC, +or +.B pwritev2 () +and either +.B RWF_SYNC +or +.B RWF_DSYNC +is required. Flags +.B O_SYNC +or +.B RWF_SYNC +provide the strongest guarantees for +.BR RWF_ATOMIC, +in that all data and also file metadata updates will be persisted for a +successfully completed write. Just using either flags +.B O_DSYNC +or +.B RWF_DSYNC +means that all data and any file updates will be persisted for a successfully +completed write. Not using any sync flags means that there +is no guarantee that data or filesystem updates are persisted. +.TP .BR RWF_SYNC " (since Linux 4.7)" .\" commit e864f39569f4092c2b2bc72c773b6e486c7e3bd9 Provide a per-write equivalent of the @@ -279,10 +334,26 @@ values overflows an .I ssize_t value. .TP +.B EINVAL + For +.BR RWF_ATOMIC +set, +the combination of the sum of the +.I iov_len +values and the +.I offset +value +does not comply with the length and offset torn-write protection rules. +.TP .B EINVAL The vector count, .IR iovcnt , -is less than zero or greater than the permitted maximum. +is less than zero or greater than the permitted maximum. For +.BR RWF_ATOMIC +set, this maximum is in +.I stx_atomic_write_segments_max +from +.I statx. .TP .B EOPNOTSUPP An unknown flag is specified in \fIflags\fP.