Linux-BTRFS Archive on lore.kernel.org
 help / color / Atom feed
From: Filipe Manana <fdmanana@gmail.com>
To: dsterba@suse.cz, Josef Bacik <josef@toxicpanda.com>,
	linux-btrfs <linux-btrfs@vger.kernel.org>,
	kernel-team@fb.com
Subject: Re: [PATCH 2/5] btrfs: introduce the inode->file_extent_tree
Date: Tue, 7 Jan 2020 16:45:28 +0000
Message-ID: <CAL3q7H7oS_9vy9SAAhmscjvxzb4XMUwNcQq8aRWvZqApBF2rrw@mail.gmail.com> (raw)
In-Reply-To: <20200107161749.GA3929@twin.jikos.cz>

On Tue, Jan 7, 2020 at 4:18 PM David Sterba <dsterba@suse.cz> wrote:
>
> On Mon, Jan 06, 2020 at 02:29:01PM -0500, Josef Bacik wrote:
> > On 1/6/20 12:22 PM, David Sterba wrote:
> > > On Mon, Dec 30, 2019 at 04:31:15PM -0500, Josef Bacik wrote:
> > >> @@ -60,6 +60,11 @@ struct btrfs_inode {
> > >>     */
> > >>    struct extent_io_tree io_failure_tree;
> > >>
> > >> +  /* keeps track of where we have extent items mapped in order to make
> > >> +   * sure our i_size adjustments are accurate.
> > >> +   */
> > >> +  struct extent_io_tree file_extent_tree;
> > >
> > > This is not exactly lightweight and cut to the minimum needed, the size
> > > is 40 bytes and contains struct members that are unused. At least the
> > > file extents tree seems to be in use unlike that io_failure_tree wasting
> > > the bytes almost 100% of time.
> > >
> >
> > I'm not in love with it either, but I don't want to invent some lighter weight
> > range thingy that I'm going to end up messing up in other ways.
>
> Yeah, the extent_io_tree is now being used for generic range tree, some
> cleanups could remove the members that were added for the first specific
> use (like the dirty_bytes, or track_updates). For correctness of NOHOLES
> the inode size increase shouldn't be a blocker but needs to be addressed
> later.

Hum?
This isn't about the NO_HOLES case, it's about unordered i_size update
which can often lead to missing extent items for a file - when using
NO_HOLES fsck simply doesn't report any issue, but when not using it,
it does report about missing extents.

>
> > Don't take this series yet, there's still something fishy going on that I have
> > to figure out.  Thanks,
>
> Ok.



-- 
Filipe David Manana,

“Whether you think you can, or you think you can't — you're right.”

  reply index

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-30 21:31 [RFC][PATCH 0/5] btrfs: fix hole corruption issue with !NO_HOLES Josef Bacik
2019-12-30 21:31 ` [PATCH 1/5] btrfs: use btrfs_ordered_update_i_size in clone_finish_inode_update Josef Bacik
2019-12-30 21:31 ` [PATCH 2/5] btrfs: introduce the inode->file_extent_tree Josef Bacik
2020-01-06 17:22   ` David Sterba
2020-01-06 19:29     ` Josef Bacik
2020-01-07 16:17       ` David Sterba
2020-01-07 16:45         ` Filipe Manana [this message]
2020-01-07 16:46   ` David Sterba
2019-12-30 21:31 ` [PATCH 3/5] btrfs: use the file extent tree infrastructure Josef Bacik
2019-12-30 21:31 ` [PATCH 4/5] btrfs: replace all uses of btrfs_ordered_update_i_size Josef Bacik
2019-12-30 21:31 ` [PATCH 5/5] btrfs: delete the ordered isize update code Josef Bacik
2019-12-31 12:25 ` [RFC][PATCH 0/5] btrfs: fix hole corruption issue with !NO_HOLES Qu Wenruo
2020-01-02 16:10   ` Josef Bacik
2020-01-07 19:42 [PATCH 0/5][v2] " Josef Bacik
2020-01-07 19:42 ` [PATCH 2/5] btrfs: introduce the inode->file_extent_tree Josef Bacik
2020-01-15 17:10   ` Filipe Manana

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=CAL3q7H7oS_9vy9SAAhmscjvxzb4XMUwNcQq8aRWvZqApBF2rrw@mail.gmail.com \
    --to=fdmanana@gmail.com \
    --cc=dsterba@suse.cz \
    --cc=josef@toxicpanda.com \
    --cc=kernel-team@fb.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

Linux-BTRFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-btrfs/0 linux-btrfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-btrfs linux-btrfs/ https://lore.kernel.org/linux-btrfs \
		linux-btrfs@vger.kernel.org
	public-inbox-index linux-btrfs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-btrfs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git