From patchwork Mon Jul 22 09:57:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 13738623 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.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 8CBF016C689; Mon, 22 Jul 2024 09:57:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721642273; cv=fail; b=kIb3FqjZVjEzN9lWzivB70A8qSRqnnpn5uHH1ttxtrgSQQGJQvHX/sJJ2l9BcqMxWyf7eiV/pGsOXUh5RC8hMlazXpXZi7pyrWYX865jCbnbKbwr38j419gKdQnGKt2cfPgcEHVZ/8ScvOyZE71H+g9PYFXvv34rH0ADhk6iooQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721642273; c=relaxed/simple; bh=Krg0dDumiklh1I3WD+rX8L0KAqNUWLIcVqV8zyBnGHs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=Q33X7ANlJzDr8t1hmVEJ3U9Z0Y/H6j9JzpThgvCGheT+ggSpV6FXPnYva897HHfaxsuQ262Peb4jWzKukeGzOhR3MnfF3mU2mHnWqV/bIPkanzFtMPA/Xt9fQIj75mlbR/s33y3Q66g6emBN69wWvKK1sEgW7XdOffF47MVBy2c= 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=AQCP/lRO; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=l08sZ6Pp; arc=fail smtp.client-ip=205.220.165.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="AQCP/lRO"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="l08sZ6Pp" Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46M7cv29031954; Mon, 22 Jul 2024 09:57:42 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=85sxQ3/CFQg+wXr7bRmy2JxgvMycwGsKYRZrFr3auSw=; b= AQCP/lROoYUjMGQXi3HWNeMoxN9oDTZryUuMirfB527xRHqyXqJB9x6b1V1jbEfp bFXSs2DQe5mwepSs1Z1OfG9sA4IKf8KOb4adLnDI9U5ClBRD52SR7aX4TF/u9ewT nOALOrSbt85W1NOnz3+48ekcsJXS8LUoPXFWyILfennp7juTyQwJlgmxtZBN0tAt PwgsBCt67cMeZ5+eej8ZcHq9k0eraBHP/oUd8xTPkxJcDWn9x+Mle5LzkSq9HKJc WVAipnP2qt0PkVeseImXdulYysnrnqjc+uil0s9wiiUZVg642PzCov7FreR5jKIW iNqc9WdGMwMmL+9CfZLnzg== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 40hfxp961n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Jul 2024 09:57:42 +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 46M91j1K009108; Mon, 22 Jul 2024 09:57:40 GMT Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam04lp2170.outbound.protection.outlook.com [104.47.73.170]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 40h29yqf8c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Jul 2024 09:57:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ViHe01T6Eq4rOybsk6pud3WwUfL7qwo/Xgp7EjNvoZi4aq8WaW+vh5mrMlyNBhD7VejgwBwLf4iLyFYkzDC/jiVK08hqOO/wqb0C97Mit72xgA0B6Qhaiu2EBAWYhSe+8WPlAcTXAcLCjF2MCxlp6gls1kLNpGLMuIdAf5j6c7tqiN7GLKYmmkEe1eFjqOp0XksD38RAlUPdZBKi9kiKEaTk2lnlbCJajnVsEDuE/Oqr7HvZ+HoJzNjTaziWe1e2kP3g3V3HpR3hIAMN8M4EXNRRAVL2pJnfQF+HeDHf5DUc3Hy5oArFEKmLBufX3BAy2mE3FSsR/Anmc7ito6jN2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=85sxQ3/CFQg+wXr7bRmy2JxgvMycwGsKYRZrFr3auSw=; b=Tvcnq86HgaDznfKYAwr+ATty2qj135ZkyoBzcd2XR9qw8EosrQ4KILcdqSlxP3MSx5nOOPanKnTBGGbkbZMyZG7WbINWdXhE0LTKv1rQHmveKAvavDJmMvAoz0VnMf+lDqGGmxMctEgP99gLcSmxwdGJzli4U+63mrszcTv4z/YWD1GrYtkPr/BDns8Lvi145cvZonqbfql2SlUNRqPCj3t7faUPyLmI46OBBXjbQld4JDZIgQJ4IxRSnAYSpRMLcH7vMbt8Ma105oh4Sh+JbUKFnE9l0DnxsDUzs/Yl+CEd4qVAjk7wA4E+b1KBrpUnf8aiwWUuVGw4Rx0NRXo61A== 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=85sxQ3/CFQg+wXr7bRmy2JxgvMycwGsKYRZrFr3auSw=; b=l08sZ6Ppsxf0JuLEQqRyZ3Mdsb3rG5yOL4oVX9X0IB+OM8J3ot/9cBfCyPY514kQMhCj86DEJ0CDfbMd3q+EGLrRbOQI5lIhVNLfdjO3fRxMh085aJ57ZzecdOIRyGJcVW0Q5IZlO3S6rvPEYE5kUxYP8q5KXvd1uleFF5L4L68= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by PH0PR10MB5595.namprd10.prod.outlook.com (2603:10b6:510:f7::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.19; Mon, 22 Jul 2024 09:57:38 +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.7762.027; Mon, 22 Jul 2024 09:57:38 +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 v5 1/3] statx.2: Document STATX_WRITE_ATOMIC Date: Mon, 22 Jul 2024 09:57:21 +0000 Message-Id: <20240722095723.597846-2-john.g.garry@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240722095723.597846-1-john.g.garry@oracle.com> References: <20240722095723.597846-1-john.g.garry@oracle.com> X-ClientProxiedBy: LO6P123CA0016.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:313::6) 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_|PH0PR10MB5595:EE_ X-MS-Office365-Filtering-Correlation-Id: b262c4db-78cd-43d5-f86a-08dcaa34b7e6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: ypwFD9aa7Sxy9t4j+1YaoJbuaw8IyXvoqVeOIZEEo061NHz8CwT03sfa1lm5E41zBolwfW3/Qwz6bFW5rD872AzBOG3rOvBMWno8WwKEt29Xef5R4d1I0AXHNMpuotuVAren+iEM4NFkmsAmBEu6WoV4qgg0WmE+P6/8AV6FMp26i6CihEF6bBaRGD2CsiDVJmNXjqpjJTcdDsSuxNIU+EwWusjwq/6HX5cfAbUv+u1PROeoWi+UmcRtefMHAQE8c2DJFgV9y8T6dt9C5NFD1SQHCzbmbR8gRLsi5OgClLNzg/l9Ysob6oH6jwNhpAlw7MAOXKKpuwI9/2N0UR4CQdqPBTQqor+svvXJWWbJJsjTY/jn4Gm8wKwO909vUw9HX5FHvsPaMbCpt04dJaPLOlsXW21f4zy3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n+CcBEDnw7FMrAnfHmd0GVL7f6cMLKHHgZUw+SRBzE3o1pFRAQ3B4hf+70vM/0NsFlgVd3mPdiQdTl9yjV88e+GDo36UuFgzM2DiBEmmeJuLhAAZm1MjIXjqod9O8qPnwTJQhB/KNj0s9ngAjf+4JJaBPAiV9CzRz8l1/CevtO4w+fe9szw+6nRKMdmov7HgaPL7sJgoG65QGwzwob1Q2xzxb1MA12/yPUVbDOSyf5bGdYm/1S4EvaScw4= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b262c4db-78cd-43d5-f86a-08dcaa34b7e6 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2024 09:57:38.2017 (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: HTr2k4e0fRqKsndceAdlpZ5c50Mnff5GufMxn5Krz24YKhlwSBBnbi7DpenywTYxN0Z5QU1ilrgThQhMIbzJZw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB5595 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-22_06,2024-07-18_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 spamscore=0 malwarescore=0 suspectscore=0 mlxscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2407220076 X-Proofpoint-GUID: eQ1mn7uwNr4glj0s8HFQLMswTUN8T12a X-Proofpoint-ORIG-GUID: eQ1mn7uwNr4glj0s8HFQLMswTUN8T12a From: Himanshu Madhani Add the text to the statx man page. Signed-off-by: Himanshu Madhani Reviewed-by: "Darrick J. Wong" Signed-off-by: John Garry --- man/man2/statx.2 | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/man/man2/statx.2 b/man/man2/statx.2 index 3d47319c6..a7cdc0097 100644 --- a/man/man2/statx.2 +++ b/man/man2/statx.2 @@ -70,6 +70,11 @@ struct statx { __u32 stx_dio_offset_align; \& __u64 stx_subvol; /* Subvolume identifier */ +\& + /* Direct I/O atomic write limits */ + __u32 stx_atomic_write_unit_min; + __u32 stx_atomic_write_unit_max; + __u32 stx_atomic_write_segments_max; }; .EE .in @@ -259,6 +264,9 @@ STATX_DIOALIGN Want stx_dio_mem_align and stx_dio_offset_align STATX_MNT_ID_UNIQUE Want unique stx_mnt_id (since Linux 6.8) STATX_SUBVOL Want stx_subvol (since Linux 6.10; support varies by filesystem) +STATX_WRITE_ATOMIC Want stx_atomic_write_unit_min, stx_atomic_write_unit_max, + and stx_atomic_write_segments_max. + (since Linux 6.11; support varies by filesystem) .TE .in .P @@ -463,6 +471,22 @@ Subvolumes are fancy directories, i.e. they form a tree structure that may be walked recursively. Support varies by filesystem; it is supported by bcachefs and btrfs since Linux 6.10. +.TP +.I stx_atomic_write_unit_min +.TQ +.I stx_atomic_write_unit_max +The minimum and maximum sizes (in bytes) supported for direct I/O +.RB ( O_DIRECT ) +on the file to be written with torn-write protection. +These values are each guaranteed to be a power-of-2. +.TP +.I stx_atomic_write_segments_max +The maximum number of elements in an array of vectors for a write with +torn-write protection enabled. +See +.BR RWF_ATOMIC +flag for +.BR pwritev2 (2). .P For further information on the above fields, see .BR inode (7). @@ -516,6 +540,9 @@ It cannot be written to, and all reads from it will be verified against a cryptographic hash that covers the entire file (e.g., via a Merkle tree). .TP +.BR STATX_ATTR_WRITE_ATOMIC " (since Linux 6.11)" +The file supports torn-write protection. +.TP .BR STATX_ATTR_DAX " (since Linux 5.8)" The file is in the DAX (cpu direct access) state. DAX state attempts to From patchwork Mon Jul 22 09:57:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 13738624 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.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 0D22616C698; Mon, 22 Jul 2024 09:57:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721642278; cv=fail; b=qyhXFRDI62UwP17KcZOAApjezxtqldd0I0UDvJEgUseRU+dXvsshr9lT9CQtmmrjxn8TuCxIRooJdZHO1EWuAokR+eut9DE5v9i7ZOtC7pA5YNaIRlN8ki9NPh3Hz78q4gNj5B0qKpi/pLCate6yeIIm1DQu69983a9tn6LOnOw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721642278; c=relaxed/simple; bh=B5bYSHJCdu75tCCc94+IqWTT3qh3mb9pm/Up3m6VmrI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=RQIGqHqF+RbXnz7arDjBTgoAB33QyGlJaElIe0lV6Oq1JbR1ERhzPBS0R+EcNHha/74UlVmYyeiYu4BimGEF2oRmuz9D5RuBEieY0R7TuQKg+Bu+9iBV1hESpa6wOWHihTwZiWu1qkFWqI/tcXqIM2B1AYZAanFWaK6CGTTh5Ck= 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=ZLM3ZD1A; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=Dirdkhiu; arc=fail smtp.client-ip=205.220.165.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="ZLM3ZD1A"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="Dirdkhiu" Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46M7d02Z003160; Mon, 22 Jul 2024 09:57:48 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=DI3DCTBhTLEkeigmbUVEz4XFZrGHsIeFwNY9PKQr4MI=; b= ZLM3ZD1AxdGbHWMyxeNBdOPvb9KkfC0ll8OMY+I14KlfsX+ymyYPAbFqCVl7h4Fo i2PPo3eUxOLsq8l2DrMKRJCI2kXlAbPkESDUNHT1BO97XxZgN42rCVlTi4WtKESN F2HQpT2YVntUvljw4nmbNzdjCIrE0t7DagrU9s5ueC1v55k2q0Hxqu59XvjvV3c5 qIZa10nMAv7Gs4Y3rNlsZcKmf2kzuI2juP0mDRguONUTSbYVKTB/oh1fm5t1P+Rx ZtnenRLREKPPsXJDnqBXB/k1C8nerwaL2Klo0ZUrHEOav42XrkbFY+t30BOefVn2 a8HC7zJ2pfwD+T4H2ComMQ== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 40hft096cs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Jul 2024 09:57: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 46M91hE3008950; Mon, 22 Jul 2024 09:57:46 GMT Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam04lp2174.outbound.protection.outlook.com [104.47.73.174]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 40h29yqfab-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Jul 2024 09:57:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wPnR/py77kkdBxim6awjZAYEKSP8+Fs0kSYf5AME8WyfbNUHZrl8/i5wmug/i1k6EWtqUjnZqOswmbuRKyo61T1SnolN15EIY5njIjxSAqcB0Lp3gBisJA2eNjqVKnKsrwqKFTnQJ8sVsy5JAGOzFP1f2VyDDuflfUO4lr/sv6EiGtxGgGmFNEZ6kMPlZ41awqNSCQo2J8rqMCbE1XwiTW61geuUiTWWe/hob3IScOvyk2jlBHuSJu0UxU9JUUcCds8fsMkb6oHA/QhpMasopcKezWaVqBPQ7nAkBDDgn69Q65mUND9PK2LoLBVOEv4pVKB5M2vKQcGSqoeKJwzlLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=DI3DCTBhTLEkeigmbUVEz4XFZrGHsIeFwNY9PKQr4MI=; b=WuKG3UBK6q+8ad6Aa3mOezxKaWOMEyx72AsJa5kIa5sEKSox/+MedGtxZA1xnAW4On8QsbMsPPBAdaQou+SkPqU9iXWuDeu1VZrxle+xcMOoCVZD4iVS03kBWGCtbX8My480jDzZsQbDIIU4ZEXGUelooYEHOFj7VqWw11ExxqbGz/csWUVHLf6fHjqo+IvuT3PSk+opw5f/z0Gw2268N2+bHDxQlg/+XWZHZuMv4vGgB6ujoZO6o5/2MvSKmid7Ovucpsi2uI7bW810DnlqIJ5Dt/qJNOKUCKPdl49M4UHZMHDfZV7meiRojVLzGaDfq2MJqa+gAskuZGsRF/kC2g== 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=DI3DCTBhTLEkeigmbUVEz4XFZrGHsIeFwNY9PKQr4MI=; b=DirdkhiukbZA1e6Kp5n7GEOHeGmdTOXBmio/ue01A+cE0K6JThoVXSaW+q6rsstML0PVfsB6aJ3QKsZUcWRvC7mChjWt/MSpavR++4ct2YqTE2SFwyIGokWSEx951Y2uRwqbwIgyPwmQcis/tzaJzrOTS1bmt63PUdPavNIUXz4= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by PH0PR10MB5595.namprd10.prod.outlook.com (2603:10b6:510:f7::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.19; Mon, 22 Jul 2024 09:57: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.7762.027; Mon, 22 Jul 2024 09:57: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 v5 2/3] readv.2: Document RWF_ATOMIC flag Date: Mon, 22 Jul 2024 09:57:22 +0000 Message-Id: <20240722095723.597846-3-john.g.garry@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240722095723.597846-1-john.g.garry@oracle.com> References: <20240722095723.597846-1-john.g.garry@oracle.com> X-ClientProxiedBy: LO4P265CA0112.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2c3::15) 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_|PH0PR10MB5595:EE_ X-MS-Office365-Filtering-Correlation-Id: bae33a41-0d1e-4377-4e4e-08dcaa34bb60 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: mNTWWEY1QNT2LTCpaXDglWaOtr9kyw0+/kN4gQe79Ij7VzL3Q90vC22/FWCXcxmoCUzP486YRD2vBIhdXqD6p+Bxt9U9rJFxuqLREueZegkZc0XPWmIXHGXJNrPcr/+NFS3nRe5JtC6dv7gq6JiwGAZfO3gUJ3BpTwQVnSDPyrZirBJHedtVj90ib1fxu/sBCV5XPqnnYfDupSwu9CU+O1SXn3b8/nrZDySMHT1IWd4eDPveUsmLmLfUADIu3q5DAfXRB6qI1eCv8l8JT9nd28nbzcm/XqG9NjCDcaYGOnjQVwfsqfN1w0vYuOaYwyXT/0YZrafm9BV2934c0BjXpT0pHPNySPV++a89XItkKpCMfDI2U6ZsMrpq+eoJfUvQVBVnOUoKprYuqu1enlBB91x1YC7xyCN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c3ixyyu8uqlXaJV/yoD90g7e1Xh5Fqlat1vjol7kMFe7L5vlufWsRSjhsYjY+GxKtMt9vXrkrFymqHoQvmmgm4D9qjxVxwavqNw4ah/YpQ4fdxI+QyWykB/GXGHncSlN3eCvsfRJV9C041ofGuKMqT8IdV/yb+ZSgR+floEuO+xwp4KcUElJowHm37SQys47s8ZmA3y5iVNkjZ2MJiSRoNCTTJWZI5eE8FIs93XeDzVRDOSYY4WidzXWUyecA= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: bae33a41-0d1e-4377-4e4e-08dcaa34bb60 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2024 09:57:44.0331 (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: +bxEiboGC9QU+e/G+YVMI+4KUCbVZJgmYfNwvwLA09RKKlRHK8bLi5KziyWx2ZFMsUGj4qlLDpvWHGYKIhlHGw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB5595 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-22_06,2024-07-18_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 spamscore=0 malwarescore=0 suspectscore=0 mlxscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2407220076 X-Proofpoint-GUID: mdh_w7B4AZOq1ZHPpyncZEAM0dzKE26s X-Proofpoint-ORIG-GUID: mdh_w7B4AZOq1ZHPpyncZEAM0dzKE26s From: Himanshu Madhani Add RWF_ATOMIC flag description for pwritev2(). Signed-off-by: Himanshu Madhani [jpg: complete rewrite] Signed-off-by: John Garry Reviewed-by: Darrick J. Wong --- man/man2/readv.2 | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/man/man2/readv.2 b/man/man2/readv.2 index eecde06dc..7737eb65c 100644 --- a/man/man2/readv.2 +++ b/man/man2/readv.2 @@ -237,6 +237,50 @@ the data is always appended to the end of the file. However, if the .I offset argument is \-1, the current file offset is updated. +.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 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 in the range +.RI [ stx_atomic_write_unit_min , +.IR stx_atomic_write_unit_max ]. +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 32KiB at a file offset of 32KiB is permitted, +however a write of length 32KiB at a file offset of 48KiB is not permitted. +The upper limit of +.I iovcnt +for +.BR pwritev2 () +is given by the value 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, +.B O_SYNC +or +.B O_DSYNC +must be specified for +.BR open (2). +The same synchronized I/O guarantees as described in +.BR open (2) +are provided when these flags or their equivalent flags and system calls are +used (e.g. +if +.BR RWF_SYNC +is specified for +.BR pwritev2 () +). .SH RETURN VALUE On success, .BR readv (), @@ -280,9 +324,26 @@ values overflows an value. .TP .B EINVAL +If +.BR RWF_ATOMIC +is specified, +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. +If +.BR RWF_ATOMIC +is specified, +this maximum is given by the +.I stx_atomic_write_segments_max +value from +.I statx. .TP .B EOPNOTSUPP An unknown flag is specified in \fIflags\fP. From patchwork Mon Jul 22 09:57:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 13738625 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.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 2E18716C841; Mon, 22 Jul 2024 09:58:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721642339; cv=fail; b=WO/gxgsxnjz8XbFVxadywaGroblcy59D3I4Wld3n/liykASDGhfLgkk8Z4H7C++yD7OyK4c7S0ajWa1kDCQyg9ZBb0qsllimWaUUqt17UiByzEA0RSyGANMKAgI50O7j466qaiw1X51Ap0gR1XolABgXzEqDDg8yQpo76sEttHo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721642339; c=relaxed/simple; bh=EZLnzSaHtauUFq/jfIZ6wCZyLbg6lz8UW4dp6IqGDgI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=BhrN8OxvnYsvLt8yQzgj4xn7zVh8ecmzfQc7FKZ4eWqChMIYUXlZm7Fua2KJZ1tHTveIt128RPS44PkMYpvrQW7yPb0bzLhwvbedjrLax+RYxuEd+bTPnhkP2WswL5bn4USuAUAdRABGQPyugB3/vL5XtTRJu8KHNQ1/bGE7ObQ= 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=BSXw/TFT; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=bIUOlDMW; arc=fail smtp.client-ip=205.220.165.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="BSXw/TFT"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="bIUOlDMW" Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46M7cu30031930; Mon, 22 Jul 2024 09:57:50 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=FaQe4E8VXUUnm+VGCUfgguoOs6y/mov8H9ltDweTpeE=; b= BSXw/TFT+X/C2e088taMnckyHsBXKn+dae1fJet/en3Cu63xfgtANPJDGPhzmN1G o5Q5O8fq/dWBR6b/aQ/9EeUBLmFnfXKJbNF/QtriKUJ+uMzvd98rZ+Y3CViqxNOi e/4Yjw7N0VwKmpUJDTL3gQrPDNcMb0i8jQ2VAjlUs4HMZ7X+C9I5Q1wqbh0/H0TW FAv44+FbTWlhKv0013N24be+GPBz6XNcBmbNPC/WnzuqgZHkAfzkDxga1VInDWcC p30xx7UE79Ex1UUjHw7YEXGaZfvcsnhDyuvR5oxPCi1s40UsyQpCXXlFVHhK9BIW TbaOKABCfNM/dxt+dmdWcA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 40hfxp961t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Jul 2024 09:57:50 +0000 (GMT) Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 46M91iDq028580; Mon, 22 Jul 2024 09:57:50 GMT Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam04lp2172.outbound.protection.outlook.com [104.47.73.172]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 40h267q6w0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Jul 2024 09:57:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rwVEW1qs4bob3KddfWPcULhxWrVsSKXDC6MJt/tXBbAZiGqF7dczPNh3YVaMnJoCHQjt7v7jeFFCgDYOATme0JqM3OO8+XVS5tBgmdwib0j2I2e3CLs05q8cVtiYKEYYN6Bjsozyo6Q5N0FAR1LrIz2/YataYUexHvKzyuYt2TIvaj4MuyYEVgnsERu1wSQnUKiXxhMCQexJD4/+kDBPziw4RRedBSi9G3CCXuf+W7STp32SiQqmB/+3vcyPvWJmQJil7oP5flEDnbUE7AwFtAELC86V7A6d0tJtoZJ52e5igEF+jwEgf1H+mSUd2SUzdl24B1IWSJEYz8qrL1hKtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=FaQe4E8VXUUnm+VGCUfgguoOs6y/mov8H9ltDweTpeE=; b=eIT+zd/jwat6JIKtloQUX9tWtXOH27fCeQmDzDqoopxboyHeU1oZxBwuP350+UtVDxvMLtgWpDYh0Zvr330hB2TnyX7kSbHN0i7SlClXFs0Fdzl5CLyxHSJwpKEPXA5Hhxi3il9FCYIt3+cv/daoEczNZ0dgtGMdMRb8s94Dt8e3y5bhej+gQcoTldCrLfd03TCNzPf0BLsQxwoZ3b+is2ZNHLTPs0krGZVHLnZBVYGnFYjwvj2SysFLqkLkbudgf8zGNHO2cngGt6bh4nU3wbam+mTrqBBGkaKU4wQBLrthy+SuiCPJ8YeKp02dKMfDz4jLAbTiKdE4dh1rWo4IEQ== 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=FaQe4E8VXUUnm+VGCUfgguoOs6y/mov8H9ltDweTpeE=; b=bIUOlDMWPGgo4O0Zkq8uFpcPhZ1YDV3EfS3IBgKH4EYXUmJu5P2zZLGvdkR2cyeEAZcQNxC/Zj9ieluwm25NS6WLEKGK5XrYBHrGMlLf3h9PpbEKb/maPywoA+PgrGmk5v6m+6pwMkn6GCqHzmlMgk/6MwFmAcLrjx6lTI6YbAw= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by PH0PR10MB5595.namprd10.prod.outlook.com (2603:10b6:510:f7::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.19; Mon, 22 Jul 2024 09:57:47 +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.7762.027; Mon, 22 Jul 2024 09:57:47 +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, John Garry Subject: [PATCH v5 3/3] io_submit.2: Document RWF_ATOMIC Date: Mon, 22 Jul 2024 09:57:23 +0000 Message-Id: <20240722095723.597846-4-john.g.garry@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240722095723.597846-1-john.g.garry@oracle.com> References: <20240722095723.597846-1-john.g.garry@oracle.com> X-ClientProxiedBy: LO4P265CA0204.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:318::14) 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_|PH0PR10MB5595:EE_ X-MS-Office365-Filtering-Correlation-Id: 7ba062ad-1e46-4d00-fd55-08dcaa34bda9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: msiBNNoJ+pdlN2kDQInqOELdyuu7OVuXChP9mH1hCMqbII+RRX0158LYR44NHOcWXa9ajD2wScJP277MVwKbs4iMlU879nTXmgr3lH2ZKVmsn3yLWUbGqL/a+DiQJ/EwlPVkRWLhdu1ILinvuhVDuhvElH/qqjlFLEIID9bjgw5Q+7osrs6v090/uDlJ/sYmfvpsvNSZYh25nnCY+wTi1YVARmHqK+9pDaCwkMbamOhhWwJih3UNFwEyRt+IqT0p7FLufxJivILy49VgNBHBSxcnUlLaeCGy2oqLkWM/V0JBHppVMJLRiopmdgs7DxGL+9Sd+JFOngxBGROnygEcuobmiDzVqX0GTigH37cmyTv76OUhF1R1ZlL74mt9s4z0KRX8Nyj7RpKIWGzuZ1MlmhPZ1nv+vkM5ewYI1FiQohSiAdCa+UcQI12vkGI7r+gbvssAoOtrGUfoG+apayvSSsVxHsc7LoNe0dm3sp5SIQV6CjPOAcgMA5qS0MHw+YDX694XbZJOrOSeNTeHpxhGsgWh8L9OT0vuf8JGtEb1fAuIJQh7PVSXy/FZ6wmfWIiX6OVOkz3dNnf//ZcxjmA/VYMEvcXRmbc1proCu8aQaho1ZtPh2HkVwB8kXmoxgZewGF2FpqyJMAUoSfRg+M5pdM4Se2urqhb8Q20Fv6vTji/5ESO536xECX/P5F9027+fJhedz9JVzBpdxAbqcwl9EREG/3VUQWcGzG1EX9kDzy0KgyXf7cGVn74BJ/HERWxNnOFPBFbTWrw+oibaaVLita2/AsRcwYMMyPnFjVJVO02wLF7B+6txs611GtaIs/y0AHikwsLZ+Snu4Q5MvWzaYZtxZOZfdKouQpfDUkkl2FOob2K7eN50pTIAnTCZnWRZxsz9tTJkSdakh4GKWdD2Nw7ZNByt9EoKb5utmXEhpWkTwbZ4iCErEUgb3T4N42RknnkSshqRyIKJXVlcZcEy4crKy7CjRTE0ZAPTBT/39DJlY5SYu20hvD/iSOA+YAHg1JNVjskxSBMdRUgNWgGs8yZXfPbgdorCIBEvtdFASfR1EARqc2exlCQS3wwYXzHIR47HV25VOaGQUow97aOoumUBCmH6e5T374tY9xhVgJ1p6sKwCCefQbtBmJotauO4GyZg1PSi16BDLNuAUW92vIJmcnyqr9OmK5dsTfUK5pa9jCXRxV3UN/TBQybMqLYNrE2VYTKZv+f8bZbEdVno5mHEapzvNZ/beQlU409aTTWCcecmt7qyVVHZtYlDB4cWYvar3jSwdhujZs8o05YcP1LdKxzObPegtaKZn1In0c2u8EYGlC7RQmNSyw+wf69VlH2DhZTbKyYBHcJXzbWslA== 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)(366016)(1800799024)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Mh0Eg0IJgls0sAk36xkiYDiHUB4Y5M+fjqO/YZYqDv2jQdwCR4vfx82CuYcjdFkkNTCocJlWZJO2t7XmpW0ek7wCU4inMTUj3q6ceis2aWEm7VxXQiP49tmdkN82jppblUji5h7oJwc5xh6cWsikp9YvTs8d+VaBZGZHbHMCMijfDrWa1bbxHLA94gNx1j1YCi6ClGonaZudqCGvzjOx0nzYWmAxg+gvGBpP20dFoGGgfbEPrF3lD7wOUm5ms5p0m35SzFRWp2+RjtdSfhdlip56S9MSgQU8/OnKmXBL6RVMN/rLK7HnBNxfLlk8wQGi0HudAeEoMpDiBItS4XqPnzG/58rQCktSzBBiKIUOG/YxbTCKYxMYC5LTIjrc7nO1+vNTO4T0OPM1Lcl6OZKqvZlg6SUqn5VGeRtke9AGIerRS7cMhsYN4Q4Tdk8BuTXFN9swHwOrJclPV/SsZvJqwLz4oYJ4YrCAL/WrsxiaDLG+mTEoiwfcY7NTZ+WS4pMDROlOr+uga1pi0CluXjbnVcgdJwLRDPU10Qx85lpLoWWdUr45luhqghjU08YgEd/Xq/wVsxLCXtFfTgfOuAeP2tRy1Pd+dxTT+E3xWkNY09hZ5wqHdXQKuo8hS42dQbEjWBKyZXa4IKdlf+PvmrU8Czb688vCYgLKjb9neqTPgCyxfau69kolkMfLvNvYCLXPcNw6pLMeW9bv0TCduevqv2+cC0gj8I4amYxOMZWbN6jaGdM4v/KETLE8lwqRe0bqTOeZtyAEoRerG2fis6ifBje+JV/KejEQ7TDFLBYt3FR44hrsFBHLxmqZWBj9TpF1Sr/ZRiLE8/r2UKIodCZR64B6tmQslxwrz97K+bHEMLJoDflEXiQy8Zk5o0oIabMZhASkNLxeUYLgv3DirdH2F3O53shduGDRIPF7VfaUf2gkcfl9gystr/hf26FI8ASLaQ83yDeCVzh6Drk/Gs5V76cK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DrnnI/ibbRrve1LFzIlnwU29v/OkYsftNXOv3YVgW7CUdODvqBJM1PctlVrd+7xS/bvel8T5LP/k6jTFbGXIfKZ/RtDS2+PkzGqc5+nDBQ9tsd5g46ePyDiwZwzeLTzhT7Ly7vbjk7JsAmGbKCCpQa9UPAe6UzbSi3qOaLTP19hUhEH4Qt+xXBKVpFfn176eRp4syVQOthSI6L7nwaxlnB38of6AQEOw5YLykWxzz5JJai3IS2IEMMXpZr56DKIM= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7ba062ad-1e46-4d00-fd55-08dcaa34bda9 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2024 09:57:47.7642 (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: nSp4IotYc50JmFD6mkEtMmzzra2u+GJYNhkrmCEALqADWsmjrSiCELFKCa/NwuwkUCrt5KhYGhsHjsU+CHvk3g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB5595 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-22_06,2024-07-18_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 suspectscore=0 spamscore=0 bulkscore=0 malwarescore=0 phishscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2407220076 X-Proofpoint-GUID: XsY6W9O1m5UBbL_H7QxyxON_9Jxg7rEh X-Proofpoint-ORIG-GUID: XsY6W9O1m5UBbL_H7QxyxON_9Jxg7rEh Document RWF_ATOMIC for asynchronous I/O. Reviewed-by: "Darrick J. Wong" Signed-off-by: John Garry --- man/man2/io_submit.2 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/man/man2/io_submit.2 b/man/man2/io_submit.2 index c53ae9aaf..12b4a72d7 100644 --- a/man/man2/io_submit.2 +++ b/man/man2/io_submit.2 @@ -140,6 +140,25 @@ as well the description of .B O_SYNC in .BR open (2). +.TP +.BR RWF_ATOMIC " (since Linux 6.11)" +Write a block of data such that a write will never be torn from power fail or +similar. +See the description of +.B RWF_ATOMIC +in +.BR pwritev2 (2). +For usage with +.BR IOCB_CMD_PWRITEV, +the upper vector limit is in +.I stx_atomic_write_segments_max. +See +.B STATX_WRITE_ATOMIC +and +.I stx_atomic_write_segments_max +description +in +.BR statx (2). .RE .TP .I aio_lio_opcode