public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Chuck Lever via Lsf-pc <lsf-pc@lists.linux-foundation.org>
Cc: Theodore Ts'o <tytso@mit.edu>,
	Chuck Lever <chuck.lever@oracle.com>,
	Christoph Hellwig <hch@infradead.org>,
	Dave Chinner <david@fromorbit.com>,
	Anna Schumaker <anna.schumaker@oracle.com>,
	linux-fsdevel@vger.kernel.org,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [Lsf-pc] [LSF/MM/BPF TOPIC] Implementing the NFS v4.2 WRITE_SAME operation: VFS or NFS ioctl() ?
Date: Thu, 16 Jan 2025 16:54:16 -0500	[thread overview]
Message-ID: <yq1cygmzc2j.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <5fdc7575-aa3d-4b37-9848-77ecf8f0b7d6@oracle.com> (Chuck Lever via Lsf-pc's message of "Thu, 16 Jan 2025 10:45:01 -0500")


Hi Chuck!

> The purpose of WRITE_SAME is to demark the database blocks with
> sentinels on each end of the database block containing a time
> stamp or hash.

SCSI WRITE SAME writes a contiguous range of logical blocks. Each block
will be filled with the contents of the single logical block data buffer
provided as payload.

So with SCSI WRITE SAME it's not possible to write a 512-byte sentinel,
followed by 15KB of zeroes, followed by a 512-byte sentinel in a single
operation. You'd have to do a 16KB WRITE SAME with a zeroed payload
followed by a two individual WRITEs for the sentinels. Or fill the
entire 16KB application block with the same repeating 512-byte pattern.

I'm not familiar with NFS v4.2 WRITE SAME. But it sounds like it allows
the application to define a block larger than the logical block size of
the underlying storage. Is that correct?

If so, there would not be a direct mapping between NFS WRITE SAME and
SCSI ditto. As Christoph pointed out, NVMe doesn't have WRITE SAME. And
we removed support in the block layer a while back.

That doesn't prevent implementing WRITE SAME capability in NFS, of
course. It just sounds like the NFS semantics are different enough that
aligning to SCSI is not applicable.

-- 
Martin K. Petersen	Oracle Linux Engineering

  parent reply	other threads:[~2025-01-16 21:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-14 21:38 [LSF/MM/BPF TOPIC] Implementing the NFS v4.2 WRITE_SAME operation: VFS or NFS ioctl() ? Anna Schumaker
2025-01-14 23:14 ` Dave Chinner
2025-01-16  5:42   ` Christoph Hellwig
2025-01-16 13:37     ` Theodore Ts'o
2025-01-16 13:59       ` Chuck Lever
2025-01-16 15:36         ` Theodore Ts'o
2025-01-16 15:45           ` Chuck Lever
2025-01-16 17:30             ` Theodore Ts'o
2025-01-16 22:11               ` [Lsf-pc] " Martin K. Petersen
2025-01-16 21:54             ` Martin K. Petersen [this message]
2025-01-15  2:10 ` Darrick J. Wong
2025-01-15 14:24 ` Jeff Layton
2025-01-15 15:06 ` Matthew Wilcox
2025-01-15 15:31   ` Chuck Lever
2025-01-15 16:19     ` Matthew Wilcox
2025-01-15 18:20       ` Darrick J. Wong
2025-01-15 18:43       ` Chuck Lever
2025-01-16  5:40 ` Christoph Hellwig

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=yq1cygmzc2j.fsf@ca-mkp.ca.oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=anna.schumaker@oracle.com \
    --cc=chuck.lever@oracle.com \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=tytso@mit.edu \
    /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