<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in compression.c</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>6f9a8ab7 - btrfs: compression: adjust cb-&gt;compressed_folios allocation type</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/btrfs/compression.c#6f9a8ab7</link>
        <description>btrfs: compression: adjust cb-&gt;compressed_folios allocation typeIn preparation for making the kmalloc() family of allocators type aware,we need to make sure that the returned type from the allocation matchesthe type of the variable being assigned. (Before, the allocator wouldalways return &quot;void *&quot;, which can be implicitly cast to any pointer type.)The assigned type is &quot;struct folio **&quot; but the returned type will be&quot;struct page **&quot;. These are the same allocation size (pointer size), butthe types don&apos;t match. Adjust the allocation type to match the assignment.Reviewed-by: Qu Wenruo &lt;wqu@suse.com&gt;Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;

            List of files:
            /linux-6.15/fs/btrfs/compression.c</description>
        <pubDate>Sat, 26 Apr 2025 06:23:29 +0000</pubDate>
        <dc:creator>Kees Cook &lt;kees@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>fc5c0c58 - btrfs: defrag: extend ioctl to accept compression levels</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/btrfs/compression.c#fc5c0c58</link>
        <description>btrfs: defrag: extend ioctl to accept compression levelsThe zstd and zlib compression types support setting compression levels.Enhance the defrag interface to specify the levels as well. For zstd thenegative (realtime) levels are also accepted.Reviewed-by: Qu Wenruo &lt;wqu@suse.com&gt;Signed-off-by: Daniel Vacek &lt;neelx@suse.com&gt;Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;

            List of files:
            /linux-6.15/fs/btrfs/compression.c</description>
        <pubDate>Thu, 06 Mar 2025 13:15:35 +0000</pubDate>
        <dc:creator>Daniel Vacek &lt;neelx@suse.com&gt;</dc:creator>
    </item>
<item>
        <title>da798fa5 - btrfs: zstd: enable negative compression levels mount option</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/btrfs/compression.c#da798fa5</link>
        <description>btrfs: zstd: enable negative compression levels mount optionAllow using the fast modes (negative compression levels) of zstd as amount option.As per the results, the compression ratio is (expectedly) lower:for level in {-15..-1} 1 2 3; \do printf &quot;level %3d\n&quot; $level; \  mount -o compress=zstd:$level /dev/sdb /mnt/test/; \  grep sdb /proc/mounts; \  cp -r /usr/bin       /mnt/test/; sync; compsize /mnt/test/bin; \  cp -r /usr/share/doc /mnt/test/; sync; compsize /mnt/test/doc; \  cp    enwik9         /mnt/test/; sync; compsize /mnt/test/enwik9; \  cp    linux-6.13.tar /mnt/test/; sync; compsize /mnt/test/linux-6.13.tar; \  rm -r /mnt/test/{bin,doc,enwik9,linux-6.13.tar}; \  umount /mnt/test/; \done |&amp; tee results | \awk &apos;/^level/{print}/^TOTAL/{print$3&quot;\t&quot;$2&quot;  |&quot;}&apos; | paste - - - - -		266M	bin  |	45M	doc  |	953M	wiki |	1.4G	source=============================+===============+===============+===============+level -15	180M	67%  |	30M	68%  |	694M	72%  |	598M	40%  |level -14	180M	67%  |	30M	67%  |	683M	71%  |	581M	39%  |level -13	177M	66%  |	29M	66%  |	671M	70%  |	566M	38%  |level -12	174M	65%  |	29M	65%  |	658M	69%  |	548M	37%  |level -11	174M	65%  |	28M	64%  |	645M	67%  |	530M	35%  |level -10	171M	64%  |	28M	62%  |	631M	66%  |	512M	34%  |level  -9	165M	62%  |	27M	61%  |	615M	64%  |	493M	33%  |level  -8	161M	60%  |	27M	59%  |	598M	62%  |	475M	32%  |level  -7	155M	58%  |	26M	58%  |	582M	61%  |	457M	30%  |level  -6	151M	56%  |	25M	56%  |	565M	59%  |	437M	29%  |level  -5	145M	54%  |	24M	55%  |	545M	57%  |	417M	28%  |level  -4	139M	52%  |	23M	52%  |	520M	54%  |	391M	26%  |level  -3	135M	50%  |	22M	50%  |	495M	51%  |	369M	24%  |level  -2	127M	47%  |	22M	48%  |	470M	49%  |	349M	23%  |level  -1	120M	45%  |	21M	47%  |	452M	47%  |	332M	22%  |level   1	110M	41%  |	17M	39%  |	362M	38%  |	290M	19%  |level   2	106M	40%  |	17M	38%  |	349M	36%  |	288M	19%  |level   3	104M	39%  |	16M	37%  |	340M	35%  |	276M	18%  |The samples represent some data sets that can be commonly found and showapproximate compressibility. The fast levels trade off speed for ratioand are best suitable for highly compressible data.As can be seen above, comparing the results to the current default zstdlevel 3, the negative levels are roughly 2x worse at -15 and theratio increases almost linearly with each level.Signed-off-by: Daniel Vacek &lt;neelx@suse.com&gt;[ update changelog ]Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;

            List of files:
            /linux-6.15/fs/btrfs/compression.c</description>
        <pubDate>Thu, 30 Jan 2025 17:58:19 +0000</pubDate>
        <dc:creator>Daniel Vacek &lt;neelx@suse.com&gt;</dc:creator>
    </item>
