All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
To: "dsterba@suse.cz" <dsterba@suse.cz>
Cc: Christoph Hellwig <hch@infradead.org>,
	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: Fri, 31 Jan 2020 13:43:19 +0000	[thread overview]
Message-ID: <SN4PR0401MB3598374A2D00E21C275E5ED59B070@SN4PR0401MB3598.namprd04.prod.outlook.com> (raw)
In-Reply-To: 20200130161606.GV3929@twin.jikos.cz

On 30/01/2020 17:16, David Sterba wrote:
> I'd like to remove the buffer_head interface in two steps. First remove
> the wrappers and open code the calls, so the functionality is unchanged.
> Then have another look if we can optimize that further, eg. removing the
> page cache.
> 
> We've had subtle bugs when mount/scanning ioctl/mkfs interacted and did
> not see a consistent state. See 6f60cbd3ae442cb35861bb522f388db123d42ec1
> ("btrfs: access superblock via pagecache in scan_one_device"). It's been
> a few years so I don't recall all details, but it was quite hard to
> catch. Mkfs followed by mount sometimes did not work.
> 
> So page cache is the common access point for all the parts and for now
> we rely on that. If removing is possible, I'd like to see a good
> explanation why and not such change lost in a well meant cleanup.
> 

I have a local version now, where btrfs_read_dev_one_super() uses 
read_cache_page_gfp() and btrfs_scratch_superblocks() uses 
write_one_page() offloading all the I/O to the pagecache. So far this 
works as expected.

Now when I started converting write_dev_supers() and friends I wasn't 
sure if I can/should mix up read_cache_page_gfp() and submit_bio_wait(). 
I could also convert it to write_one_page() but this way we would loose 
integrity checking for the super block.

Any advice?

  reply	other threads:[~2020-01-31 13:43 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
2020-01-30 16:16         ` David Sterba
2020-01-31 13:43           ` Johannes Thumshirn [this message]
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=SN4PR0401MB3598374A2D00E21C275E5ED59B070@SN4PR0401MB3598.namprd04.prod.outlook.com \
    --to=johannes.thumshirn@wdc.com \
    --cc=dsterba@suse.com \
    --cc=dsterba@suse.cz \
    --cc=hch@infradead.org \
    --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.