* [PATCH RFC v2 1/8] block: Add common atomic writes enable flag
2025-01-16 17:02 [PATCH RFC v2 0/8] device mapper atomic write support John Garry
@ 2025-01-16 17:02 ` John Garry
2025-01-16 17:02 ` [PATCH RFC v2 2/8] block: Don't trim an atomic write John Garry
` (8 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: John Garry @ 2025-01-16 17:02 UTC (permalink / raw)
To: axboe, agk, mpatocka, hch
Cc: song, yukuai3, kbusch, sagi, James.Bottomley, martin.petersen,
linux-block, dm-devel, linux-kernel, linux-raid, linux-nvme,
linux-scsi, John Garry
Currently only stacked devices need to explicitly enable atomic writes by
setting BLK_FEAT_ATOMIC_WRITES_STACKED flag.
This does not work well for device mapper stacking devices, as there many
sets of limits are stacked and what is the 'bottom' and 'top' device can
swapped. This means that BLK_FEAT_ATOMIC_WRITES_STACKED needs to be set
for many queue limits, which is messy.
Generalize enabling atomic writes enabling by ensuring that all devices
must explicitly set a flag - that includes NVMe, SCSI sd, and md raid.
Signed-off-by: John Garry <john.g.garry@oracle.com>
---
block/blk-settings.c | 6 ++++--
drivers/md/raid0.c | 2 +-
drivers/md/raid1.c | 2 +-
drivers/md/raid10.c | 2 +-
drivers/nvme/host/core.c | 1 +
drivers/scsi/sd.c | 1 +
include/linux/blkdev.h | 4 ++--
7 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/block/blk-settings.c b/block/blk-settings.c
index c8368ee8de2e..db12396ff5c7 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -175,6 +175,9 @@ static void blk_validate_atomic_write_limits(struct queue_limits *lim)
{
unsigned int boundary_sectors;
+ if (!(lim->features & BLK_FEAT_ATOMIC_WRITES))
+ goto unsupported;
+
if (!lim->atomic_write_hw_max)
goto unsupported;
@@ -611,7 +614,7 @@ static bool blk_stack_atomic_writes_head(struct queue_limits *t,
static void blk_stack_atomic_writes_limits(struct queue_limits *t,
struct queue_limits *b, sector_t start)
{
- if (!(t->features & BLK_FEAT_ATOMIC_WRITES_STACKED))
+ if (!(b->features & BLK_FEAT_ATOMIC_WRITES))
goto unsupported;
if (!b->atomic_write_hw_unit_min)
@@ -639,7 +642,6 @@ static void blk_stack_atomic_writes_limits(struct queue_limits *t,
t->atomic_write_hw_unit_max = 0;
t->atomic_write_hw_unit_min = 0;
t->atomic_write_hw_boundary = 0;
- t->features &= ~BLK_FEAT_ATOMIC_WRITES_STACKED;
}
/**
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index 7049ec7fb8eb..8fc9339b00c7 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -384,7 +384,7 @@ static int raid0_set_limits(struct mddev *mddev)
lim.max_write_zeroes_sectors = mddev->chunk_sectors;
lim.io_min = mddev->chunk_sectors << 9;
lim.io_opt = lim.io_min * mddev->raid_disks;
- lim.features |= BLK_FEAT_ATOMIC_WRITES_STACKED;
+ lim.features |= BLK_FEAT_ATOMIC_WRITES;
err = mddev_stack_rdev_limits(mddev, &lim, MDDEV_STACK_INTEGRITY);
if (err) {
queue_limits_cancel_update(mddev->gendisk->queue);
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index a5cd6522fc2d..9d57a88dbd26 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -3217,7 +3217,7 @@ static int raid1_set_limits(struct mddev *mddev)
md_init_stacking_limits(&lim);
lim.max_write_zeroes_sectors = 0;
- lim.features |= BLK_FEAT_ATOMIC_WRITES_STACKED;
+ lim.features |= BLK_FEAT_ATOMIC_WRITES;
err = mddev_stack_rdev_limits(mddev, &lim, MDDEV_STACK_INTEGRITY);
if (err) {
queue_limits_cancel_update(mddev->gendisk->queue);
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index e1e6cd7fb125..efe93b979167 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -4018,7 +4018,7 @@ static int raid10_set_queue_limits(struct mddev *mddev)
lim.max_write_zeroes_sectors = 0;
lim.io_min = mddev->chunk_sectors << 9;
lim.io_opt = lim.io_min * raid10_nr_stripes(conf);
- lim.features |= BLK_FEAT_ATOMIC_WRITES_STACKED;
+ lim.features |= BLK_FEAT_ATOMIC_WRITES;
err = mddev_stack_rdev_limits(mddev, &lim, MDDEV_STACK_INTEGRITY);
if (err) {
queue_limits_cancel_update(mddev->gendisk->queue);
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 9e7f1bb81973..cebaacead727 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2002,6 +2002,7 @@ static void nvme_update_atomic_write_disk_info(struct nvme_ns *ns,
lim->atomic_write_hw_boundary = boundary;
lim->atomic_write_hw_unit_min = bs;
lim->atomic_write_hw_unit_max = rounddown_pow_of_two(atomic_bs);
+ lim->features |= BLK_FEAT_ATOMIC_WRITES;
}
static u32 nvme_max_drv_segments(struct nvme_ctrl *ctrl)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 3d42480deb3f..7900817db8cc 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -992,6 +992,7 @@ static void sd_config_atomic(struct scsi_disk *sdkp, struct queue_limits *lim)
lim->atomic_write_hw_boundary = lim->atomic_write_hw_max * 4;
lim->atomic_write_hw_unit_min = unit_min * logical_block_size;
lim->atomic_write_hw_unit_max = unit_max * logical_block_size;
+ lim->features |= BLK_FEAT_ATOMIC_WRITES;
}
static blk_status_t sd_setup_write_same16_cmnd(struct scsi_cmnd *cmd,
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 7ac153e4423a..76f0a4e7c2e5 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -331,8 +331,8 @@ typedef unsigned int __bitwise blk_features_t;
#define BLK_FEAT_RAID_PARTIAL_STRIPES_EXPENSIVE \
((__force blk_features_t)(1u << 15))
-/* stacked device can/does support atomic writes */
-#define BLK_FEAT_ATOMIC_WRITES_STACKED \
+/* atomic writes enabled */
+#define BLK_FEAT_ATOMIC_WRITES \
((__force blk_features_t)(1u << 16))
/*
--
2.31.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH RFC v2 2/8] block: Don't trim an atomic write
2025-01-16 17:02 [PATCH RFC v2 0/8] device mapper atomic write support John Garry
2025-01-16 17:02 ` [PATCH RFC v2 1/8] block: Add common atomic writes enable flag John Garry
@ 2025-01-16 17:02 ` John Garry
2025-01-16 17:02 ` [PATCH RFC v2 3/8] dm-table: atomic writes support John Garry
` (7 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: John Garry @ 2025-01-16 17:02 UTC (permalink / raw)
To: axboe, agk, mpatocka, hch
Cc: song, yukuai3, kbusch, sagi, James.Bottomley, martin.petersen,
linux-block, dm-devel, linux-kernel, linux-raid, linux-nvme,
linux-scsi, John Garry
This is disallowed.
This check will now be relevant since the device mapper personalities
will start to support atomic writes, and they use this function.
Signed-off-by: John Garry <john.g.garry@oracle.com>
---
block/bio.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/block/bio.c b/block/bio.c
index 4e1a27d312c9..f0c416e5931d 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1610,6 +1610,10 @@ EXPORT_SYMBOL(bio_split);
*/
void bio_trim(struct bio *bio, sector_t offset, sector_t size)
{
+ /* We should never trim an atomic write */
+ if (WARN_ON_ONCE(bio->bi_opf & REQ_ATOMIC && size))
+ return;
+
if (WARN_ON_ONCE(offset > BIO_MAX_SECTORS || size > BIO_MAX_SECTORS ||
offset + size > bio_sectors(bio)))
return;
--
2.31.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH RFC v2 3/8] dm-table: atomic writes support
2025-01-16 17:02 [PATCH RFC v2 0/8] device mapper atomic write support John Garry
2025-01-16 17:02 ` [PATCH RFC v2 1/8] block: Add common atomic writes enable flag John Garry
2025-01-16 17:02 ` [PATCH RFC v2 2/8] block: Don't trim an atomic write John Garry
@ 2025-01-16 17:02 ` John Garry
2025-01-16 17:02 ` [PATCH RFC v2 4/8] dm: Ensure cloned bio is same length for atomic write John Garry
` (6 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: John Garry @ 2025-01-16 17:02 UTC (permalink / raw)
To: axboe, agk, mpatocka, hch
Cc: song, yukuai3, kbusch, sagi, James.Bottomley, martin.petersen,
linux-block, dm-devel, linux-kernel, linux-raid, linux-nvme,
linux-scsi, John Garry
Support stacking atomic write limits for DM devices.
All the pre-existing code in blk_stack_atomic_writes_limits() already takes
care of finding the aggregrate limits from the bottom devices.
Feature flag DM_TARGET_ATOMIC_WRITES is introduced so that atomic writes
can be enabled on personalities selectively. This is to ensure that atomic
writes are only enabled when verified to be working properly (for a
specific personality). In addition, it just may not make sense to enable
atomic writes on some personalities (so this flag also helps there).
Signed-off-by: John Garry <john.g.garry@oracle.com>
---
drivers/md/dm-table.c | 29 +++++++++++++++++++++++++++++
include/linux/device-mapper.h | 3 +++
2 files changed, 32 insertions(+)
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index bd8b796ae683..0ef5203387b2 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -1806,6 +1806,32 @@ static bool dm_table_supports_secure_erase(struct dm_table *t)
return true;
}
+static int device_not_atomic_write_capable(struct dm_target *ti,
+ struct dm_dev *dev, sector_t start,
+ sector_t len, void *data)
+{
+ return !bdev_can_atomic_write(dev->bdev);
+}
+
+static bool dm_table_supports_atomic_writes(struct dm_table *t)
+{
+ for (unsigned int i = 0; i < t->num_targets; i++) {
+ struct dm_target *ti = dm_table_get_target(t, i);
+
+ if (!dm_target_supports_atomic_writes(ti->type))
+ return false;
+
+ if (!ti->type->iterate_devices)
+ return false;
+
+ if (ti->type->iterate_devices(ti,
+ device_not_atomic_write_capable, NULL)) {
+ return false;
+ }
+ }
+ return true;
+}
+
int dm_table_set_restrictions(struct dm_table *t, struct request_queue *q,
struct queue_limits *limits)
{
@@ -1854,6 +1880,9 @@ int dm_table_set_restrictions(struct dm_table *t, struct request_queue *q,
return r;
}
+ if (dm_table_supports_atomic_writes(t))
+ limits->features |= BLK_FEAT_ATOMIC_WRITES;
+
r = queue_limits_set(q, limits);
if (r)
return r;
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 8321f65897f3..bcc6d7b69470 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -299,6 +299,9 @@ struct target_type {
#define dm_target_supports_mixed_zoned_model(type) (false)
#endif
+#define DM_TARGET_ATOMIC_WRITES 0x00000400
+#define dm_target_supports_atomic_writes(type) ((type)->features & DM_TARGET_ATOMIC_WRITES)
+
struct dm_target {
struct dm_table *table;
struct target_type *type;
--
2.31.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH RFC v2 4/8] dm: Ensure cloned bio is same length for atomic write
2025-01-16 17:02 [PATCH RFC v2 0/8] device mapper atomic write support John Garry
` (2 preceding siblings ...)
2025-01-16 17:02 ` [PATCH RFC v2 3/8] dm-table: atomic writes support John Garry
@ 2025-01-16 17:02 ` John Garry
2025-01-16 17:02 ` [PATCH RFC v2 5/8] dm-linear: Enable atomic writes John Garry
` (5 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: John Garry @ 2025-01-16 17:02 UTC (permalink / raw)
To: axboe, agk, mpatocka, hch
Cc: song, yukuai3, kbusch, sagi, James.Bottomley, martin.petersen,
linux-block, dm-devel, linux-kernel, linux-raid, linux-nvme,
linux-scsi, John Garry
For an atomic write, a cloned bio must be same length as the original bio,
i.e. no splitting.
Error in case it is not.
Per-dm device queue limits should be setup to ensure that this does not
happen, but error this case as an insurance policy.
Signed-off-by: John Garry <john.g.garry@oracle.com>
---
drivers/md/dm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 12ecf07a3841..e26c73fb365a 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1746,6 +1746,9 @@ static blk_status_t __split_and_process_bio(struct clone_info *ci)
ci->submit_as_polled = !!(ci->bio->bi_opf & REQ_POLLED);
len = min_t(sector_t, max_io_len(ti, ci->sector), ci->sector_count);
+ if (ci->bio->bi_opf & REQ_ATOMIC && len != ci->sector_count)
+ return BLK_STS_IOERR;
+
setup_split_accounting(ci, len);
if (unlikely(ci->bio->bi_opf & REQ_NOWAIT)) {
--
2.31.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH RFC v2 5/8] dm-linear: Enable atomic writes
2025-01-16 17:02 [PATCH RFC v2 0/8] device mapper atomic write support John Garry
` (3 preceding siblings ...)
2025-01-16 17:02 ` [PATCH RFC v2 4/8] dm: Ensure cloned bio is same length for atomic write John Garry
@ 2025-01-16 17:02 ` John Garry
2025-01-16 17:02 ` [PATCH RFC v2 6/8] dm-stripe: " John Garry
` (4 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: John Garry @ 2025-01-16 17:02 UTC (permalink / raw)
To: axboe, agk, mpatocka, hch
Cc: song, yukuai3, kbusch, sagi, James.Bottomley, martin.petersen,
linux-block, dm-devel, linux-kernel, linux-raid, linux-nvme,
linux-scsi, John Garry
Set feature flag DM_TARGET_ATOMIC_WRITES.
Signed-off-by: John Garry <john.g.garry@oracle.com>
---
drivers/md/dm-linear.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c
index 49fb0f684193..351f4ee83997 100644
--- a/drivers/md/dm-linear.c
+++ b/drivers/md/dm-linear.c
@@ -201,7 +201,8 @@ static struct target_type linear_target = {
.name = "linear",
.version = {1, 4, 0},
.features = DM_TARGET_PASSES_INTEGRITY | DM_TARGET_NOWAIT |
- DM_TARGET_ZONED_HM | DM_TARGET_PASSES_CRYPTO,
+ DM_TARGET_ZONED_HM | DM_TARGET_PASSES_CRYPTO |
+ DM_TARGET_ATOMIC_WRITES,
.report_zones = linear_report_zones,
.module = THIS_MODULE,
.ctr = linear_ctr,
--
2.31.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH RFC v2 6/8] dm-stripe: Enable atomic writes
2025-01-16 17:02 [PATCH RFC v2 0/8] device mapper atomic write support John Garry
` (4 preceding siblings ...)
2025-01-16 17:02 ` [PATCH RFC v2 5/8] dm-linear: Enable atomic writes John Garry
@ 2025-01-16 17:02 ` John Garry
2025-01-16 17:03 ` [PATCH RFC v2 7/8] dm-io: Warn on creating multiple atomic write bios for a region John Garry
` (3 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: John Garry @ 2025-01-16 17:02 UTC (permalink / raw)
To: axboe, agk, mpatocka, hch
Cc: song, yukuai3, kbusch, sagi, James.Bottomley, martin.petersen,
linux-block, dm-devel, linux-kernel, linux-raid, linux-nvme,
linux-scsi, John Garry
Set feature flag DM_TARGET_ATOMIC_WRITES.
Similar to md raid0, the chunk size set in stripe_io_hints() limits the
atomic write unit max.
Signed-off-by: John Garry <john.g.garry@oracle.com>
---
drivers/md/dm-stripe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c
index 4112071de0be..9add79c234ae 100644
--- a/drivers/md/dm-stripe.c
+++ b/drivers/md/dm-stripe.c
@@ -466,7 +466,8 @@ static void stripe_io_hints(struct dm_target *ti,
static struct target_type stripe_target = {
.name = "striped",
.version = {1, 6, 0},
- .features = DM_TARGET_PASSES_INTEGRITY | DM_TARGET_NOWAIT,
+ .features = DM_TARGET_PASSES_INTEGRITY | DM_TARGET_NOWAIT |
+ DM_TARGET_ATOMIC_WRITES,
.module = THIS_MODULE,
.ctr = stripe_ctr,
.dtr = stripe_dtr,
--
2.31.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH RFC v2 7/8] dm-io: Warn on creating multiple atomic write bios for a region
2025-01-16 17:02 [PATCH RFC v2 0/8] device mapper atomic write support John Garry
` (5 preceding siblings ...)
2025-01-16 17:02 ` [PATCH RFC v2 6/8] dm-stripe: " John Garry
@ 2025-01-16 17:03 ` John Garry
2025-01-16 17:03 ` [PATCH RFC v2 8/8] dm-mirror: Support atomic writes John Garry
` (2 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: John Garry @ 2025-01-16 17:03 UTC (permalink / raw)
To: axboe, agk, mpatocka, hch
Cc: song, yukuai3, kbusch, sagi, James.Bottomley, martin.petersen,
linux-block, dm-devel, linux-kernel, linux-raid, linux-nvme,
linux-scsi, John Garry
A region should just be for a single atomic write, so warn when we are
creating many. This should not occur if request queue limits are properly
configured.
Signed-off-by: John Garry <john.g.garry@oracle.com>
---
drivers/md/dm-io.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c
index d7a8e2f40db3..c37668790577 100644
--- a/drivers/md/dm-io.c
+++ b/drivers/md/dm-io.c
@@ -379,6 +379,7 @@ static void do_region(const blk_opf_t opf, unsigned int region,
atomic_inc(&io->count);
submit_bio(bio);
+ WARN_ON_ONCE(opf & REQ_ATOMIC && remaining);
} while (remaining);
}
--
2.31.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH RFC v2 8/8] dm-mirror: Support atomic writes
2025-01-16 17:02 [PATCH RFC v2 0/8] device mapper atomic write support John Garry
` (6 preceding siblings ...)
2025-01-16 17:03 ` [PATCH RFC v2 7/8] dm-io: Warn on creating multiple atomic write bios for a region John Garry
@ 2025-01-16 17:03 ` John Garry
2025-01-17 20:09 ` [PATCH RFC v2 0/8] device mapper atomic write support Mike Snitzer
2025-01-17 20:17 ` (subset) " Jens Axboe
9 siblings, 0 replies; 14+ messages in thread
From: John Garry @ 2025-01-16 17:03 UTC (permalink / raw)
To: axboe, agk, mpatocka, hch
Cc: song, yukuai3, kbusch, sagi, James.Bottomley, martin.petersen,
linux-block, dm-devel, linux-kernel, linux-raid, linux-nvme,
linux-scsi, John Garry
Support atomic writes by setting DM_TARGET_ATOMIC_WRITES for the target
type, and also unmasking REQ_ATOMIC from the submitted bio op flags.
Signed-off-by: John Garry <john.g.garry@oracle.com>
---
drivers/md/dm-raid1.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
index 9511dae5b556..7a42bf648c52 100644
--- a/drivers/md/dm-raid1.c
+++ b/drivers/md/dm-raid1.c
@@ -656,7 +656,7 @@ static void do_write(struct mirror_set *ms, struct bio *bio)
unsigned int i;
struct dm_io_region io[MAX_NR_MIRRORS], *dest = io;
struct mirror *m;
- blk_opf_t op_flags = bio->bi_opf & (REQ_FUA | REQ_PREFLUSH);
+ blk_opf_t op_flags = bio->bi_opf & (REQ_FUA | REQ_PREFLUSH | REQ_ATOMIC);
struct dm_io_request io_req = {
.bi_opf = REQ_OP_WRITE | op_flags,
.mem.type = DM_IO_BIO,
@@ -1485,6 +1485,7 @@ static struct target_type mirror_target = {
.name = "mirror",
.version = {1, 14, 0},
.module = THIS_MODULE,
+ .features = DM_TARGET_ATOMIC_WRITES,
.ctr = mirror_ctr,
.dtr = mirror_dtr,
.map = mirror_map,
--
2.31.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH RFC v2 0/8] device mapper atomic write support
2025-01-16 17:02 [PATCH RFC v2 0/8] device mapper atomic write support John Garry
` (7 preceding siblings ...)
2025-01-16 17:03 ` [PATCH RFC v2 8/8] dm-mirror: Support atomic writes John Garry
@ 2025-01-17 20:09 ` Mike Snitzer
2025-01-17 20:12 ` Jens Axboe
2025-01-17 21:27 ` Mikulas Patocka
2025-01-17 20:17 ` (subset) " Jens Axboe
9 siblings, 2 replies; 14+ messages in thread
From: Mike Snitzer @ 2025-01-17 20:09 UTC (permalink / raw)
To: John Garry, axboe, mpatocka
Cc: axboe, agk, hch, song, yukuai3, kbusch, sagi, James.Bottomley,
martin.petersen, linux-block, dm-devel, linux-kernel, linux-raid,
linux-nvme, linux-scsi
On Thu, Jan 16, 2025 at 05:02:53PM +0000, John Garry wrote:
> This series introduces initial device mapper atomic write support.
>
> Since we already support stacking atomic writes limits, it's quite
> straightforward to support.
>
> Personalities dm-linear, dm-stripe, and dm-raid1 are supported here, and
> more personalities could be supported in future.
>
> This is still an RFC as I would like to test further.
>
> Based on 3d9a9e9a77c5 (block/for-6.14/block) block: limit disk max
> sectors to (LLONG_MAX >> 9)
>
> Changes to v1:
> - Generic block layer atomic writes enable flag and dm-table rework
> - Add dm-stripe and dm-raid1 support
> - Add bio_trim() patch
This all looks good.
Mikulas, we need Jens to pick up patches 1 and 2. I wouldn't be
opposed to him taking the entire set but I did notice the DM core
(ioctl) version and the 3 DM targets that have had atomic support
added need their version numbers bumped. Given that, likely best for
you (Mikulas) to pick up patches 3-8 after rebasing on Jens' latest
for-6.14/block branch (once Jens picks up patches 1 and 2).
Jens, you cool with picking up patches 1+2 for 6.14? Or too late and
we circle back to this for 6.15?
Either way, for the series:
Reviewed-by: Mike Snitzer <snitzer@kernel.org>
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [PATCH RFC v2 0/8] device mapper atomic write support
2025-01-17 20:09 ` [PATCH RFC v2 0/8] device mapper atomic write support Mike Snitzer
@ 2025-01-17 20:12 ` Jens Axboe
2025-01-17 21:27 ` Mikulas Patocka
1 sibling, 0 replies; 14+ messages in thread
From: Jens Axboe @ 2025-01-17 20:12 UTC (permalink / raw)
To: Mike Snitzer, John Garry, mpatocka
Cc: agk, hch, song, yukuai3, kbusch, sagi, James.Bottomley,
martin.petersen, linux-block, dm-devel, linux-kernel, linux-raid,
linux-nvme, linux-scsi
On 1/17/25 1:09 PM, Mike Snitzer wrote:
> On Thu, Jan 16, 2025 at 05:02:53PM +0000, John Garry wrote:
>> This series introduces initial device mapper atomic write support.
>>
>> Since we already support stacking atomic writes limits, it's quite
>> straightforward to support.
>>
>> Personalities dm-linear, dm-stripe, and dm-raid1 are supported here, and
>> more personalities could be supported in future.
>>
>> This is still an RFC as I would like to test further.
>>
>> Based on 3d9a9e9a77c5 (block/for-6.14/block) block: limit disk max
>> sectors to (LLONG_MAX >> 9)
>>
>> Changes to v1:
>> - Generic block layer atomic writes enable flag and dm-table rework
>> - Add dm-stripe and dm-raid1 support
>> - Add bio_trim() patch
>
> This all looks good.
>
> Mikulas, we need Jens to pick up patches 1 and 2. I wouldn't be
> opposed to him taking the entire set but I did notice the DM core
> (ioctl) version and the 3 DM targets that have had atomic support
> added need their version numbers bumped. Given that, likely best for
> you (Mikulas) to pick up patches 3-8 after rebasing on Jens' latest
> for-6.14/block branch (once Jens picks up patches 1 and 2).
>
> Jens, you cool with picking up patches 1+2 for 6.14? Or too late and
> we circle back to this for 6.15?
I can do 1+2 for 6.14, they are pretty trivial.
--
Jens Axboe
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH RFC v2 0/8] device mapper atomic write support
2025-01-17 20:09 ` [PATCH RFC v2 0/8] device mapper atomic write support Mike Snitzer
2025-01-17 20:12 ` Jens Axboe
@ 2025-01-17 21:27 ` Mikulas Patocka
2025-01-17 21:51 ` Mike Snitzer
1 sibling, 1 reply; 14+ messages in thread
From: Mikulas Patocka @ 2025-01-17 21:27 UTC (permalink / raw)
To: Mike Snitzer
Cc: John Garry, axboe, agk, hch, song, yukuai3, kbusch, sagi,
James.Bottomley, martin.petersen, linux-block, dm-devel,
linux-kernel, linux-raid, linux-nvme, linux-scsi
On Fri, 17 Jan 2025, Mike Snitzer wrote:
> On Thu, Jan 16, 2025 at 05:02:53PM +0000, John Garry wrote:
> > This series introduces initial device mapper atomic write support.
> >
> > Since we already support stacking atomic writes limits, it's quite
> > straightforward to support.
> >
> > Personalities dm-linear, dm-stripe, and dm-raid1 are supported here, and
> > more personalities could be supported in future.
> >
> > This is still an RFC as I would like to test further.
> >
> > Based on 3d9a9e9a77c5 (block/for-6.14/block) block: limit disk max
> > sectors to (LLONG_MAX >> 9)
> >
> > Changes to v1:
> > - Generic block layer atomic writes enable flag and dm-table rework
> > - Add dm-stripe and dm-raid1 support
> > - Add bio_trim() patch
>
> This all looks good.
>
> Mikulas, we need Jens to pick up patches 1 and 2. I wouldn't be
> opposed to him taking the entire set but I did notice the DM core
> (ioctl) version and the 3 DM targets that have had atomic support
> added need their version numbers bumped. Given that, likely best for
> you (Mikulas) to pick up patches 3-8 after rebasing on Jens' latest
> for-6.14/block branch (once Jens picks up patches 1 and 2).
>
> Jens, you cool with picking up patches 1+2 for 6.14? Or too late and
> we circle back to this for 6.15?
>
> Either way, for the series:
>
> Reviewed-by: Mike Snitzer <snitzer@kernel.org>
Hi
I rebased on Jens' block tree, applied the patches 3-8, increased
DM_VERSION_MINOR, DM_VERSION_EXTRA, increased version numbers in
dm-linear, dm-stripe, dm-raid1 and uploaded it to git.kernel.org.
You can check it if it's correct.
Mikulas
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH RFC v2 0/8] device mapper atomic write support
2025-01-17 21:27 ` Mikulas Patocka
@ 2025-01-17 21:51 ` Mike Snitzer
0 siblings, 0 replies; 14+ messages in thread
From: Mike Snitzer @ 2025-01-17 21:51 UTC (permalink / raw)
To: Mikulas Patocka, axboe
Cc: John Garry, agk, hch, song, yukuai3, kbusch, sagi,
James.Bottomley, martin.petersen, linux-block, dm-devel,
linux-kernel, linux-raid, linux-nvme, linux-scsi
On Fri, Jan 17, 2025 at 10:27:22PM +0100, Mikulas Patocka wrote:
>
>
> On Fri, 17 Jan 2025, Mike Snitzer wrote:
>
> > On Thu, Jan 16, 2025 at 05:02:53PM +0000, John Garry wrote:
> > > This series introduces initial device mapper atomic write support.
> > >
> > > Since we already support stacking atomic writes limits, it's quite
> > > straightforward to support.
> > >
> > > Personalities dm-linear, dm-stripe, and dm-raid1 are supported here, and
> > > more personalities could be supported in future.
> > >
> > > This is still an RFC as I would like to test further.
> > >
> > > Based on 3d9a9e9a77c5 (block/for-6.14/block) block: limit disk max
> > > sectors to (LLONG_MAX >> 9)
> > >
> > > Changes to v1:
> > > - Generic block layer atomic writes enable flag and dm-table rework
> > > - Add dm-stripe and dm-raid1 support
> > > - Add bio_trim() patch
> >
> > This all looks good.
> >
> > Mikulas, we need Jens to pick up patches 1 and 2. I wouldn't be
> > opposed to him taking the entire set but I did notice the DM core
> > (ioctl) version and the 3 DM targets that have had atomic support
> > added need their version numbers bumped. Given that, likely best for
> > you (Mikulas) to pick up patches 3-8 after rebasing on Jens' latest
> > for-6.14/block branch (once Jens picks up patches 1 and 2).
> >
> > Jens, you cool with picking up patches 1+2 for 6.14? Or too late and
> > we circle back to this for 6.15?
> >
> > Either way, for the series:
> >
> > Reviewed-by: Mike Snitzer <snitzer@kernel.org>
>
> Hi
>
> I rebased on Jens' block tree, applied the patches 3-8, increased
> DM_VERSION_MINOR, DM_VERSION_EXTRA, increased version numbers in
> dm-linear, dm-stripe, dm-raid1 and uploaded it to git.kernel.org.
>
> You can check it if it's correct.
Looks good, thanks!
Mike
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: (subset) [PATCH RFC v2 0/8] device mapper atomic write support
2025-01-16 17:02 [PATCH RFC v2 0/8] device mapper atomic write support John Garry
` (8 preceding siblings ...)
2025-01-17 20:09 ` [PATCH RFC v2 0/8] device mapper atomic write support Mike Snitzer
@ 2025-01-17 20:17 ` Jens Axboe
9 siblings, 0 replies; 14+ messages in thread
From: Jens Axboe @ 2025-01-17 20:17 UTC (permalink / raw)
To: agk, mpatocka, hch, John Garry
Cc: song, yukuai3, kbusch, sagi, James.Bottomley, martin.petersen,
linux-block, dm-devel, linux-kernel, linux-raid, linux-nvme,
linux-scsi
On Thu, 16 Jan 2025 17:02:53 +0000, John Garry wrote:
> This series introduces initial device mapper atomic write support.
>
> Since we already support stacking atomic writes limits, it's quite
> straightforward to support.
>
> Personalities dm-linear, dm-stripe, and dm-raid1 are supported here, and
> more personalities could be supported in future.
>
> [...]
Applied, thanks!
[1/8] block: Add common atomic writes enable flag
commit: 6a7e17b22062c84a111d7073c67cc677c4190f32
[2/8] block: Don't trim an atomic write
commit: 554b22864cc79e28cd65e3a6e1d0d1dfa8581c68
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 14+ messages in thread