<item>
        <title>d07eaa99 - btrfs: use filemap_get_folio() helper</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/btrfs/compression.c#d07eaa99</link>
        <description>btrfs: use filemap_get_folio() helperWhen fgp_flags and gfp_flags are zero, use filemap_get_folio(A, B)instead of __filemap_get_folio(A, B, 0, 0)&#8212;no need for the extraarguments 0, 0.Signed-off-by: Anand Jain &lt;anand.jain@oracle.com&gt;Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;

            List of files:
            /linux-6.15/fs/btrfs/compression.c</description>
        <pubDate>Mon, 14 Oct 2024 15:11:38 +0000</pubDate>
        <dc:creator>Anand Jain &lt;anand.jain@oracle.com&gt;</dc:creator>
    </item>
<item>
        <title>0f712026 - btrfs: rename btrfs_folio_(set|start|end)_writer_lock()</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/btrfs/compression.c#0f712026</link>
        <description>btrfs: rename btrfs_folio_(set|start|end)_writer_lock()Since there is no user of reader locks, rename the writer locks into amore generic name, by removing the &quot;_writer&quot; part from the name.And also rename btrfs_subpage::writer into btrfs_subpage::locked.Signed-off-by: Qu Wenruo &lt;wqu@suse.com&gt;Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;

            List of files:
            /linux-6.15/fs/btrfs/compression.c</description>
        <pubDate>Wed, 09 Oct 2024 05:51:07 +0000</pubDate>
        <dc:creator>Qu Wenruo &lt;wqu@suse.com&gt;</dc:creator>
    </item>
<item>
        <title>336e69f3 - btrfs: unify to use writer locks for subpage locking</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/btrfs/compression.c#336e69f3</link>
        <description>btrfs: unify to use writer locks for subpage lockingSince commit d7172f52e993 (&quot;btrfs: use per-buffer locking forextent_buffer reading&quot;), metadata read no longer relies on the subpagereader locking.This means we do not need to maintain a different metadata/data splitfor locking, so we can convert the existing reader lock users by:- add_ra_bio_pages()  Convert to btrfs_folio_set_writer_lock()- end_folio_read()  Convert to btrfs_folio_end_writer_lock()- begin_folio_read()  Convert to btrfs_folio_set_writer_lock()- folio_range_has_eb()  Remove the subpage-&gt;readers checks, since it is always 0.- Remove btrfs_subpage_start_reader() and btrfs_subpage_end_reader()Signed-off-by: Qu Wenruo &lt;wqu@suse.com&gt;Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;

            List of files:
            /linux-6.15/fs/btrfs/compression.c</description>
        <pubDate>Wed, 09 Oct 2024 05:51:06 +0000</pubDate>
        <dc:creator>Qu Wenruo &lt;wqu@suse.com&gt;</dc:creator>
    </item>
