ocfs2-devel.oss.oracle.com archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Cc: shaggy@kernel.org, jfs-discussion@lists.sourceforge.net,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Mike Snitzer <snitzer@redhat.com>, Takashi Iwai <tiwai@suse.de>,
	djwong@kernel.org, linux-nvme <linux-nvme@lists.infradead.org>,
	Philipp Reisner <philipp.reisner@linbit.com>,
	Linux Memory Management List <linux-mm@kvack.org>,
	dm-devel@redhat.com, target-devel@vger.kernel.org,
	Pavel Machek <pavel@ucw.cz>,
	Alex Shi <alex.shi@linux.alibaba.com>,
	Alasdair Kergon <agk@redhat.com>,
	drbd-dev@lists.linbit.com, naohiro.aota@wdc.com,
	linux-nilfs@vger.kernel.org, Sagi Grimberg <sagi@grimberg.me>,
	"open list:TARGET SUBSYSTEM" <linux-scsi@vger.kernel.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	osandov@fb.com, Eric Biggers <ebiggers@kernel.org>,
	xen-devel@lists.xenproject.org, ngupta@vflare.org,
	Len Brown <len.brown@intel.com>,
	Linux PM <linux-pm@vger.kernel.org>,
	Hannes Reinecke <hare@suse.de>, Ming Lei <ming.lei@redhat.com>,
	linux-block@vger.kernel.org, Tejun Heo <tj@kernel.org>,
	linux-fscrypt@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>,
	jefflexu@linux.alibaba.com, jaegeuk@kernel.org,
	konishi.ryusuke@gmail.com, Bart Van Assche <bvanassche@acm.org>,
	Jens Axboe <axboe@kernel.dk>,
	damien.lemoal@wdc.com, Ted Ts'o <tytso@mit.edu>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-xfs@vger.kernel.org, Minchan Kim <minchan@kernel.org>,
	linux-fsdevel@vger.kernel.org,
	Lars Ellenberg <lars.ellenberg@linbit.com>,
	jth@kernel.org, asml.silence@gmail.com,
	ocfs2-devel@oss.oracle.com, roger.pau@citrix.com
Subject: Re: [Ocfs2-devel] [RFC PATCH 29/34] power/swap: use bio_new in hib_submit_io
Date: Thu, 28 Jan 2021 11:21:36 +0100	[thread overview]
Message-ID: <CAJZ5v0h01e4LgV0c5FxLorcc6iFW2LVzC=hJcd7LNAJ6D0E8jg@mail.gmail.com> (raw)
In-Reply-To: <20210128071133.60335-30-chaitanya.kulkarni@wdc.com>

On Thu, Jan 28, 2021 at 8:21 AM Chaitanya Kulkarni
<chaitanya.kulkarni@wdc.com> wrote:
>

Please explain in the changelog why making this change is a good idea.

> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
> ---
>  kernel/power/swap.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/power/swap.c b/kernel/power/swap.c
> index c73f2e295167..e92e36c053a6 100644
> --- a/kernel/power/swap.c
> +++ b/kernel/power/swap.c
> @@ -271,13 +271,12 @@ static int hib_submit_io(int op, int op_flags, pgoff_t page_off, void *addr,
>                 struct hib_bio_batch *hb)
>  {
>         struct page *page = virt_to_page(addr);
> +       sector_t sect = page_off * (PAGE_SIZE >> 9);
>         struct bio *bio;
>         int error = 0;
>
> -       bio = bio_alloc(GFP_NOIO | __GFP_HIGH, 1);
> -       bio->bi_iter.bi_sector = page_off * (PAGE_SIZE >> 9);
> -       bio_set_dev(bio, hib_resume_bdev);
> -       bio_set_op_attrs(bio, op, op_flags);
> +       bio = bio_new(hib_resume_bdev, sect, op, op_flags, 1,
> +                     GFP_NOIO | __GFP_HIGH);
>
>         if (bio_add_page(bio, page, PAGE_SIZE, 0) < PAGE_SIZE) {
>                 pr_err("Adding page to bio failed at %llu\n",
> --
> 2.22.1
>

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

  reply	other threads:[~2021-01-28 16:28 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-28  7:10 [Ocfs2-devel] [RFC PATCH 00/34] block: introduce bio_new() Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 01/34] block: move common code into blk_next_bio() Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 02/34] block: introduce and use bio_new Chaitanya Kulkarni
2021-01-28  7:21   ` Damien Le Moal
2021-01-28  7:27     ` Damien Le Moal
2021-01-28  8:34       ` Chaitanya Kulkarni
2021-01-28  8:33     ` Chaitanya Kulkarni
2021-01-28 16:47       ` Matthew Wilcox
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 03/34] drdb: use bio_new in drdb Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 04/34] drdb: use bio_new() in submit_one_flush Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 05/34] xen-blkback: use bio_new Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 06/34] zram: " Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 07/34] dm: use bio_new in dm-log-writes Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 08/34] dm-zoned: use bio_new in get_mblock_slow Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 09/34] dm-zoned: use bio_new in dmz_write_mblock Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 10/34] dm-zoned: use bio_new in dmz_rdwr_block Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 11/34] nvmet: use bio_new in nvmet_bdev_execute_rw Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 12/34] scsi: target/iblock: use bio_new Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 13/34] block: use bio_new in __blkdev_direct_IO Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 14/34] fs/buffer: use bio_new in submit_bh_wbc Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 15/34] fscrypt: use bio_new in fscrypt_zeroout_range Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 16/34] fs/direct-io: use bio_new in dio_bio_alloc Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 17/34] iomap: use bio_new in iomap_dio_zero Chaitanya Kulkarni
2021-01-28 16:59   ` Darrick J. Wong
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 18/34] iomap: use bio_new in iomap_dio_bio_actor Chaitanya Kulkarni
2021-01-28 17:24   ` Darrick J. Wong
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 19/34] fs/jfs/jfs_logmgr.c: use bio_new in lbmRead Chaitanya Kulkarni
2021-01-28 12:43   ` Dave Kleikamp
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 20/34] fs/jfs/jfs_logmgr.c: use bio_new in lbmStartIO Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 21/34] fs/jfs/jfs_metapage.c: use bio_new in metapage_writepage Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 22/34] fs/jfs/jfs_metapage.c: use bio_new in metapage_readpage Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 23/34] fs/mpage.c: use bio_new mpage_alloc Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 24/34] fs/nilfs: use bio_new nilfs_alloc_seg_bio Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 25/34] ocfs/cluster: use bio_new in dm-log-writes Chaitanya Kulkarni
2021-01-28 12:13   ` Joseph Qi
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 26/34] xfs: use bio_new in xfs_rw_bdev Chaitanya Kulkarni
2021-01-28 17:21   ` Darrick J. Wong
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 27/34] xfs: use bio_new in xfs_buf_ioapply_map Chaitanya Kulkarni
2021-01-28 17:21   ` Darrick J. Wong
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 28/34] zonefs: use bio_new Chaitanya Kulkarni
2021-01-28  7:25   ` Damien Le Moal
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 29/34] power/swap: use bio_new in hib_submit_io Chaitanya Kulkarni
2021-01-28 10:21   ` Rafael J. Wysocki [this message]
2021-02-17 22:02   ` Pavel Machek
2021-02-18  1:28     ` Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 30/34] hfsplus: use bio_new in hfsplus_submit_bio() Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 31/34] iomap: use bio_new in iomap_readpage_actor Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 32/34] mm: use bio_new in __swap_writepage Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 33/34] mm: use bio_new in swap_readpage Chaitanya Kulkarni
2021-01-28  7:11 ` [Ocfs2-devel] [RFC PATCH 34/34] mm: add swap_bio_new common bio helper Chaitanya Kulkarni

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='CAJZ5v0h01e4LgV0c5FxLorcc6iFW2LVzC=hJcd7LNAJ6D0E8jg@mail.gmail.com' \
    --to=rafael@kernel.org \
    --cc=agk@redhat.com \
    --cc=alex.shi@linux.alibaba.com \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=chaitanya.kulkarni@wdc.com \
    --cc=damien.lemoal@wdc.com \
    --cc=djwong@kernel.org \
    --cc=dm-devel@redhat.com \
    --cc=drbd-dev@lists.linbit.com \
    --cc=ebiggers@kernel.org \
    --cc=gustavoars@kernel.org \
    --cc=hare@suse.de \
    --cc=jaegeuk@kernel.org \
    --cc=jefflexu@linux.alibaba.com \
    --cc=jfs-discussion@lists.sourceforge.net \
    --cc=jth@kernel.org \
    --cc=konishi.ryusuke@gmail.com \
    --cc=konrad.wilk@oracle.com \
    --cc=lars.ellenberg@linbit.com \
    --cc=len.brown@intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fscrypt@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nilfs@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=minchan@kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=naohiro.aota@wdc.com \
    --cc=ngupta@vflare.org \
    --cc=ocfs2-devel@oss.oracle.com \
    --cc=osandov@fb.com \
    --cc=pavel@ucw.cz \
    --cc=philipp.reisner@linbit.com \
    --cc=rjw@rjwysocki.net \
    --cc=roger.pau@citrix.com \
    --cc=sagi@grimberg.me \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=shaggy@kernel.org \
    --cc=snitzer@redhat.com \
    --cc=target-devel@vger.kernel.org \
    --cc=tiwai@suse.de \
    --cc=tj@kernel.org \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    --cc=xen-devel@lists.xenproject.org \
    --subject='Re: [Ocfs2-devel] [RFC PATCH 29/34] power/swap: use bio_new in hib_submit_io' \
    /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

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).