{"id":258603,"date":"2026-05-29T07:17:00","date_gmt":"2026-05-29T11:17:00","guid":{"rendered":"https:\/\/news-you-need.com\/index.php\/2026\/05\/29\/btrfs-change-coming-for-linux-7-2-yields-very-healthy-performance-gain\/"},"modified":"2026-05-29T07:45:16","modified_gmt":"2026-05-29T11:45:16","slug":"btrfs-change-coming-for-linux-7-2-yields-very-healthy-performance-gain","status":"publish","type":"post","link":"https:\/\/news-you-need.com\/index.php\/2026\/05\/29\/btrfs-change-coming-for-linux-7-2-yields-very-healthy-performance-gain\/","title":{"rendered":"Btrfs Change Coming For Linux 7.2 Yields Very Healthy Performance Gain"},"content":{"rendered":"<p><a href=\"https:\/\/www.phoronix.com\/news\/Btrfs-No-Serialize-Direct-IO\">Btrfs Change Coming For Linux 7.2 Yields Very Healthy Performance Gain<\/a><\/p>\n<p><a href=\"https:\/\/www.phoronix.com\/news\/Btrfs-No-Serialize-Direct-IO\">https:\/\/www.phoronix.com\/news\/Btrfs-No-Serialize-Direct-IO<\/a><\/p>\n<p>Publish Date: <a href=\"publish_date]\">2026-05-29 07:17:00<\/a><\/p>\n<p>Source Domain: <a href=\"www.phoronix.com\">www.phoronix.com<\/a><\/p>\n<p>A change coming on the way for the upcoming Linux 7.2 kernel cycle is  yielding a significant improvement to the direct I\/O write performance. While a big gain, technically it&#8217;s a regression fix after a change mistakenly dropped the behavior several years ago.<\/p>\n<p>The change on its way to Linux 7.2 for Btrfs is to not force Direct I\/O (DIO) writes to be serialized. \tMark Harmstone with Meta discovered that Btrfs was mistakenly serializing DIO writes since 2023 when converting the file-system over to the new mount API for the Linux kernel. Harmstone explained with the change:<br \/>\n<\/p>\n<p>&#8220;Before btrfs switched to the new mount API in 2023, we were setting SB_NOSEC in btrfs_mount_root(). This flag tells the VFS that the filesystem may have files which don&#8217;t have security xattrs, enabling it to do some optimizations.<\/p>\n<p>Unfortunately this was missed in the transition, meaning that IS_NOSEC will always return false for a btrfs inode. This means that btrfs_direct_write() calls will always get the inode lock exclusively, meaning that DIO writes to the same file will be serialized.\n<\/p>\n<p>On my machine, this one-line change results in a ~59% improvement in DIO throughput.&#8221;<\/p>\n<p>A very nice win with nearly 60% throughput improvement from 826 MB\/s to 131 1MB\/s.<\/p>\n<p>Intel&#8217;s Kernel Test Robot is also reporting around a 12% improvement for Btrfs with this change in their own test and hardware.<br \/>\n<\/p>\n<p align=\"center\"><img decoding=\"async\" src=\"https:\/\/www.phoronix.net\/image.php?id=linux-612-linux-70-btrfs&#038;image=linux_70_btrfs_1_med\" alt=\"NVMe SSD\"\/><\/p>\n<p>With the patch now in the &#8220;-next&#8221; code, look for this Btrfs change to land with the Linux 7.2 merge window happening in June.<br \/>\n<br \/><a href=\"https:\/\/www.phoronix.com\/news\/Btrfs-No-Serialize-Direct-IO\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Btrfs Change Coming For Linux 7.2 Yields Very Healthy Performance Gain https:\/\/www.phoronix.com\/news\/Btrfs-No-Serialize-Direct-IO Publish Date: 2026-05-29&#8230;<\/p>\n","protected":false},"author":1,"featured_media":258604,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.phoronix.net\/image.php?id=linux-612-linux-70-btrfs&image=linux_70_btrfs_1","fifu_image_alt":"","footnotes":""},"categories":[48],"tags":[71,57],"class_list":["post-258603","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-linux","tag-security"],"_links":{"self":[{"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/posts\/258603"}],"collection":[{"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/comments?post=258603"}],"version-history":[{"count":1,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/posts\/258603\/revisions"}],"predecessor-version":[{"id":258605,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/posts\/258603\/revisions\/258605"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/media\/258604"}],"wp:attachment":[{"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/media?parent=258603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/categories?post=258603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/tags?post=258603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}