<item>
        <title>a9c50c97 - btrfs: drop unused parameter level from alloc_heuristic_ws()</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/btrfs/compression.c#a9c50c97</link>
        <description>btrfs: drop unused parameter level from alloc_heuristic_ws()The compression heuristic pass does not need a level, so we can drop theparameter.Reviewed-by: Anand Jain &lt;anand.jain@oracle.com&gt;Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;

            List of files:
            /linux-6.15/fs/btrfs/compression.c</description>
        <pubDate>Wed, 09 Oct 2024 14:32:25 +0000</pubDate>
        <dc:creator>David Sterba &lt;dsterba@suse.com&gt;</dc:creator>
    </item>
<item>
        <title>3f4b1bc1 - btrfs: lzo: drop unused paramter level from lzo_alloc_workspace()</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/btrfs/compression.c#3f4b1bc1</link>
        <description>btrfs: lzo: drop unused paramter level from lzo_alloc_workspace()The LZO compression has only one level, we don&apos;t need to pass theparameter.Reviewed-by: Anand Jain &lt;anand.jain@oracle.com&gt;Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;

            List of files:
            /linux-6.15/fs/btrfs/compression.c</description>
        <pubDate>Wed, 09 Oct 2024 14:31:25 +0000</pubDate>
        <dc:creator>David Sterba &lt;dsterba@suse.com&gt;</dc:creator>
    </item>
<item>
        <title>dd5e2762 - btrfs: compression: add an ASSERT() to ensure the read-in length is sane</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/btrfs/compression.c#dd5e2762</link>
        <description>btrfs: compression: add an ASSERT() to ensure the read-in length is saneThere are already two bugs (one in zlib, one in zstd) that involvedcompression path is not handling sector size &lt; page size cases well.So it makes more sense to make sure that btrfs_compress_folios() returnsSince we already have two bugs (one in zlib, one in zstd) in thecompression path resulting the @total_in be to larger than theto-be-compressed range length, there is enough reason to add an ASSERT()to make sure the total read-in length doesn&apos;t exceed the input length.Signed-off-by: Qu Wenruo &lt;wqu@suse.com&gt;Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;

            List of files:
            /linux-6.15/fs/btrfs/compression.c</description>
        <pubDate>Fri, 06 Sep 2024 04:57:56 +0000</pubDate>
        <dc:creator>Qu Wenruo &lt;wqu@suse.com&gt;</dc:creator>
    </item>
<item>
        <title>aeb6d881 - btrfs: convert btrfs_decompress() to take a folio</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/btrfs/compression.c#aeb6d881</link>
        <description>btrfs: convert btrfs_decompress() to take a folioThe old page API is being gradually replaced and converted to use folioto improve code readability and avoid repeated conversion between pageand folio. Based on the previous patch, the compression path can bedirectly used in folio without converting to page.Signed-off-by: Li Zetao &lt;lizetao1@huawei.com&gt;Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;

            List of files:
            /linux-6.15/fs/btrfs/compression.c</description>
        <pubDate>Wed, 28 Aug 2024 18:29:07 +0000</pubDate>
        <dc:creator>Li Zetao &lt;lizetao1@huawei.com&gt;</dc:creator>
    </item>
<item>
        <title>b70f3a45 - btrfs: convert zstd_decompress() to take a folio</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/btrfs/compression.c#b70f3a45</link>
        <description>btrfs: convert zstd_decompress() to take a folioThe old page API is being gradually replaced and converted to use folioto improve code readability and avoid repeated conversion between pageand folio. And memcpy_to_page() can be replaced with memcpy_to_folio().But there is no memzero_folio(), but it can be replaced equivalently byfolio_zero_range().Signed-off-by: Li Zetao &lt;lizetao1@huawei.com&gt;Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;

            List of files:
            /linux-6.15/fs/btrfs/compression.c</description>
        <pubDate>Wed, 28 Aug 2024 18:29:06 +0000</pubDate>
        <dc:creator>Li Zetao &lt;lizetao1@huawei.com&gt;</dc:creator>
    </item>
