linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Kanchan Joshi <joshi.k@samsung.com>
Cc: Christoph Hellwig <hch@lst.de>,
	josef@toxicpanda.com, dsterba@suse.com, clm@fb.com,
	axboe@kernel.dk, kbusch@kernel.org, linux-btrfs@vger.kernel.org,
	linux-nvme@lists.infradead.org, linux-block@vger.kernel.org,
	gost.dev@samsung.com
Subject: Re: [RFC 0/3] Btrfs checksum offload
Date: Thu, 30 Jan 2025 13:53:06 +0100	[thread overview]
Message-ID: <20250130125306.GA19390@lst.de> (raw)
In-Reply-To: <b5fe3e15-cd7f-41ce-9ac8-70dca0fee37a@samsung.com>

On Thu, Jan 30, 2025 at 02:52:23PM +0530, Kanchan Joshi wrote:
> On 1/29/2025 9:05 PM, Christoph Hellwig wrote:
> >> This patch series: (a) adds checksum offload awareness to the
> >> block layer (patch #1),
> > I've skipped over the patches and don't understand what this offload
> > awareness concept does compared the file system simply attaching PI
> > metadata.
> 
> Difference is that FS does not have to attach any PI for offload.
> 
> Offload is about the Host doing as little as possible, and the closest 
> we get there is by setting PRACT bit.

But that doesn't actually work.  The file system needs to be able
to verify the checksum for failing over to other mirrors, repair,
etc.  Also if you trust the device to get things right you do not
need to use PI at all - SSDs or hard drives that support PI generally
use PI internally anyway, and PRACT just means you treat a format
with PI like one without.  In other words - no need for an offload
here, you might as well just trust the device if you're not doing
end to end protection.

> 
> Attaching PI is not really needed, neither for FS nor for block-layer, 
> for pure offload.
> When device has "ms == pi_size" format, we only need to send I/O with 
> PRACT set and device take care of attaching integrity buffer and 
> checksum generation/verification.
> This is abstracted as 'offload type 1' in this series.
> 
> For other format "ms > pi_size" also we set the PRACT but integrity 
> buffer also needs to be passed. This is abstracted as 'offload type 2'.
> Still offload as the checksum processing is done only by the device.
> 
> Block layer Auto-PI is a good place because all above details are common 
> and remain abstracted, while filesystems only need to decide whether 
> they want to send the flag (REQ_INTEGRITY_OFFLOAD) to use the facility.
---end quoted text---

  reply	other threads:[~2025-01-30 12:53 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20250129141039epcas5p11feb1be4124c0db3c5223325924183a3@epcas5p1.samsung.com>
2025-01-29 14:02 ` [RFC 0/3] Btrfs checksum offload Kanchan Joshi
2025-01-29 14:02   ` [RFC 1/3] block: add integrity offload Kanchan Joshi
2025-01-29 14:02   ` [RFC 2/3] nvme: support " Kanchan Joshi
2025-01-29 14:02   ` [RFC 3/3] btrfs: add checksum offload Kanchan Joshi
2025-01-29 21:27     ` Qu Wenruo
2025-01-29 14:55   ` [RFC 0/3] Btrfs " Johannes Thumshirn
2025-01-31 10:19     ` Kanchan Joshi
2025-01-31 10:29       ` Johannes Thumshirn
2025-02-03 13:25         ` Kanchan Joshi
2025-02-03 13:40           ` Johannes Thumshirn
2025-02-03 14:03             ` Kanchan Joshi
2025-02-03 14:41               ` Johannes Thumshirn
2025-01-29 15:28   ` Keith Busch
2025-01-29 15:40     ` Christoph Hellwig
2025-01-29 18:03       ` Keith Busch
2025-01-30 12:54         ` Christoph Hellwig
2025-01-29 15:35   ` Christoph Hellwig
2025-01-30  9:22     ` Kanchan Joshi
2025-01-30 12:53       ` Christoph Hellwig [this message]
2025-01-31 10:29         ` Kanchan Joshi
2025-01-31 10:42           ` Christoph Hellwig
2025-01-29 15:55   ` Mark Harmstone
2025-01-29 19:02   ` Goffredo Baroncelli
2025-01-30  9:33     ` Daniel Vacek
2025-01-30 20:21   ` Martin K. Petersen
2025-01-31  7:44     ` Christoph Hellwig
2025-02-03 19:31       ` Martin K. Petersen
2025-02-04  5:12         ` Christoph Hellwig
2025-02-04 12:52           ` Martin K. Petersen
2025-02-04 13:49             ` Christoph Hellwig
2025-02-05  2:31               ` Martin K. Petersen
2025-02-03 13:24     ` Kanchan Joshi

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=20250130125306.GA19390@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=gost.dev@samsung.com \
    --cc=josef@toxicpanda.com \
    --cc=joshi.k@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    /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).