public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Cc: David Sterba <dsterba@suse.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 1/2] btrfs: use page alloc/free wrapeprs for compression pages
Date: Thu, 16 Nov 2023 20:50:45 +0100	[thread overview]
Message-ID: <20231116195045.GJ11264@twin.jikos.cz> (raw)
In-Reply-To: <724779b3-c542-4f9f-842c-cebc8a445843@wdc.com>

On Thu, Nov 16, 2023 at 09:15:57AM +0000, Johannes Thumshirn wrote:
> On 15.11.23 18:06, David Sterba wrote:
> > +void btrfs_free_compr_page(struct page *page)
> > +{
> > +	ASSERT(page_ref_count(page) == 1);
> > +	put_page(page);
> 
> Out of curiosity, why the ASSERT()?

To verify that it's the last reference and put_page is going to free it
, so we don't put an actually used page into the cache.

  reply	other threads:[~2023-11-16 19:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-15 16:59 [PATCH 0/2] Pool for compression pages David Sterba
2023-11-15 16:59 ` [PATCH 1/2] btrfs: use page alloc/free wrapeprs " David Sterba
2023-11-16  9:15   ` Johannes Thumshirn
2023-11-16 19:50     ` David Sterba [this message]
2023-11-15 16:59 ` [PATCH 2/2] btrfs: use shrinker for compression page pool David Sterba
2023-11-20 17:05 ` [PATCH 0/2] Pool for compression pages Josef Bacik

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=20231116195045.GJ11264@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=Johannes.Thumshirn@wdc.com \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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