<item>
        <title>9f9a4e43 - btrfs: convert lzo_decompress() to take a folio</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/btrfs/compression.c#9f9a4e43</link>
        <description>btrfs: convert lzo_decompress() to take a folioThe old page API is being gradually replaced and converted to use folioto improve code readability and avoid repeated conversion between pageand folio. And memcpy_to_page() can be replaced with memcpy_to_folio().But there is no memzero_folio(), but it can be replaced equivalently byfolio_zero_range().Signed-off-by: Li Zetao &lt;lizetao1@huawei.com&gt;Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;

            List of files:
            /linux-6.15/fs/btrfs/compression.c</description>
        <pubDate>Wed, 28 Aug 2024 18:29:05 +0000</pubDate>
        <dc:creator>Li Zetao &lt;lizetao1@huawei.com&gt;</dc:creator>
    </item>
<item>
        <title>54c78d49 - btrfs: convert zlib_decompress() to take a folio</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/btrfs/compression.c#54c78d49</link>
        <description>btrfs: convert zlib_decompress() to take a folioThe old page API is being gradually replaced and converted to use folioto improve code readability and avoid repeated conversion between pageand folio. And memcpy_to_page() can be replaced with memcpy_to_folio().But there is no memzero_folio(), but it can be replaced equivalently byfolio_zero_range().Signed-off-by: Li Zetao &lt;lizetao1@huawei.com&gt;Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;

            List of files:
            /linux-6.15/fs/btrfs/compression.c</description>
        <pubDate>Wed, 28 Aug 2024 18:29:04 +0000</pubDate>
        <dc:creator>Li Zetao &lt;lizetao1@huawei.com&gt;</dc:creator>
    </item>
<item>
        <title>ac325fc2 - btrfs: do not hold the extent lock for entire read</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/btrfs/compression.c#ac325fc2</link>
        <description>btrfs: do not hold the extent lock for entire readHistorically we&apos;ve held the extent lock throughout the entire read.There&apos;s been a few reasons for this, but it&apos;s mostly just caused usproblems.  For example, this prevents us from allowing page faultsduring direct io reads, because we could deadlock.  This has forced usto only allow 4k reads at a time for io_uring NOWAIT requests because wehave no idea if we&apos;ll be forced to page fault and thus have to do awhole lot of work.On the buffered side we are protected by the page lock, as long as we&apos;rereading things like buffered writes, punch hole, and even direct IO to acertain degree will get hung up on the page lock while the page is inflight.On the direct side we have the dio extent lock, which acts much like theway the extent lock worked previously to this patch, however just fordirect reads.  This protects direct reads from concurrent direct writes,while we&apos;re protected from buffered writes via the inode lock.Now that we&apos;re protected in all cases, narrow the extent lock to thepart where we&apos;re getting the extent map to submit the reads, no longerholding the extent lock for the entire read operation.  Push the extentlock down into do_readpage() so that we&apos;re only grabbing it when lookingup the extent map.  This portion was contributed by Goldwyn.Co-developed-by: Goldwyn Rodrigues &lt;rgoldwyn@suse.com&gt;Reviewed-by: Goldwyn Rodrigues &lt;rgoldwyn@suse.com&gt;Signed-off-by: Josef Bacik &lt;josef@toxicpanda.com&gt;Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;

            List of files:
            /linux-6.15/fs/btrfs/compression.c</description>
        <pubDate>Fri, 16 Aug 2024 19:16:24 +0000</pubDate>
        <dc:creator>Josef Bacik &lt;josef@toxicpanda.com&gt;</dc:creator>
    </item>
<item>
        <title>792e86ef - btrfs: rename btrfs_submit_bio() to btrfs_submit_bbio()</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/btrfs/compression.c#792e86ef</link>
        <description>btrfs: rename btrfs_submit_bio() to btrfs_submit_bbio()The function name is a bit misleading as it submits the btrfs_bio(bbio), rename it so we can use btrfs_submit_bio() when an actual bio issubmitted.Reviewed-by: Qu Wenruo &lt;wqu@suse.com&gt;Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;

            List of files:
            /linux-6.15/fs/btrfs/compression.c</description>
        <pubDate>Tue, 27 Aug 2024 01:40:11 +0000</pubDate>
        <dc:creator>David Sterba &lt;dsterba@suse.com&gt;</dc:creator>
    </item>
