From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
	Anuj Gupta <anuj20.g@samsung.com>,
	Kanchan Joshi <joshi.k@samsung.com>,
	linux-block@vger.kernel.org
Subject: more integrity cleanups v2
Date: Mon,  1 Jul 2024 07:08:56 +0200
Message-ID: <20240701050918.1244264-1-hch@lst.de>
X-Mailing-List: linux-block@vger.kernel.org
List-Id: <linux-block.vger.kernel.org>
List-Subscribe: <mailto:linux-block+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:linux-block+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Xref: photonic.trudheim.com org.kernel.vger.linux-block:93678
Newsgroups: org.kernel.vger.linux-block
Path: photonic.trudheim.com!nntp.lore.kernel.org!not-for-mail

Hi Jens and Martin,

this series has more cleanups to the block layer integrity code.
It splits the bio integrity APIs into their own header as they are
only used by very few source files, cleans up their stubs a little
bit, and then in the last patch change when the bio_integrity_payload
is freed when it is not owned by the block layer.  This avoids having
to know the submitter in the core code and will simplify adding other
consuer of the API like file systems or the io_uring non-passthrough
PI support.

v2 has been rebased to the block for-next branch as there are conflicting
changes in 6.10-rc but not in the for-6.11/block branch.

Diffstat:
 block/bio-integrity.c         |   87 ++++++++---------------
 block/bio.c                   |    2 
 block/blk-map.c               |    3 
 block/blk.h                   |   14 +++
 block/bounce.c                |    2 
 drivers/md/dm.c               |    1 
 drivers/nvme/host/ioctl.c     |   16 +---
 drivers/scsi/sd.c             |    3 
 include/linux/bio-integrity.h |  153 +++++++++++++++++++++++++++++++++++++++++
 include/linux/bio.h           |  156 ------------------------------------------
 include/linux/blk-integrity.h |    1 
 11 files changed, 211 insertions(+), 227 deletions(-)
.

Return-Path: <linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org>
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: Keith Busch <kbusch@kernel.org>,
	Sagi Grimberg <sagi@grimberg.me>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-block@vger.kernel.org,
	linux-nvme@lists.infradead.org
Subject: io_opt fixups
Date: Mon,  1 Jul 2024 07:17:49 +0200
Message-ID: <20240701051800.1245240-1-hch@lst.de>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-BeenThere: linux-nvme@lists.infradead.org
X-Mailman-Version: 2.1.34
List-Id: <linux-nvme.lists.infradead.org>
List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-nvme>,
 <mailto:linux-nvme-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-nvme/>
List-Post: <mailto:linux-nvme@lists.infradead.org>
List-Help: <mailto:linux-nvme-request@lists.infradead.org?subject=help>
List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-nvme>,
 <mailto:linux-nvme-request@lists.infradead.org?subject=subscribe>
Sender: "Linux-nvme" <linux-nvme-bounces@lists.infradead.org>
Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org
Xref: photonic.trudheim.com org.infradead.lists.linux-nvme:61592 org.kernel.vger.linux-block:93684
Newsgroups: org.infradead.lists.linux-nvme,org.kernel.vger.linux-block
Path: photonic.trudheim.com!nntp.lore.kernel.org!not-for-mail

Hi all,

I recently noticed that on my test VMs with the Qemu NVMe emulations I
see a zero max_setors_kb limit in sysfs.  It turns out Qemu advertises
a one-LBA optimal write size, which is a bit silly.

This series handles this odd case properly both in the block layer and
the nvme driver as a sort of defense in depth.

Diffstat:
 block/blk-settings.c     |    5 ++---
 drivers/nvme/host/core.c |    3 ++-
 2 files changed, 4 insertions(+), 4 deletions(-)

.

From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: Keith Busch <kbusch@kernel.org>,
	Conrad Meyer <conradmeyer@meta.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	linux-mmc@vger.kernel.org,
	linux-block@vger.kernel.org
Subject: make secure erase and write zeroes ioctls interruptible as well
Date: Mon,  1 Jul 2024 18:51:10 +0200
Message-ID: <20240701165219.1571322-1-hch@lst.de>
X-Mailing-List: linux-block@vger.kernel.org
List-Id: <linux-block.vger.kernel.org>
List-Subscribe: <mailto:linux-block+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:linux-block+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Xref: photonic.trudheim.com org.kernel.vger.linux-block:93715
Newsgroups: org.kernel.vger.linux-block,org.kernel.vger.linux-mmc
Path: photonic.trudheim.com!nntp.lore.kernel.org!not-for-mail

Hi all,

Following discard in the last merge window, this series also makes secure
erase and discard interruptible by fatal signals.

The secure erase side is a straight port of the discard support.
Unfortunately I don't have a way to test it, so I'm adding the eMMC
maintainer as that is where the support originated so maybe they can
give it a spin?  (just do a blkdiscard -f -s /dev/<dev> and then Ctrl+C)

The write zeroes support is a bit different as it is more complex due to
the fallback code and there already is a helper taking flags that we
piggy back on.  This side has been extensively tested.

Diffstat:
 block/blk-lib.c        |  267 +++++++++++++++++++++++++++----------------------
 block/ioctl.c          |   44 +++++++-
 include/linux/bio.h    |    2 
 include/linux/blkdev.h |    1 
 4 files changed, 193 insertions(+), 121 deletions(-)
.

