public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Anand Jain <anand.jain@oracle.com>
Cc: David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: allocate btrfs_inode::file_extent_tree only without NO_HOLES
Date: Wed, 29 Nov 2023 12:54:06 +0100	[thread overview]
Message-ID: <20231129115406.GO18929@twin.jikos.cz> (raw)
In-Reply-To: <35b15f56-c687-d68e-a0f3-aba8445c8ed7@oracle.com>

On Wed, Nov 29, 2023 at 05:21:44PM +0800, Anand Jain wrote:
> On 29/11/2023 05:23, David Sterba wrote:
> > The file_extent_tree was added in 41a2ee75aab0 ("btrfs: introduce
> > per-inode file extent tree") so we have an explicit mapping of the file
> > extents to know where it is safe to update i_size. When the feature
> > NO_HOLES is enabled, and it's been a mkfs default since 5.15, the tree
> > is not necessary.
> > 
> > To save some space in the inode, allocate the tree only when necessary.
> 
>    I don't see how the free is taken care? Does it memleak?

Yes, there's kfree call missing in btrfs_free_inode(), thanks.

      reply	other threads:[~2023-11-29 12:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-28 21:23 [PATCH] btrfs: allocate btrfs_inode::file_extent_tree only without NO_HOLES David Sterba
2023-11-29  9:21 ` Anand Jain
2023-11-29 11:54   ` David Sterba [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=20231129115406.GO18929@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=anand.jain@oracle.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