<item>
        <title>c808c1dc - btrfs: convert add_ra_bio_pages() to use only folios</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/btrfs/compression.c#c808c1dc</link>
        <description>btrfs: convert add_ra_bio_pages() to use only foliosWilly is going to get rid of page-&gt;index, and add_ra_bio_pages usespage-&gt;index.  Make his life easier by converting add_ra_bio_pages to usefolios so that we are no longer using page-&gt;index.Signed-off-by: Josef Bacik &lt;josef@toxicpanda.com&gt;Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;

            List of files:
            /linux-6.15/fs/btrfs/compression.c</description>
        <pubDate>Wed, 24 Jul 2024 19:16:40 +0000</pubDate>
        <dc:creator>Josef Bacik &lt;josef@toxicpanda.com&gt;</dc:creator>
    </item>
<item>
        <title>8e786054 - btrfs: fix extent map use-after-free when adding pages to compressed bio</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/btrfs/compression.c#8e786054</link>
        <description>btrfs: fix extent map use-after-free when adding pages to compressed bioAt add_ra_bio_pages() we are accessing the extent map to calculate&apos;add_size&apos; after we dropped our reference on the extent map, resultingin a use-after-free. Fix this by computing &apos;add_size&apos; before dropping ourextent map reference.Reported-by: syzbot+853d80cba98ce1157ae6@syzkaller.appspotmail.comLink: https://lore.kernel.org/linux-btrfs/000000000000038144061c6d18f2@google.com/Fixes: 6a4049102055 (&quot;btrfs: subpage: make add_ra_bio_pages() compatible&quot;)CC: stable@vger.kernel.org # 6.1+Signed-off-by: Filipe Manana &lt;fdmanana@suse.com&gt;Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;

            List of files:
            /linux-6.15/fs/btrfs/compression.c</description>
        <pubDate>Thu, 04 Jul 2024 15:11:20 +0000</pubDate>
        <dc:creator>Filipe Manana &lt;fdmanana@suse.com&gt;</dc:creator>
    </item>
<item>
        <title>fea91134 - btrfs: remove the extra_gfp parameter from btrfs_alloc_folio_array()</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/btrfs/compression.c#fea91134</link>
        <description>btrfs: remove the extra_gfp parameter from btrfs_alloc_folio_array()The function btrfs_alloc_folio_array() is only utilized inbtrfs_submit_compressed_read() and no other location, and the onlycaller is not utilizing the @extra_gfp parameter.Reviewed-by: Filipe Manana &lt;fdmanana@suse.com&gt;Signed-off-by: Qu Wenruo &lt;wqu@suse.com&gt;Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;

            List of files:
            /linux-6.15/fs/btrfs/compression.c</description>
        <pubDate>Thu, 27 Jun 2024 03:45:55 +0000</pubDate>
        <dc:creator>Qu Wenruo &lt;wqu@suse.com&gt;</dc:creator>
    </item>
<item>
        <title>e2877c2a - btrfs: pass a btrfs_inode to btrfs_compress_heuristic()</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/btrfs/compression.c#e2877c2a</link>
        <description>btrfs: pass a btrfs_inode to btrfs_compress_heuristic()Pass a struct btrfs_inode to btrfs_compress_heuristic() as it&apos;s aninternal interface, allowing to remove some use of BTRFS_I.Reviewed-by: Boris Burkov &lt;boris@bur.io&gt;Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;

            List of files:
            /linux-6.15/fs/btrfs/compression.c</description>
        <pubDate>Mon, 31 Jan 2022 18:16:41 +0000</pubDate>
        <dc:creator>David Sterba &lt;dsterba@suse.com&gt;</dc:creator>
    </item>
<item>
        <title>a1f4e3d7 - btrfs: switch btrfs_ordered_extent::inode to struct btrfs_inode</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/btrfs/compression.c#a1f4e3d7</link>
        <description>btrfs: switch btrfs_ordered_extent::inode to struct btrfs_inodeThe structure is internal so we should use struct btrfs_inode for that,allowing to remove some use of BTRFS_I.Reviewed-by: Boris Burkov &lt;boris@bur.io&gt;Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;

            List of files:
            /linux-6.15/fs/btrfs/compression.c</description>
        <pubDate>Mon, 31 Jan 2022 17:57:43 +0000</pubDate>
        <dc:creator>David Sterba &lt;dsterba@suse.com&gt;</dc:creator>
    </item>
</channel>
</rss>
