All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	"dsterba@suse.cz" <dsterba@suse.cz>,
	David Sterba <dsterba@suse.com>,
	Nikolay Borisov <nborisov@suse.com>,
	"linux-btrfs @ vger . kernel . org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH v3 0/5] btrfs: remove buffer heads form superblock handling
Date: Thu, 30 Jan 2020 08:15:19 -0800	[thread overview]
Message-ID: <20200130161519.GA15541@infradead.org> (raw)
In-Reply-To: <DM5PR0401MB3591C0E5FE103FF1142005099B040@DM5PR0401MB3591.namprd04.prod.outlook.com>

On Thu, Jan 30, 2020 at 04:09:45PM +0000, Johannes Thumshirn wrote:
> > alloc_page - you should be able to use the already cached superblock
> > as the destination and source of I/O, assuming they are properly aligned
> > (and if not that could be fixed easily).
> > 
> 
> Care to elaborate? Who would have cached the superblock, when we haven't 
> mounted the FS yet.

You use one allocation, which then gets owned by the in-memory suprblock
once probed.  No need to allocate memory again to write it out.

> 
> So here's the answer from that thread:
> 
> "IIRC we had some funny bugs when mount and device scan (udev) raced 
> just after mkfs, the page cache must be used so there's no way to read 
> stale data."
> https://lore.kernel.org/linux-btrfs/20200117151352.GK3929@twin.jikos.cz/

Well, XFS has not used the page cache for any metadata since 2011, and
we've not run into those problems.  But then again XFS doesn't use
the page cache for mkfs, does btrfs?

  reply	other threads:[~2020-01-30 16:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-27 15:59 [PATCH v3 0/5] btrfs: remove buffer heads form superblock handling Johannes Thumshirn
2020-01-27 15:59 ` [PATCH v3 1/5] btrfs: remove buffer heads from super block reading Johannes Thumshirn
2020-01-28 11:47   ` Christoph Hellwig
2020-01-30 10:12     ` Johannes Thumshirn
2020-01-27 15:59 ` [PATCH v3 2/5] btrfs: remove use of buffer_heads from superblock writeout Johannes Thumshirn
2020-01-28 11:52   ` Christoph Hellwig
2020-01-27 15:59 ` [PATCH v3 3/5] btrfs: remove btrfsic_submit_bh() Johannes Thumshirn
2020-01-27 15:59 ` [PATCH v3 4/5] btrfs: remove buffer_heads from btrfsic_process_written_block() Johannes Thumshirn
2020-01-27 15:59 ` [PATCH v3 5/5] btrfs: remove buffer_heads form superblock mirror integrity checking Johannes Thumshirn
2020-01-29 14:25 ` [PATCH v3 0/5] btrfs: remove buffer heads form superblock handling David Sterba
2020-01-30 11:23   ` Johannes Thumshirn
2020-01-30 12:15     ` David Sterba
2020-01-30 13:39       ` Christoph Hellwig
2020-01-30 15:53         ` Johannes Thumshirn
2020-01-30 15:56           ` Christoph Hellwig
2020-01-30 16:09             ` Johannes Thumshirn
2020-01-30 16:15               ` Christoph Hellwig [this message]
2020-01-30 16:16         ` David Sterba
2020-01-31 13:43           ` Johannes Thumshirn
2020-02-03  8:29             ` Christoph Hellwig

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=20200130161519.GA15541@infradead.org \
    --to=hch@infradead.org \
    --cc=Johannes.Thumshirn@wdc.com \
    --cc=dsterba@suse.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nborisov@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.