linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: Johannes Thumshirn <jth@kernel.org>
Cc: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [RFC 0/2] Add dummy RAID stripe tree entries for PREALLOC data
Date: Mon, 23 Sep 2024 11:27:05 -0400	[thread overview]
Message-ID: <20240923152705.GB159452@perftesting> (raw)
In-Reply-To: <20240918140850.27261-1-jth@kernel.org>

On Wed, Sep 18, 2024 at 04:08:48PM +0200, Johannes Thumshirn wrote:
> This is an RFC implementation of Qu's request to be able to
> distinguish preallocated extents in the stripe tree for scrub.
> 
> It's not 100% working yet but only showing the basic "how it's going to
> look like".
> 
> I'm not really sure this is a better solution than returning ENOENT
> and ignoring it in scrub.
> 
> A third possibility would be to do a full backref walk on
> btrfs_map_block() error and then check if it's a preallocated extent.
> 
> Johannes Thumshirn (2):
>   btrfs: introduce dummy RAID stripes for preallocated data
>   btrfs: insert dummy RAID stripe extents for preallocated data
> 

I don't like this approach, I'd rather have a RST represent actually written
bytes on disk rather than adding entries to work around this particular case.

I think that -ENOENT from btrfs_map_block() is liable to result in weird
problems wif we return -ENOENT for other operations.  I think that you change it
to return -ENODATA so that we can for sure trace it back to RST, and use that to
indicate that we need to skip that extent.  This way we have something that is
unique to RST, and we don't have all these other entries that are unrelated to
the RST's job.  Thanks,

Josef

      parent reply	other threads:[~2024-09-23 15:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-12 14:33 [PATCH] btrfs: scrub: skip PREALLOC extents on RAID stripe-tree Johannes Thumshirn
2024-09-12 21:32 ` Qu Wenruo
2024-09-13  5:42   ` Johannes Thumshirn
2024-09-13  5:47     ` Qu Wenruo
2024-09-18 14:08       ` [RFC 0/2] Add dummy RAID stripe tree entries for PREALLOC data Johannes Thumshirn
2024-09-18 14:08         ` [RFC 1/2] btrfs: introduce dummy RAID stripes for preallocated data Johannes Thumshirn
2024-09-18 14:08         ` [RFC 2/2] btrfs: insert dummy RAID stripe extents " Johannes Thumshirn
2024-09-18 23:45         ` [RFC 0/2] Add dummy RAID stripe tree entries for PREALLOC data Qu Wenruo
2024-09-19 15:42           ` Johannes Thumshirn
2024-09-19 16:57         ` Gerhard Wiesinger
2024-09-20  9:50           ` Johannes Thumshirn
2024-09-23 15:27         ` Josef Bacik [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=20240923152705.GB159452@perftesting \
    --to=josef@toxicpanda.com \
    --cc=jth@kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.com \
    /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;
as well as URLs for NNTP newsgroup(s).