From patchwork Tue Mar 26 13:38:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 13604216 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 335FF73518; Tue, 26 Mar 2024 13:39:35 +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=1711460378; cv=fail; b=SgYS8wgQ3dRWhxwx9l7cBScKTtx4XJdQb0OYJDB3Hus1iubDoV3TQIAm9QhfvxL6r6hp8EHVJFKv5vo1Orsjmm89TJoSt1MQMuY9k8PhGEx+ZcD72nAcit3R7phRFeoYs2Fn5O1jmnf5rqVdfz8LzxaBt6eKUcidjjZLGKmP6EQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711460378; c=relaxed/simple; bh=6PiPR0VqLMXYTI74uleFDDaO33HQzPm5FcI7zP3svZI=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=Z+A4ZFiF8yuP8s6Zs4dU8wKNlerUn2hKJZxGXtKT/RjaQuDHqXuc+ie+UDm+Rx8qSENhc92PxeOUhsJPDqGL5aqPoBR7QDoqXbOlEZB2wx8bnIzG5DvTnJfAwheqCGSAeNfI6fWWpdGhNqI1IxNUciXyv0CQ8A+vU5KN/+4iCag= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none 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=YxHgbipc; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=DeonNiJG; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none 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="YxHgbipc"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="DeonNiJG" Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42QBnSMo009002; Tue, 26 Mar 2024 13:39:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=corp-2023-11-20; bh=oMrZEbEWPtJaixdkqj6DMvJZqDBXzMl/QyEzuB/fb/E=; b=YxHgbipce2swCS95B/2sJlo+2Xl+Afn2x2tU1nPUy8XABkxTbYAJjcIqBfS/I4HYoBv2 MqcS/lWiHApW1/uPkJ849k7KMH65U8wwAZQbrZMk1SU9xKKW2+yYKZFYzSw8vM7Osb0g QoTdNO84l62HeOLFOJkIwPyg/J6/ouN2UV5yq4XAgN8fjXn1fX8oVKvPilV9mSzKQag1 xzgBKGnFd7nK0Smg2+WheUi5jVuWcQlnuM+ehhfN4vxL03ZhogNdOx+rx94N2cUtTMOh ssn6Tzzw29P5BcqqnE+9tVe93UbpfHT8fwrb7e9tXFMi41mh+AHvDJ1yhxWwyMJ4kecF pg== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3x1q4dw1nf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Mar 2024 13:39:07 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42QCMTxC017642; Tue, 26 Mar 2024 13:39:06 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2041.outbound.protection.outlook.com [104.47.51.41]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3x1nh77wcu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Mar 2024 13:39:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JeT4DXjDPVvW02Ot9Lm1IWu4MmW+rdyBtFBxwRlRdKxnBlD3f1CAwVfAdHeqInbVB9rq7t05T+lkrDGaBqf7V8aE+B/b73sWA0tAXUCWsV/tQLuu7h3Hvnknd2AD6DBsc+HzhKVpWsVsgAlumaFnRICAl/4TJXb1ckiskjuVw+KTCrB8LSa0ebbUoJMTUsMFM+5MTix+hDdqVIg1AjFvFrmTDshsCXLFv4BUUa2XnuUBhMZaCJNUxSPIxs/2tZAhGRtRRENCCQafYLQYICmeEV29YQ+pYCstJJbbXBksX1EHLqsE/2Ff1hrDMNVlngfDTDnDhHrI5taAklqFfahkfw== 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=oMrZEbEWPtJaixdkqj6DMvJZqDBXzMl/QyEzuB/fb/E=; b=leibvHSIXXSNhmjgF7WVlqJh5D4FTQj50gGjG/xQwyfbSREPMq8DrHT+f7I0FEFflU0/fzkVr9seT6/MI1OECCiVtzzHpnBgf4cnfLqAhO7kZPAPHp2sal6ru4GGy9YUUOPCTvlxo5ojYdiy32+dqSmo3grmPsRDBLHQ039PsOWj2IcuWDZvqchqEi/o3vSA2TvpFoT6CnwfkN6jhwKIhNXBNl4coYTGdtenebNDNtPrWX8zCcyTbAlJBFuYOSmzErueWVVoDGp1eUMaaTzSBKJZHOPVHBEm0Q+nFDc8zOyTA6e+DivHrF3cI3sFIzc8NsLWa7/I8j0mfkTc8YV5Og== 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=oMrZEbEWPtJaixdkqj6DMvJZqDBXzMl/QyEzuB/fb/E=; b=DeonNiJGbcM/F3zzfhB+P51MGzR5z8RcCX0Dk7B2/VXtFQI/Qhy4Iy2e2Bce6wqwisAumiqVNA84N8Rfl8JEWOXquFUsebOOGHz4P1UxBTvcz4tC5cwLIhv4XhxC/cXTJpH+BxZsxJf9cyKADACBh0wxNMmrbdxRzJEbUtv55WY= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by SN7PR10MB6666.namprd10.prod.outlook.com (2603:10b6:806:298::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.33; Tue, 26 Mar 2024 13:39:03 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::ae68:7d51:133f:324]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::ae68:7d51:133f:324%4]) with mapi id 15.20.7409.031; Tue, 26 Mar 2024 13:39:02 +0000 From: John Garry To: axboe@kernel.dk, kbusch@kernel.org, hch@lst.de, sagi@grimberg.me, jejb@linux.ibm.com, martin.petersen@oracle.com, djwong@kernel.org, viro@zeniv.linux.org.uk, brauner@kernel.org, dchinner@redhat.com, jack@suse.cz Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-fsdevel@vger.kernel.org, tytso@mit.edu, jbongio@google.com, linux-scsi@vger.kernel.org, ojaswin@linux.ibm.com, linux-aio@kvack.org, linux-btrfs@vger.kernel.org, io-uring@vger.kernel.org, nilay@linux.ibm.com, ritesh.list@gmail.com, willy@infradead.org, John Garry Subject: [PATCH v6 00/10] block atomic writes Date: Tue, 26 Mar 2024 13:38:03 +0000 Message-Id: <20240326133813.3224593-1-john.g.garry@oracle.com> X-Mailer: git-send-email 2.31.1 X-ClientProxiedBy: LO0P123CA0004.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:354::9) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4313:EE_|SN7PR10MB6666:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: D/z9GpHkLEtLf5vDDw1v8hTpW7dVykT6bM6956zmcEJS9K8IzfLyCmZjuaMVkIrx+iEAs7v1/bcwlJrJaZo4aiLbt4Co6nxqxnXWlO2KpJu80bYRlXTAXFPczi6O1sm+4Ck5N2CPlSs9zDCNRVipdlB6hCP2hDBuoqrWdVpWPH1912R4ECYT42p4zu1CYj7DWiypRXm1JKkhzhmkCctV3k9uwUvv+dJiiJphb/5YmuDM+4vYFnJeZQzgT7iOlvYINOFSGZaPng2pMnok3r8hnPJaXhPOxa0RbQxdwLJemRTnmlk9poM/VIs2wB5+5CeoO8l0pYkurcgoaU55TVhAv+8HjmvkQgF82VQjtLqXFayD7iq3OJZVo6rFixl4GQzoOOdirpqNZRxeR11fiZl/TMmKUnLvYBNF8aRnfJZ9EG0mWjdcfha2vEhL94mHosbJaFfPov1/YClT8GUYUkWuTxBZVhrLPFCXIwUYMnZJlmcVL78NbXFGYOszsCVnMRu/C10iagLVRdvcq3qthZXFMViVE54xkMgJ9cstH9ul8iCpGPO+cjG75RHPJy+Kmv9uWtvgEDZEdiYdHCvJJfy7ve3a0kgZ6Qc37FsopV8IqruNk4iEf/gL9GsGkW0MG3AEY1L/bQ21kOUSxrfP+wfDczhCNSttCSWR+a97/1UV8NI= 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:(13230031)(366007)(376005)(1800799015)(7416005)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?xP1vZaEbjYKcPJjRiIYuZ8YKK4FV?= =?utf-8?q?6lHUchS/bYnBDgKflveKFQ/3v3shkbUezlAyxySw8tc9XcJdOqOdMqcdW9+qbYTDT?= =?utf-8?q?oB31YsCYtD5mNXDVunLGggmAcJO0Ch/LVv5+O/5N9Cju4vCfCRwUEXQU5rE4fCNaw?= =?utf-8?q?Lpv00AsvO3gXrBP54J22ZSrwi+kHfA2/m791tbMn+fr449jw8dQowUTr76R54BN5C?= =?utf-8?q?LRRebzG6NdyyUSrZ5KMqi7GEXH1KJ+PyduGXYaCietNUGsfvdTZY0t0QFaQcSKczX?= =?utf-8?q?w4YzH6iRCR3YJ1ZvlKXABIly4t3T48saoZPh0ybP93k+PTNCYXItYJyGh+2W0ubvF?= =?utf-8?q?SvhIn8b7F0WdgEzjwlVk/gg/x8XQdVqq3c9TW6QiCS/QaUpi/bUYY2cZ9omeiio21?= =?utf-8?q?T4zJDunOPS71MaAVVSJEAeSM6qZEr7hsYjYsj6a2qVb5YKaPRT1zyPO9jrCx0N7N/?= =?utf-8?q?RY6T8ZrAJiGeQwD4PhBd8mD7IZd1G+cFiGRhbHLtN9ZeylA0tqYAsW0G04GSkBuj7?= =?utf-8?q?JGqVDz+oY6NZDpqA2vE2A5wqchwJ0XMHQD5wMgl9ov9WQ742y5CV0MFcbJKt6bNZQ?= =?utf-8?q?2uBNc2XxJ05K2soLBeUKJBw9twYVg7AsgHCsC1TqbjE/51OoGGtCSypeMqTagippq?= =?utf-8?q?DVi9Dn+Zjv0AVqnKPPwTkhNBO4AywkrS+/rBqQ9Ervn/+VWBInHcJnsaDEdeZCiXx?= =?utf-8?q?44oNUpyAAkNd7RNXWf9hWJX/z3nzzVjwUHejIqT/aXkOnM+D+S+VYgSiEYazCri+q?= =?utf-8?q?0ANtd58LlxB2lzK9hCIsV9zKarfkxZ2wZ+ORskOGRpE4Gsw93V2dLT1sG4WQUxqo5?= =?utf-8?q?MQ2rBVIYMP2z/EA649y5Ofal9Yr8rHf0dpAJaPBhruu4ed1sL9AdmWDW2EL4bDh/v?= =?utf-8?q?lO7a8UWLHlr0RjOPBn2+RR5yA9KwwQ+0cyqOsP1yqDNmsatvbfNuVutmsPk15XgXd?= =?utf-8?q?e+MB8T/vEVoK8ef5M3uSMkE0FzyDahFUh17teHr7OKZ83d5etwo2fv/B4yA/3Ngak?= =?utf-8?q?7ZT4aP0Z9i5zleDvqMQQwTndxD+Z7FtPHMF16pa4dMO/0kFdoaPC6rWpyw7nJXesC?= =?utf-8?q?+ZZBs1Lt1EigvxN4+9HMiFEdwChKnDvpX1z90fHiHuWVjX/vyjZO1Mocnf5j+/2UX?= =?utf-8?q?fhI9pfarqwEw3S8jB6lfDRKZMVyvq8PWlgAuGxHHzWfBzVCdRkWRw4NBaP55/Hiq5?= =?utf-8?q?BgNZV+KZ1XtVHIpwdtk05Qb8QNQsz5t2oTnXGRz31lSASpCluPQPa7cTQxwXcUn6H?= =?utf-8?q?2o22i4mr0jNj6c3Qsez1uAi3bhgI4DlYFEJoA0P9koRXpQ8tezgqoYqOnJY+UmjVA?= =?utf-8?q?FZdpi6erCMjaSUhfd6m6sqCAmgtjPZaS2fUeK68EBnHN87zQ8cgf2UMepecmJIu1P?= =?utf-8?q?OspZCI8SPDjBjevTeb0QgF/H9IDODW5cPVTu+2DJBzXKRbvWgzY8In8wMLwWRuw7I?= =?utf-8?q?uJUYzweQstb+lY0Cs9KpPLtWFvBjWOWytpKnHLoWTxBfKwgEUYhc9gzc3d16cmGhm?= =?utf-8?q?mtJ+ML40lQZfcrJHqOxz+sbv3tN7CGx1mQ=3D=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: NRVb5PBBOeaQzjUahgH28D4/CwnTTSF7bvqGS+XHQcmqTHqhRQewvkEdE6j+E+j8dEXRm4QGrtRwUs6GXVsRw5ufJI98h9TmjcdDhCFoW+gKxQFzVo/E207v5ye133KMtW9s7I1+D1gsgOF1mMK+N93tAD1LXabm3JJz1Asjpi+HJLCTt97eLfPUCWzWXG629stwgNR1dwS0QiOieGRWmoljIyxnudbEEak3f5BS2M/yfGiVbHbQlU6y91t6Ik5I96Hinq2wCnRtvb7YJJwIeeg1nlmUkVDA3EeMXrhOVTcJo0Cvv4GmsW1I07nozMmoJj2ZmvxiP+s0pE+Z9HYg8/CczH7Oudl0JjrbtbUjUjPVpg0Mj1AJoCic+CwP5ANesMl1Anb82zCXOicNC1f3Ihf4dodDVt3kLMivO0XTub8+CJSKnRN8vrTFu7+DXU+frulCgABumykRWRfVKtOWhMz5UHr+AVBz988L5Nab8ZKDorsx/gw+PjwzRqNKN0mOi8EAssNJSlmSgUruiSW0VQDtv1/UpV9qkjOf8QmdRYCd3uucMLjmWe4hwqibElQ8Ymez9XZPiM0m7+caO/ghBF1FrAgbRhDLy/gVprpQWMc= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49462b9f-5aa6-4749-4d6d-08dc4d9a194e X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2024 13:39:02.5467 (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: E2WVaEe9xMVG7YQsAy8DCeDwLnFcjwmqsXZdA9EJkDEpZkDXglMppEwZ1DiW0G/s8sI3/CKlSuxT5RcamOBc+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR10MB6666 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-26_06,2024-03-21_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 malwarescore=0 suspectscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403210000 definitions=main-2403260095 X-Proofpoint-ORIG-GUID: dW11E0SfL-5jY_l9oHrwGF-XEoneWVL5 X-Proofpoint-GUID: dW11E0SfL-5jY_l9oHrwGF-XEoneWVL5 This series introduces a proposal to implementing atomic writes in the kernel for torn-write protection. This series takes the approach of adding a new "atomic" flag to each of pwritev2() and iocb->ki_flags - RWF_ATOMIC and IOCB_ATOMIC, respectively. When set, these indicate that we want the write issued "atomically". Only direct IO is supported and for block devices here. For this, atomic write HW is required, like SCSI ATOMIC WRITE (16). XFS FS support has previously been posted at: https://lore.kernel.org/linux-xfs/20240304130428.13026-1-john.g.garry@oracle.com/ I am working on a new version of that series, which I hope to post soon. Updated man pages have been posted at: https://lore.kernel.org/lkml/20240124112731.28579-1-john.g.garry@oracle.com/T/#m520dca97a9748de352b5a723d3155a4bb1e46456 The goal here is to provide an interface that allows applications use application-specific block sizes larger than logical block size reported by the storage device or larger than filesystem block size as reported by stat(). With this new interface, application blocks will never be torn or fractured when written. For a power fail, for each individual application block, all or none of the data to be written. A racing atomic write and read will mean that the read sees all the old data or all the new data, but never a mix of old and new. Three new fields are added to struct statx - atomic_write_unit_min, atomic_write_unit_max, and atomic_write_segments_max. For each atomic individual write, the total length of a write must be a between atomic_write_unit_min and atomic_write_unit_max, inclusive, and a power-of-2. The write must also be at a natural offset in the file wrt the write length. For pwritev2, iovcnt is limited by atomic_write_segments_max. There has been some discussion on supporting buffered IO and whether the API is suitable, like: https://lore.kernel.org/linux-nvme/ZeembVG-ygFal6Eb@casper.infradead.org/ Specifically the concern is that supporting a range of sizes of atomic IO in the pagecache is complex to support. For this, my idea is that FSes can fix atomic_write_unit_min and atomic_write_unit_max at the same size, the extent alignment size, which should be easier to support. We may need to implement O_ATOMIC to avoid mixing atomic and non-atomic IOs for this. I have no proposed solution for atomic write buffered IO for bdev file operations, but I know of no requirement for this. SCSI sd.c and scsi_debug and NVMe kernel support is added. This series is based on v6.9-rc1 Patches can be found at: https://github.com/johnpgarry/linux/commits/atomic-writes-v6.9-v6 Changes since v5: - Rebase and update NVMe support for new request_queue limits API - Keith, please check since I still have your RB tag - Change request_queue limits to byte-based sizes to suit new queue limits API - Pass rw_type to io_uring io_rw_init_file() (Jens) - Add BLK_STS_INVAL - Don't check size in generic_atomic_write_valid() Alan Adamson (1): nvme: Atomic write support John Garry (6): block: Pass blk_queue_get_max_sectors() a request pointer block: Call blkdev_dio_unaligned() from blkdev_direct_IO() block: Add core atomic write support block: Add fops atomic write support scsi: sd: Atomic write support scsi: scsi_debug: Atomic write support Prasad Singamsetty (3): fs: Initial atomic write support fs: Add initial atomic write support info to statx block: Add atomic write support for statx Documentation/ABI/stable/sysfs-block | 52 +++ block/bdev.c | 36 +- block/blk-core.c | 19 + block/blk-merge.c | 98 ++++- block/blk-mq.c | 2 +- block/blk-settings.c | 109 +++++ block/blk-sysfs.c | 33 ++ block/blk.h | 9 +- block/fops.c | 47 ++- drivers/nvme/host/core.c | 49 +++ drivers/scsi/scsi_debug.c | 588 +++++++++++++++++++++------ drivers/scsi/scsi_trace.c | 22 + drivers/scsi/sd.c | 93 ++++- drivers/scsi/sd.h | 8 + fs/aio.c | 8 +- fs/btrfs/ioctl.c | 2 +- fs/read_write.c | 2 +- fs/stat.c | 50 ++- include/linux/blk_types.h | 8 +- include/linux/blkdev.h | 67 ++- include/linux/fs.h | 36 +- include/linux/stat.h | 3 + include/scsi/scsi_proto.h | 1 + include/trace/events/scsi.h | 1 + include/uapi/linux/fs.h | 5 +- include/uapi/linux/stat.h | 9 +- io_uring/rw.c | 8 +- 27 files changed, 1173 insertions(+), 192 deletions(-)