[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220301142209.GN12643@suse.cz>
Date: Tue, 1 Mar 2022 15:22:09 +0100
From: David Sterba <dsterba@...e.cz>
To: Christoph Hellwig <hch@....de>
Cc: Jens Axboe <axboe@...nel.dk>, Coly Li <colyli@...e.de>,
Mike Snitzer <snitzer@...hat.com>, Song Liu <song@...nel.org>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>,
Phillip Lougher <phillip@...ashfs.org.uk>,
linux-block@...r.kernel.org, dm-devel@...hat.com,
linux-kernel@...r.kernel.org, linux-bcache@...r.kernel.org,
linux-raid@...r.kernel.org, target-devel@...r.kernel.org,
linux-btrfs@...r.kernel.org
Subject: Re: [PATCH 1/5] btrfs: simplify ->flush_bio handling
On Tue, Mar 01, 2022 at 10:45:48AM +0200, Christoph Hellwig wrote:
> @@ -6962,16 +6961,6 @@ struct btrfs_device *btrfs_alloc_device(struct btrfs_fs_info *fs_info,
> if (!dev)
> return ERR_PTR(-ENOMEM);
>
> - /*
> - * Preallocate a bio that's always going to be used for flushing device
> - * barriers and matches the device lifespan
> - */
> - dev->flush_bio = bio_kmalloc(GFP_KERNEL, 0);
> - if (!dev->flush_bio) {
> - kfree(dev);
> - return ERR_PTR(-ENOMEM);
> - }
> -
> INIT_LIST_HEAD(&dev->dev_list);
> INIT_LIST_HEAD(&dev->dev_alloc_list);
> INIT_LIST_HEAD(&dev->post_commit_list);
> diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
> index 005c9e2a491a1..9af7b6211920c 100644
> --- a/fs/btrfs/volumes.h
> +++ b/fs/btrfs/volumes.h
> @@ -117,7 +117,7 @@ struct btrfs_device {
> u64 commit_bytes_used;
>
> /* for sending down flush barriers */
> - struct bio *flush_bio;
Please add this comment to the struct member declaration:
/* Bio used for flushing device barriers */
> + struct bio flush_bio;
Otherwise
Reviewed-by: David Sterba <dsterba@...e.com>
Thanks.
Powered by blists - more mailing lists