public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: Goldwyn Rodrigues <rgoldwyn@suse.de>, linux-btrfs@vger.kernel.org
Cc: Dave Sterba <DSterba@suse.com>
Subject: Re: [PATCH] btrfs: Remove unnecessary inode_need_compress() check
Date: Fri, 29 Apr 2022 17:45:58 +0300	[thread overview]
Message-ID: <be21d358-754a-3db4-df45-561258f47af4@suse.com> (raw)
In-Reply-To: <20220429144147.xhfiqj27whufoyvt@fiona>



On 29.04.22 г. 17:41 ч., Goldwyn Rodrigues wrote:
> Apparently, BTRFS_INODE_NOCOMPRESS can change runtime, so this patch is
> incorrect. Sorry.
> 

Yes, when doing writes on compressed-enabled filesystem if a particular 
file gets bad compression ratio that flag is getting set from 
compress_file_range:


   /* flag the file so we don't compress in the future */
      32                 if (!btrfs_test_opt(fs_info, FORCE_COMPRESS) && 

      31                     !(BTRFS_I(inode)->prop_compress)) { 

      30                         BTRFS_I(inode)->flags |= 
BTRFS_INODE_NOCOMPRESS;
      29                 }

      reply	other threads:[~2022-04-29 14:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 20:07 [PATCH] btrfs: Remove unnecessary inode_need_compress() check Goldwyn Rodrigues
2022-04-29 14:41 ` Goldwyn Rodrigues
2022-04-29 14:45   ` Nikolay Borisov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=be21d358-754a-3db4-df45-561258f47af4@suse.com \
    --to=nborisov@suse.com \
    --cc=DSterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=rgoldwyn@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox