From: David Sterba <dsterba@suse.cz>
To: Nikolay Borisov <nborisov@suse.com>
Cc: David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 2/5] btrfs: get bdev from latest_dev for dio bh_result
Date: Fri, 11 Oct 2019 20:26:42 +0200 [thread overview]
Message-ID: <20191011182642.GH2751@twin.jikos.cz> (raw)
In-Reply-To: <a5312091-5ded-01af-19e5-f87d21de165f@suse.com>
On Wed, Oct 09, 2019 at 01:42:00PM +0300, Nikolay Borisov wrote:
>
>
> On 7.10.19 г. 22:37 ч., David Sterba wrote:
> > To remove use of extent_map::bdev we need to find a replacement, and the
> > latest_bdev is the only one we can use here, because inode::i_bdev and
> > superblock::s_bdev are NULL.
> >
> > The only thing that DIO code uses from the bdev is the blocksize to
> > perform alignment checks in do_blockdev_direct_IO, but we do them in
> > btrfs code before any call to DIO. We can't pass NULL because there are
>
> nit: This is not entirely correct. In fact map_bh in
> do_blockdev_direct_IO gets filled in :
>
> do_direct_IO
> get_more_blocks
> sdio->get_block() <-- this is btrfs_get_blocks_direct
>
> Subsequently the map_bh->b_dev member is used in
> clean_bdev_aliases and dio_new_bio to set the bio's bdev to that of the
> buffer_head. However, because we have provided a submit function
> dio_bio_submit calls our submission function and ignores the bdev.
You're right, and actually I got crashes in clean_bdev_aliases when I
supplied a NULL bdev, so I'll add it to the changelog. Thanks.
next prev parent reply other threads:[~2019-10-11 18:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-07 19:37 [PATCH 0/5] Remove extent_map::bdev David Sterba
2019-10-07 19:37 ` [PATCH 1/5] btrfs: assert extent_map bdevs and lookup_map and split David Sterba
2019-10-07 19:37 ` [PATCH 2/5] btrfs: get bdev from latest_dev for dio bh_result David Sterba
2019-10-09 10:42 ` Nikolay Borisov
2019-10-11 18:26 ` David Sterba [this message]
2019-10-11 18:54 ` David Sterba
2019-10-07 19:37 ` [PATCH 3/5] btrfs: drop bio_set_dev where not needed David Sterba
2019-10-07 19:37 ` [PATCH 4/5] btrfs: remove extent_map::bdev David Sterba
2019-10-07 19:37 ` [PATCH 5/5] btrfs: drop bdev argument from submit_extent_page David Sterba
2019-10-22 14:00 ` [PATCH 0/5] Remove extent_map::bdev David Sterba
2019-11-18 15:41 ` Josef Bacik
2019-11-18 15:49 ` David Sterba
2019-11-18 21:57 ` David Sterba
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=20191011182642.GH2751@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=dsterba@suse.com \
--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 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).