linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org, linux-block@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
	Christoph Hellwig <hch@lst.de>,
	Daejun Park <daejun7.park@samsung.com>,
	Kanchan Joshi <joshi.k@samsung.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>
Subject: Re: [PATCH v7 05/19] block, fs: Restore the per-bio/request data lifetime fields
Date: Tue, 19 Dec 2023 07:50:15 +1100	[thread overview]
Message-ID: <ZYCwh7RJ4EpXD+7X@dread.disaster.area> (raw)
In-Reply-To: <20231218185705.2002516-6-bvanassche@acm.org>

On Mon, Dec 18, 2023 at 10:56:28AM -0800, Bart Van Assche wrote:
> Restore support for passing data lifetime information from filesystems to
> block drivers. This patch reverts commit b179c98f7697 ("block: Remove
> request.write_hint") and commit c75e707fe1aa ("block: remove the
> per-bio/request write hint").
> 
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>

...

> diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
> index bcd3f8cf5ea4..97e20911b45f 100644
> --- a/fs/iomap/direct-io.c
> +++ b/fs/iomap/direct-io.c
> @@ -380,6 +380,8 @@ static loff_t iomap_dio_bio_iter(const struct iomap_iter *iter,
>  		fscrypt_set_bio_crypt_ctx(bio, inode, pos >> inode->i_blkbits,
>  					  GFP_KERNEL);
>  		bio->bi_iter.bi_sector = iomap_sector(iomap, pos);
> +		bio->bi_write_hint =
> +			file_inode(dio->iocb->ki_filp)->i_write_hint;

We already have an inode pointer in this function (from
iter->inode), so:

		bio->bi_write_hint = inode->i_write_hint;

-Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2023-12-18 20:50 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-18 18:56 [PATCH v7 00/19] Pass data lifetime information to SCSI disk devices Bart Van Assche
2023-12-18 18:56 ` [PATCH v7 01/19] fs: Fix rw_hint validation Bart Van Assche
2023-12-18 18:56 ` [PATCH v7 02/19] fs: Verify write lifetime constants at compile time Bart Van Assche
2023-12-18 18:56 ` [PATCH v7 03/19] fs: Split fcntl_rw_hint() Bart Van Assche
2023-12-18 18:56 ` [PATCH v7 04/19] fs: Move enum rw_hint into a new header file Bart Van Assche
2023-12-18 18:56 ` [PATCH v7 05/19] block, fs: Restore the per-bio/request data lifetime fields Bart Van Assche
2023-12-18 20:50   ` Dave Chinner [this message]
2023-12-18 18:56 ` [PATCH v7 06/19] block, fs: Propagate write hints to the block device inode Bart Van Assche
2023-12-18 18:56 ` [PATCH v7 07/19] fs/f2fs: Restore the whint_mode mount option Bart Van Assche
2023-12-18 18:56 ` [PATCH v7 08/19] fs/f2fs: Restore support for tracing data lifetimes Bart Van Assche
2023-12-18 18:56 ` [PATCH v7 09/19] scsi: core: Query the Block Limits Extension VPD page Bart Van Assche
2023-12-18 18:56 ` [PATCH v7 10/19] scsi: scsi_proto: Add structures and constants related to I/O groups and streams Bart Van Assche
2023-12-18 18:56 ` [PATCH v7 11/19] scsi: sd: Translate data lifetime information Bart Van Assche
2023-12-18 18:56 ` [PATCH v7 12/19] scsi: scsi_debug: Reduce code duplication Bart Van Assche
2023-12-18 18:56 ` [PATCH v7 13/19] scsi: scsi_debug: Support the block limits extension VPD page Bart Van Assche
2023-12-18 18:56 ` [PATCH v7 14/19] scsi: scsi_debug: Rework page code error handling Bart Van Assche
2023-12-18 18:56 ` [PATCH v7 15/19] scsi: scsi_debug: Rework subpage " Bart Van Assche
2023-12-18 18:56 ` [PATCH v7 16/19] scsi: scsi_debug: Allocate the MODE SENSE response from the heap Bart Van Assche
2023-12-18 18:56 ` [PATCH v7 17/19] scsi: scsi_debug: Implement the IO Advice Hints Grouping mode page Bart Van Assche
2023-12-18 18:56 ` [PATCH v7 18/19] scsi: scsi_debug: Implement GET STREAM STATUS Bart Van Assche
2023-12-18 18:56 ` [PATCH v7 19/19] scsi: scsi_debug: Maintain write statistics per group number Bart Van Assche
2023-12-18 23:08 ` [PATCH v7 00/19] Pass data lifetime information to SCSI disk devices Douglas Gilbert
2023-12-18 23:29   ` Bart Van Assche

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=ZYCwh7RJ4EpXD+7X@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=bvanassche@acm.org \
    --cc=daejun7.park@samsung.com \
    --cc=hch@lst.de \
    --cc=joshi.k@samsung.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=viro@zeniv.linux.org.uk \
    /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).