Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Steve French <smfrench@gmail.com>,
	"Darrick J. Wong" <darrick.wong@oracle.com>
Cc: lsf-pc@lists.linux-foundation.org, xfs <xfs@oss.sgi.com>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-ext4 <linux-ext4@vger.kernel.org>,
	linux-btrfs <linux-btrfs@vger.kernel.org>,
	ocfs2-devel@oss.oracle.com
Subject: Re: [LFS/MM TOPIC] fs reflink issues, fs online scrub/check, etc
Date: Tue, 21 Jan 2020 09:18:28 +0800	[thread overview]
Message-ID: <0089aff3-c4d3-214e-30d7-012abf70623a@gmx.com> (raw)
In-Reply-To: <CAH2r5mtM2nCicTKGFAjYtOG92TKKQdTbZxaD-_-RsWYL=Tn2Nw@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 3528 bytes --]

Didn't see the original mail, so reply here.

On 2020/1/21 上午8:58, Steve French wrote:
> Since SMB3 protocol has at least three ways to do copy offload (server
> side copy),
> the reflink topic is of interest to me and likely useful to discuss
> for Samba server as
> well as client (cifs.ko)
> 
> On Wed, Feb 10, 2016 at 1:19 PM Darrick J. Wong <darrick.wong@oracle.com> wrote:
>>
>> [resend, email exploded, sorry...]
>>
>> Hi,
>>
>> I want to discuss a few FS related topics that I haven't already seen on
>> the mailing lists:
>>
>>  * Shared pagecache pages for reflinked files (and by extension making dax
>>    work with reflink on xfs)

IIRC Goldwyn Rodrigues <rgoldwyn@suse.com> is working on this, mostly
for btrfs, but should also apply to other fses.

>>
>>  * Providing a simple interface for scrubbing filesystem metadata in the
>>    background (the online check thing).  Ideally we'd make it easy to discover
>>    what kind of metadata there is to check and provide a simple interface to
>>    check the metadata, once discovered.  This is a tricky interface topic
>>    since FS design differs pretty widely.

Although btrfs has already implemented scrub for a long time, and btrfs
is coming over the point where kernel can detects more problems than
btrfs-check, I still hesitate to call it "check the metadata".

It looks more like "extended metadata sanity verification", other than
full cross-ref check implemented in user-space tools.

Currently, btrfs (and I guess xfs too) can detect corrupted metadata by:
- checksum
  All modern fses have similar mechanism.

- internal fields checking at read time
  At least btrfs is trying to do a byte-per-byte check for each fields.
  And latest such check has killed tons of fuzzed images (I guess that's
  why a lot of such CVE/fuzzed image reporters only want to report on
  older kernels).

  But this is mostly based on the fact that btrfs on-disk fields has a
  lot of redundancy. E.g. btrfs uses bytenr, not block count, allowing
  us to detect bit flips in lower bits easily.
  So not all fs could follow this step.

  But this provides us a good centralized place to validate most tree
  blocks.

  Maybe other fs devs could share such details too?

- runtime sanity check across metadata boundaries
  This is the traditional methods.

So is that xfs online scrub just a similar thing, or a full cross-ref check?

And if so, can we find a less confusing naming for the interface first?

>>
>>  * Rudimentary online repair and rebuilding (xfs) from secondary metadata

My guess is, it's checksum and copy based.
Or just like btrfs, if checksum passes but internal checks still failed,
just try next copy?

>>
>>  * Working out the variances in the btrfs/xfs/ocfs2/nfs reflink implementations
>>    and making sure they all get test coverage

That would be great!

Thanks,
Qu

>>
>> I would also like participate in some of the proposed discussions:
>>
>>  * The ext4 summit (and whatever meeting of XFS devs may happen)
>>
>>  * Integrating existing filesystems into pmem, or hallway bofs about designing
>>    new filesystems for pmem
>>
>>  * Actually seeing the fs developers (well, everyone!) in person again :)
>>
>> --Darrick
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-01-21  1:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20160210191715.GB6339@birch.djwong.org>
2016-02-10 19:18 ` [LFS/MM TOPIC] fs reflink issues, fs online scrub/check, etc Darrick J. Wong
2020-01-21  0:58   ` Steve French
2020-01-21  1:18     ` Qu Wenruo [this message]
2020-01-21  7:35       ` [Lsf-pc] " Amir Goldstein
2020-01-21 16:18         ` Darrick J. Wong
2020-01-21 22:01           ` Matthew Wilcox
2020-01-22  0:47             ` Dan Williams
2020-01-22  8:21               ` Dave Chinner

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=0089aff3-c4d3-214e-30d7-012abf70623a@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=darrick.wong@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=ocfs2-devel@oss.oracle.com \
    --cc=smfrench@gmail.com \
    --cc=xfs@oss.sgi.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