dm_is_zone_write() is introduced to detect write operations
to zoned targets.
This change does not affect the target drivers supporting zoned devices
and exposing a zoned device, namely dm-crypt, dm-linear and dm-flakey as
none of these targets ever request a requeue.
Signed-off-by: Damien Le Moal
dm_report_zones_cb() is not.
dm-linear, dm-flakey and dm-crypt are modified to use dm_report_zones().
Signed-off-by: Damien Le Moal
Reviewed-by: Johannes Thumshirn
---
drivers/md/dm-crypt.c | 7 +++
drivers/md/dm-flakey.c| 7 +++
drivers/md/dm-linear.c| 7
. This avoids conflicts
down the stack with the block IO scheduler zone write locking
(in mq-deadline).
Signed-off-by: Damien Le Moal
Reviewed-by: Christoph Hellwig
---
include/linux/blk_types.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
In device_area_is_invalid(), use bdev_is_zoned() instead of open
coding the test on the zoned model returned by bdev_zoned_model().
Signed-off-by: Damien Le Moal
Reviewed-by: Johannes Thumshirn
---
drivers/md/dm-table.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
operations. Regular
device targets are also not affected. The added code also does not
impact builds with CONFIG_BLK_DEV_ZONED disabled by stubbing out all
dm zone related functions.
Signed-off-by: Damien Le Moal
---
drivers/md/dm-core.h | 14 +
drivers/md/dm-table.c | 19
of the function names,
introduce the inline helper dm_io_inc_pending() instead of directly
using atomic_inc() calls.
Signed-off-by: Damien Le Moal
---
drivers/md/dm-core.h | 52 ++
drivers/md/dm.c | 59 ++--
2 files changed
. Since empty zones do not need a reset, also ignore these zones.
The function blkdev_zone_reset_all() is introduced for block devices
natively supporting reset all operations. blkdev_zone_mgmt() is modified
to call either function to execute an all zone reset request.
Signed-off-by: Damien Le Moal
in patch 11 as suggested by Milan
* Added reviewed-by tags
Damien Le Moal (11):
block: improve handling of all zones reset operation
block: introduce bio zone helpers
block: introduce BIO_ZONE_WRITE_LOCKED bio flag
dm: Fix dm_accept_partial_bio()
dm: cleanup device_area_is_invalid()
dm
On 2021/05/20 0:46, Milan Broz wrote:
> On 19/05/2021 04:55, Damien Le Moal wrote:
>> Zone append BIOs (REQ_OP_ZONE_APPEND) always specify the start sector
>> of the zone to be written instead of the actual sector location to
>> write. The write location is determined by th
On 2021/05/19 18:42, Christoph Hellwig wrote:
> On Wed, May 19, 2021 at 11:55:21AM +0900, Damien Le Moal wrote:
>> Introduce the BIO flag BIO_ZONE_WRITE_LOCKED to indicate that a BIO owns
>> the write lock of the zone it is targeting. This is the counterpart of
>> th
> ---
> From 3ff31f2502cf032ac1331122c9f1a018b769b577 Mon Sep 17 00:00:00 2001
> From: Damien Le Moal
> Date: Wed, 19 May 2021 11:55:19 +0900
> Subject: block: improve handling of all zones reset operation
>
> SCSI, ZNS and null_blk zoned devices support resetting a
On 2021/05/19 16:42, Chaitanya Kulkarni wrote:
>> On May 19, 2021, at 12:17 AM, Johannes Thumshirn
>> wrote:
>>
>> On 19/05/2021 04:56, Damien Le Moal wrote:
>>> +static inline unsigned int bio_zone_no(struct request_queue *q,
>>> +
dm_report_zones_cb() is not.
dm-linear, dm-flakey and dm-crypt are modified to use dm_report_zones().
Signed-off-by: Damien Le Moal
---
drivers/md/dm-crypt.c | 7 +++
drivers/md/dm-flakey.c| 7 +++
drivers/md/dm-linear.c| 7 +++
drivers/md/dm-zone.c | 23
() calls to make the
code more legible.
Signed-off-by: Damien Le Moal
---
drivers/md/dm.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index ca2aedd8ee7d..a9211575bfed 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1237,8 +1237,9
-by: Damien Le Moal
---
block/blk-zoned.c | 87 ++-
1 file changed, 63 insertions(+), 24 deletions(-)
diff --git a/block/blk-zoned.c b/block/blk-zoned.c
index 250cb76ee615..13f053c06d9e 100644
--- a/block/blk-zoned.c
+++ b/block/blk-zoned.c
@@ -161,18 +161,30
dm_is_zone_write() is introduced to detect write operations
to zoned targets.
This change does not affect the target drivers supporting zoned devices
and exposing a zoned device, namely dm-crypt, dm-linear and dm-flakey as
none of these targets ever request a requeue.
Signed-off-by: Damien Le Moal
operations. Regular
device targets are also not affected. The added code also does not
impact builds with CONFIG_BLK_DEV_ZONED disabled by stubbing out all
dm zone related functions.
Signed-off-by: Damien Le Moal
---
drivers/md/dm-core.h | 14 +
drivers/md/dm-table.c | 19
of the function names,
introduce the inline helper dm_io_inc_pending() instead of directly
using atomic_inc() calls.
Signed-off-by: Damien Le Moal
---
drivers/md/dm-core.h | 52 ++
drivers/md/dm.c | 59 ++--
2 files changed
Introduce the helper functions bio_zone_no() and bio_zone_is_seq().
Both are the BIO counterparts of the request helpers blk_rq_zone_no()
and blk_rq_zone_is_seq(), respectively returning the number of the
target zone of a bio and true if the BIO target zone is sequential.
Signed-off-by: Damien Le
resulting in an IV
mismatch between encryption and decryption.
To solve this problem, report to DM core that zone append operations are
not supported. This result in the zone append operations being emulated
using regular write operations.
Reported-by: Shin'ichiro Kawasaki
Signed-off-by: Damien Le
In device_area_is_invalid(), use bdev_is_zoned() instead of open
coding the test on the zoned model returned by bdev_zoned_model().
Signed-off-by: Damien Le Moal
---
drivers/md/dm-table.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm-table.c b/drivers/md/dm
a zoned block device.
Signed-off-by: Damien Le Moal
---
include/linux/blk_types.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index db026b6ec15a..e5cf12f102a2 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
request queue zone attributes in
dm_table_set_restrictions().
Signed-off-by: Damien Le Moal
---
drivers/md/Makefile | 4 ++
drivers/md/dm-table.c | 14 ++
drivers/md/dm-zone.c | 102 ++
drivers/md/dm.c | 78
the following tests:
1) zonefs tests on top of dm-crypt with a zoned nullblk device
2) zonefs tests on top of dm-crypt+dm-linear with an SMR HDD
3) btrfs fstests on top of dm-crypt with zoned nullblk devices.
Comments are as always welcome.
Damien Le Moal (11):
block: improve handling of all zones reset
is found to have zones with a capacity different from
the zone size, fail the target initialization.
Signed-off-by: Damien Le Moal
---
drivers/md/dm-zoned-metadata.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c
index
On 2021/04/20 10:20, Douglas Gilbert wrote:
> On 2021-04-19 2:45 a.m., Christoph Hellwig wrote:
>> On Sat, Apr 17, 2021 at 11:33:23AM +0900, Damien Le Moal wrote:
>>> Synchronous writes to sequential zone files cannot use zone append
>>> operations if the underlyi
On 2021/04/19 21:52, Mikulas Patocka wrote:
>
>
> On Sat, 17 Apr 2021, Damien Le Moal wrote:
>
>> Mike,
>>
>> Zone append BIOs (REQ_OP_ZONE_APPEND) always specify the start sector
>> of the zone to be written instead of the actual location sector to
>&g
On 2021/04/19 18:41, h...@infradead.org wrote:
> On Mon, Apr 19, 2021 at 09:35:37AM +0000, Damien Le Moal wrote:
>> This is only to avoid someone from running zoned-btrfs on top of dm-crypt.
>> Without this patch, mount will be OK and file data writes will also actually
>> be
On 2021/04/19 18:29, Christoph Hellwig wrote:
> On Fri, Apr 16, 2021 at 06:17:21PM +0200, David Sterba wrote:
>> On Fri, Apr 16, 2021 at 12:05:27PM +0900, Damien Le Moal wrote:
>>> From: Johannes Thumshirn
>>>
>>> For zoned btrfs, zone append is mandatory to
On 2021/04/19 15:45, Christoph Hellwig wrote:
> On Sat, Apr 17, 2021 at 11:33:23AM +0900, Damien Le Moal wrote:
>> Synchronous writes to sequential zone files cannot use zone append
>> operations if the underlying zoned device queue limit
>> max_zone_append_sectors is 0, indic
, using a
helper function. For zone append, the function
dm_table_supports_zone_append() is defined if CONFIG_BLK_DEV_ZONED is
enabled.
Fixes: 8e225f04d2dd ("dm crypt: Enable zoned block device support")
Cc: sta...@vger.kernel.org
Signed-off-by: Damien Le Moal
Reviewed-by: Johannes
("zonefs: use REQ_OP_ZONE_APPEND for sync DIO")
Cc: sta...@vger.kernel.org
Signed-off-by: Damien Le Moal
Reviewed-by: Johannes Thumshirn
---
fs/zonefs/super.c | 16
fs/zonefs/zonefs.h | 2 ++
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/fs/zonefs/super.c b
;)
Cc: sta...@vger.kernel.org
Signed-off-by: Damien Le Moal
---
drivers/md/dm-crypt.c | 49 +++
1 file changed, 40 insertions(+), 9 deletions(-)
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index b0ab080f2567..6ef35bb29ce5 100644
--- a/drivers/md/
.
* Removed btrfs patch (former patch 3) as David is taking that patch
through the btrfs tree misc-next branch.
* Added reviewed-by, Fixes and Cc tags.
Damien Le Moal (3):
dm: Introduce zone append support control
dm crypt: Fix zoned block device support
zonefs: fix synchronous write
On 2021/04/16 16:13, Johannes Thumshirn wrote:
> On 16/04/2021 05:05, Damien Le Moal wrote:
>
> [...]
>
>> +CRYPT_IV_NO_SECTORS,/* IV calculation does not use sectors
>> */
>
> [...]
>
>> -if (ivmode == NULL)
>> +if (ivm
Synchronous writes to sequential zone files cannot use zone append
operations if the underlying zoned device queue limit
max_zone_append_sectors is 0, indicating that the device does not
support this operation. In this case, fall back to using regular write
operations.
Signed-off-by: Damien Le
in
crypt_ctr_ivmode() for the null and random IV modes and checked in
crypt_ctr() to set to true zone_append_not_supported if
CRYPT_IV_NO_SECTORS is not set for the chosen cypher.
Reported-by: Shin'ichiro Kawasaki
Signed-off-by: Damien Le Moal
---
drivers/md/dm-crypt.c | 48
, using a
helper function. For zone append, the function
dm_table_supports_zone_append() is defined if CONFIG_BLK_DEV_ZONED is
enabled.
Signed-off-by: Damien Le Moal
---
drivers/md/dm-table.c | 41 +++
include/linux/device-mapper.h | 6 +
2 files changed, 47
cypher), fail to mount.
Signed-off-by: Johannes Thumshirn
Signed-off-by: Damien Le Moal
---
fs/btrfs/zoned.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
index eeb3ebe11d7a..70b23a0d03b1 100644
--- a/fs/btrfs/zoned.c
+++ b/fs/btrfs/zoned.c
operation write these blocks to disk at
unknown locations.
Reviews and comments are very much welcome.
Damien Le Moal (3):
dm: Introduce zone append support control
dm crypt: Fix zoned block device support
zonefs: fix synchronous write to sequential zone files
Johannes Thumshirn (1
On 2021/04/12 23:35, Selva Jove wrote:
> On Mon, Apr 12, 2021 at 5:55 AM Damien Le Moal wrote:
>>
>> On 2021/04/07 20:33, Selva Jove wrote:
>>> Initially I started moving the dm-kcopyd interface to the block layer
>>> as a generic interface.
>>> Once
t supported in stacked devices */
>>> + t->copy_offload = 0;
>>> + t->max_copy_sectors = 0;
>>> + t->max_copy_range_sectors = 0;
>>> + t->max_copy_nr_ranges = 0;
>>
>> You do not need this. Limits not explicitely initialized are 0
On 2021/03/16 22:47, Mike Snitzer wrote:
> On Tue, Mar 16 2021 at 2:14am -0400,
> Damien Le Moal wrote:
>
>> On 2021/03/16 13:36, Shin'ichiro Kawasaki wrote:
>>> Commit 24f6b6036c9e ("dm table: fix zoned iterate_devices based device
>>> capability checks&
destination
> device is not a zoned block device. Also add comments and improve an
> error message to clarify expectations to the two checks.
>
> Fixes: 24f6b6036c9e ("dm table: fix zoned iterate_devices based device
> capability checks")
> Signed-off-by: Shin'ichir
On 2021/03/13 4:09, Mike Snitzer wrote:
> On Thu, Mar 11 2021 at 6:30pm -0500,
> Damien Le Moal wrote:
>
>> On 2021/03/12 2:54, Mike Snitzer wrote:
>>> On Wed, Mar 10 2021 at 3:25am -0500,
>>> Shin'ichiro Kawasaki wrote:
>>>
>>>> Commit 24
t;
> But _not_ invert the logic, so keep device_not_zoned_model.. otherwise
> the first positive return of a match will short-circuit checking all
> other devices match.
>
>>
>> @@ -1621,9 +1621,18 @@ static int device_not_matches_zone_sectors(struct
>> dm_target *ti, struct dm_dev *
>> struct request_queue *q = bdev_get_queue(dev->bdev);
>> unsigned int *zone_sectors = data;
>>
>> +if (blk_queue_zoned_model(q) == BLK_ZONED_NONE)
>> +return 0;
>> +
>> return blk_queue_zone_sectors(q) != *zone_sectors;
>> }
>
> Thanks,
> Mike
>
>
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
@@ static int validate_hardware_zoned_model(struct
> dm_table *table,
> return -EINVAL;
>
> if (dm_table_any_dev_attr(table, device_not_matches_zone_sectors,
> _sectors)) {
> - DMERR("%s: zone sectors is not consistent across all devices",
> + DMERR("%s: zone sectors is not consistent across all zoned
> devices",
> dm_device_name(table->md));
> return -EINVAL;
> }
>
Looks good to me.
Reviewed-by: Damien Le Moal
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
> #define blk_queue_io_stat(q) test_bit(QUEUE_FLAG_IO_STAT, &(q)->queue_flags)
> #define blk_queue_add_random(q) test_bit(QUEUE_FLAG_ADD_RANDOM,
> &(q)->queue_flags)
> #define blk_queue_discard(q) test_bit(QUEUE_FLAG_DISCARD, &(q)->queue_flags)
> +#define blk_qu
git a/drivers/md/dm.h b/drivers/md/dm.h
> index fffe1e289c53..7bf20fb2de74 100644
> --- a/drivers/md/dm.h
> +++ b/drivers/md/dm.h
> @@ -179,7 +179,7 @@ int dm_open_count(struct mapped_device *md);
> int dm_lock_for_deletion(struct mapped_device *md, bool mark_deferred, bool
> only_deferred);
> int dm_cancel_deferred_remove(struct mapped_device *md);
> int dm_request_based(struct mapped_device *md);
> -int dm_get_table_device(struct mapped_device *md, dev_t dev, fmode_t mode,
> +int dm_get_table_device(struct mapped_device *md, dev_t dev, fmode_t mode,
> bool non_exclusive,
> struct dm_dev **result);
> void dm_put_table_device(struct mapped_device *md, struct dm_dev *d);
>
> diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
> index 61a66fb8ebb3..70002363bfc0 100644
> --- a/include/linux/device-mapper.h
> +++ b/include/linux/device-mapper.h
> @@ -150,6 +150,7 @@ struct dm_dev {
> struct block_device *bdev;
> struct dax_device *dax_dev;
> fmode_t mode;
> + bool non_exclusive;
> char name[16];
> };
>
> @@ -325,6 +326,12 @@ struct dm_target {
>* whether or not its underlying devices have support.
>*/
> bool discards_supported:1;
> +
> + /*
> + * Set if this target needs to open device without FMODE_EXCL
> + * mode.
> + */
> + bool non_exclusive:1;
> };
>
> void *dm_per_bio_data(struct bio *bio, size_t data_size);
> diff --git a/include/uapi/linux/dm-ioctl.h b/include/uapi/linux/dm-ioctl.h
> index 4933b6b67b85..08d7dbff80f4 100644
> --- a/include/uapi/linux/dm-ioctl.h
> +++ b/include/uapi/linux/dm-ioctl.h
> @@ -214,6 +214,15 @@ struct dm_target_msg {
> char message[0];
> };
>
> +enum {
> + REMAP_START_CMD = 1,
> + REMAP_FINISH_CMD,
> +};
> +
> +struct dm_remap_param {
> + uint8_t cmd;
> + uint8_t params[0];
> +};
> /*
> * If you change this make sure you make the corresponding change
> * to dm-ioctl.c:lookup_ioctl()
> @@ -244,6 +253,7 @@ enum {
> DM_DEV_SET_GEOMETRY_CMD,
> DM_DEV_ARM_POLL_CMD,
> DM_GET_TARGET_VERSION_CMD,
> + DM_DEV_REMAP_CMD
> };
>
> #define DM_IOCTL 0xfd
> @@ -259,6 +269,7 @@ enum {
> #define DM_DEV_STATUS_IOWR(DM_IOCTL, DM_DEV_STATUS_CMD, struct dm_ioctl)
> #define DM_DEV_WAIT _IOWR(DM_IOCTL, DM_DEV_WAIT_CMD, struct dm_ioctl)
> #define DM_DEV_ARM_POLL _IOWR(DM_IOCTL, DM_DEV_ARM_POLL_CMD, struct
> dm_ioctl)
> +#define DM_DEV_REMAP _IOWR(DM_IOCTL, DM_DEV_REMAP_CMD, struct dm_ioctl)
>
> #define DM_TABLE_LOAD_IOWR(DM_IOCTL, DM_TABLE_LOAD_CMD, struct dm_ioctl)
> #define DM_TABLE_CLEAR _IOWR(DM_IOCTL, DM_TABLE_CLEAR_CMD, struct dm_ioctl)
> @@ -272,9 +283,9 @@ enum {
> #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct
> dm_ioctl)
>
> #define DM_VERSION_MAJOR 4
> -#define DM_VERSION_MINOR 43
> +#define DM_VERSION_MINOR 44
> #define DM_VERSION_PATCHLEVEL0
> -#define DM_VERSION_EXTRA "-ioctl (2020-10-01)"
> +#define DM_VERSION_EXTRA "-ioctl (2020-12-25)"
>
> /* Status bits */
> #define DM_READONLY_FLAG (1 << 0) /* In/Out */
>
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
sk *disk;
If you fix the interface of the detach function, you should not need this field.
> +};
> +
> struct gendisk {
> /* major, first_minor and minors are input parameters only,
>* don't use directly. Use disk_devt() and disk_max_parts().
> @@ -158,6 +166,7 @@ struct gendisk {
>
> const struct block_device_operations *fops;
> struct request_queue *queue;
> + struct blk_interposer *interposer;
> void *private_data;
>
> int flags;
> @@ -346,4 +355,14 @@ static inline void printk_all_partitions(void)
> }
> #endif /* CONFIG_BLOCK */
>
> +/*
> + * block layer interposer
> + */
> +#define blk_has_interposer(d) ((d)->interposer != NULL)
Please make this an inline function.
> +
> +int blk_interposer_attach(struct gendisk *disk, struct blk_interposer
> *interposer,
> + const ip_submit_bio_t ip_submit_bio);
> +void blk_interposer_detach(struct blk_interposer *interposer,
> +const ip_submit_bio_t ip_submit_bio);
> +
> #endif /* _LINUX_GENHD_H */
>
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
.h| 1 +
> include/linux/blk_types.h | 6 +-
> include/linux/device-mapper.h | 7 +
> include/linux/genhd.h | 19 ++
> include/uapi/linux/dm-ioctl.h | 15 +-
> 15 files changed, 643 insertions(+), 30 deletions(-)
>
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
On 2021/01/28 16:21, Damien Le Moal wrote:
> On 2021/01/28 16:12, Chaitanya Kulkarni wrote:
>> Introduce bio_new() helper and use it in blk-lib.c to allocate and
>> initialize various non-optional or semi-optional members of the bio
>> along with bio allocation done with bio_
ULL. So this should
be checked.
> +
> + bio_set_dev(bio, bdev);
> + bio->bi_iter.bi_sector = sector;
> + bio_set_op_attrs(bio, op, op_flags);
This function is obsolete. Open code this.
> +
> + return bio;
> +}
>
> #endif /* __LINUX_BIO_H */
>
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
bio->bi_opf = REQ_OP_ZONE_APPEND | REQ_SYNC | REQ_IDLE;
> if (iocb->ki_flags & IOCB_DSYNC)
> bio->bi_opf |= REQ_FUA;
>
>
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
c_bioset(GFP_NOFS, nr_pages, _bio_set);
> + bio = bio_alloc(GFP_NOFS, nr_pages);
> if (!bio)
> return -ENOMEM;
>
>
Acked-by: Damien Le Moal
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
On 2021/01/05 21:24, Selva Jove wrote:
> Thanks for the review, Damien.
>
> On Mon, Jan 4, 2021 at 6:17 PM Damien Le Moal wrote:
>>
>> On 2021/01/04 19:48, SelvaKumar S wrote:
>>> Add new BLKCOPY ioctl that offloads copying of one or more sources
>>>
opy */
I think this should be called QUEUE_FLAG_SIMPLE_COPY to indicate more precisely
the type of copy supported. SCSI XCOPY is more advanced...
>
> #define QUEUE_FLAG_MQ_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) |
> \
>(1 <&l
> extern int blk_rq_map_user_iov(struct request_queue *, struct request *,
> struct rq_map_data *, const struct iov_iter *,
>
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
tristate "Drive-managed zoned block device target support"
> depends on BLK_DEV_DM
> depends on BLK_DEV_ZONED
> + select CRC32
> help
> This device-mapper target takes a host-managed or host-aware zoned
> block device and exposes mo
Integrating nvme simple copy in such initial support would I think be quite
simple and scsi xcopy can follow. From there, adding stack device support can be
worked on with little, if any, impact on the existing users of the block copy
API (mostly FSes such as f2fs and btrfs).
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
On 2020/12/07 17:16, javier.g...@samsung.com wrote:
> On 07.12.2020 08:06, Damien Le Moal wrote:
>> On 2020/12/07 16:46, javier.g...@samsung.com wrote:
>>> On 04.12.2020 23:40, Keith Busch wrote:
>>>> On Fri, Dec 04, 2020 at 11:25:12AM +, Damien Le Moal wr
On 2020/12/07 16:46, javier.g...@samsung.com wrote:
> On 04.12.2020 23:40, Keith Busch wrote:
>> On Fri, Dec 04, 2020 at 11:25:12AM +0000, Damien Le Moal wrote:
>>> On 2020/12/04 20:02, SelvaKumar S wrote:
>>>> This patchset tries to add support for
t; drivers/nvme/host/core.c | 87 +++
> include/linux/bio.h | 1 +
> include/linux/blk_types.h | 15 +
> include/linux/blkdev.h| 15 +
> include/linux/nvme.h | 43 -
> include/uapi/linux/fs.h | 13
> 14 files changed, 461 insertions(+), 11 deletions(-)
>
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
ot need to be
>> splitted further from all lower layer at all. But there should be exceptions
>> in unusual case, such as, lowering queue's limit changed after the stacking
>> limits are setup.
>>
>> 3) history reason, bio splitting is much younger than stacking queue
&
izeof(r), , blk_trace_request_get_cgid(rq));
> rcu_read_unlock();
> }
>
> /**
> * blk_add_driver_data - Add binary message with driver-specific data
> - * @q: queue the io is for
> * @rq: io request
> * @data:driver-specific data
> * @len: len
e/blktrace.c
> +++ b/kernel/trace/blktrace.c
> @@ -993,20 +993,16 @@ static void blk_add_trace_split(void *ignore, struct
> bio *bio, unsigned int pdu)
> /**
> * blk_add_trace_bio_remap - Add a trace for a bio-remap operation
> * @ignore: trace callback data parameter (not use
t; - struct request_queue *q, struct bio *bio,
> - unsigned int pdu)
> +static void blk_add_trace_split(void *ignore, struct bio *bio, unsigned int
> pdu)
> {
> + struct request_queue *q = bio->bi_disk->queue;
> struct blk_trace *bt;
>
> rcu_read_lock();
>
Looks good.
Reviewed-by: Damien Le Moal
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
> - struct bio *bio)
> +static void blk_add_trace_bio_frontmerge(void *ignore, struct bio *bio)
> {
> - blk_add_trace_bio(q, bio, BLK_TA_FRONTMERGE, 0);
> + blk_add_trace_bio(bio->bi_disk->queue, bio, BLK_TA_FRONTMERGE, 0);
> }
>
> -static
_block_unplug(blk_add_trace_unplug, NULL);
> unregister_trace_block_plug(blk_add_trace_plug, NULL);
> - unregister_trace_block_sleeprq(blk_add_trace_sleeprq, NULL);
> unregister_trace_block_getrq(blk_add_trace_getrq, NULL);
> unregister_trace_block_bio_queue(blk_add_trace_
me/host/core.c | 91 ++
> drivers/nvme/host/nvme.h | 4 ++
> include/linux/bio.h | 1 +
> include/linux/blk_types.h | 7 +++
> include/linux/blkdev.h| 15 +
> include/linux/nvme.h | 45 +--
> include/uapi/linux/
his in crypt_convert_block_skcipher():
>
> Add a check that looks at the alignment requirement of the low-level driver
> and reject the I/O if it doesn't meet that requirement. This means, we still
> need to handle the case in this function where the low lever driver support
> unaligned buffer lengths, that means, my other changes in this function
> would still be needed.
>
> Is this acceptable to everyone?
>
> -Sudhakar
>
>>
>> Mikulas
>>
>> --
>> dm-devel mailing list
>> dm-devel@redhat.com
>> https://www.redhat.com/mailman/listinfo/dm-devel
>>
>
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
On 2020/09/15 10:10, Damien Le Moal wrote:
> On 2020/09/15 0:04, Mike Snitzer wrote:
>> On Sun, Sep 13 2020 at 8:46pm -0400,
>> Damien Le Moal wrote:
>>
>>> On 2020/09/12 6:53, Mike Snitzer wrote:
>>>> blk_queue_get_max_sector
On 2020/09/15 11:04, Ming Lei wrote:
> On Mon, Sep 14, 2020 at 12:43:06AM +0000, Damien Le Moal wrote:
>> On 2020/09/12 22:53, Ming Lei wrote:
>>> On Fri, Sep 11, 2020 at 05:53:36PM -0400, Mike Snitzer wrote:
>>>> blk_queue_get_max_sectors() has been
On 2020/09/15 0:04, Mike Snitzer wrote:
> On Sun, Sep 13 2020 at 8:46pm -0400,
> Damien Le Moal wrote:
>
>> On 2020/09/12 6:53, Mike Snitzer wrote:
>>> blk_queue_get_max_sectors() has been trained for REQ_OP_WRITE_SAME and
>>> REQ_OP_WRITE_ZEROES yet blk
gt; + chunk_sectors -= (offset & (chunk_sectors - 1));
I do not think you need the outer parenthesis here.
> + else
> + chunk_sectors -= sector_div(offset, chunk_sectors);
> +
> + return min(q->limits.max_sectors, chunk_sectors);
> }
>
> static inline unsigned int blk_rq_get_max_sectors(struct request *rq,
>
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
nk_sectors for stride size,
no ?)
As mentioned in my reply to Ming's email, this will allow these commands to
potentially cross over zone boundaries on zoned block devices, which would be an
immediate command failure.
> +
> + return min(blk_max_size_offset(q, offset), max_sectors);
> }
&
:
>> +case REQ_OP_WRITE_ZEROES:
>> +return max_sectors;
>> +}>> +
>> +return min(blk_max_size_offset(q, offset), max_sectors);
>> }
>
> It depends if offset & chunk_sectors limit for WRITE_SAME & WRITE_ZEROS
> needs to be
r for Bitlocker
compatibility")
Cc: sta...@vger.kernel.org
Signed-off-by: Damien Le Moal
---
drivers/md/dm-crypt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index 238cd80826a6..380386c36921 100644
--- a/drivers/md/dm-cryp
On 2020/08/24 15:46, Milan Broz wrote:
> On 24/08/2020 03:15, Damien Le Moal wrote:
>> On 2020/08/21 2:46, Milan Broz wrote:
>>> Patch 39d42fa96ba1b7d2544db3f8ed5da8fb0d5cb877 introduced new dm-crypt
>>> no_read_workqueue and no_write_workqueue flags.
>>>
r host-managed zoned block devices (e.g.
host-managed SMR hard-disks).
Thanks !
> +
> integrity::
> The device requires additional metadata per-sector stored
> in per-bio integrity structure. This metadata must by provided
>
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
gt->type->report_zones(tgt, , nr_zones);
> + ret = tgt->type->report_zones(tgt, ,
> + nr_zones - args.zone_idx);
> if (ret < 0)
> goto out;
> } while (args.zone_idx < nr_zones &&
>
multi device setup (from dm-5.9
tree). No problems detected.
Tested-by: Damien Le Moal
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
eue_limits *b,
> sector_t offset);
> extern void disk_stack_limits(struct gendisk *disk, struct block_device
> *bdev,
> sector_t offset);
> -extern void blk_queue_stack_limits(struct request_queue *t, struct
> request_queue *b);
lock_device
> *bdev,
> - sector_t offset);
> extern void disk_stack_limits(struct gendisk *disk, struct block_device
> *bdev,
> sector_t offset);
> extern void blk_queue_stack_limits(struct request_queue *t, struct
> request_queue *b);
>
Looks good.
Reviewed-by: Damien Le Moal
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
ictions for the inheritance in blk_stack_limits() to work.
> */
> enum blk_zoned_model {
> - BLK_ZONED_NONE, /* Regular block device */
> - BLK_ZONED_HA, /* Host-aware zoned block device */
> - BLK_ZONED_HM, /* Host-managed zoned block device */
> + BLK_ZONED_
compiling with W-1.
Signed-off-by: Damien Le Moal
---
drivers/md/dm-ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index 489935d5f22d..5792878dbff6 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -1168,7
In super_init_validation(), remove a body-less if statement testing only
variables to avoid a compilation warning when compiling with W=1.
Signed-off-by: Damien Le Moal
---
drivers/md/dm-raid.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
.
Damien Le Moal (4):
dm verity: Fix compilation warning
dm raid: Remove empty if statement
dm ioctl: Fix compilation warning
dm init: Set file local variable static
drivers/md/dm-init.c | 2 +-
drivers/md/dm-ioctl.c | 2 +-
drivers/md/dm-raid.c | 2
Declare dm_allowed_targets as static to avoid the warning:
drivers/md/dm-init.c:39:12: warning: symbol 'dm_allowed_targets' was
not declared. Should it be static?
when compiling with C=1.
Signed-off-by: Damien Le Moal
---
drivers/md/dm-init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
compiling with W=1.
Signed-off-by: Damien Le Moal
---
drivers/md/dm-verity-verify-sig.h | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/md/dm-verity-verify-sig.h
b/drivers/md/dm-verity-verify-sig.h
index 19b1547aa741..3987c7141f79 100644
--- a/drivers/md
On 2020/07/15 22:43, Mike Snitzer wrote:
> On Wed, Jul 15 2020 at 5:52am -0400,
> Damien Le Moal wrote:
>
>> Mike,
>>
>> These patches fix various compilation warnings showing up when compiling
>> with W=1. The last patch addresses a static checker warning (C=1
result,
avoiding triggering another warning as the function is declared
as 'warn_unused_result'.
Signed-off-by: Damien Le Moal
---
drivers/md/md.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index f567f536b529..f6c83483a5a2
Declare dm_allowed_targets as static to avoid the warning:
drivers/md/dm-init.c:39:12: warning: symbol 'dm_allowed_targets' was
not declared. Should it be static?
when compiling with C=1.
Signed-off-by: Damien Le Moal
---
drivers/md/dm-init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
Remove the if statement around the calls to sysfs_link_rdev() to avoid
the compilation warning "suggest braces around empty body in an ‘if’
statement" when compiling with W=1.
Also fix function description comments to avoid kdoc format warnings.
Signed-off-by: Damien Le Moal
---
compiling with W=1.
Signed-off-by: Damien Le Moal
---
drivers/md/dm-verity-verify-sig.h | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/md/dm-verity-verify-sig.h
b/drivers/md/dm-verity-verify-sig.h
index 19b1547aa741..3987c7141f79 100644
--- a/drivers/md
.
Damien Le Moal (8):
dm raid5: Remove set but unused variable
dm raid5: Fix compilation warning
md: Fix compilation warning
dm raid10: Fix compilation warning
dm verity: Fix compilation warning
dm raid: Remove empty if statement
dm ioctl: Fix compilation warning
dm init: Set file local
compiling with W-1.
Signed-off-by: Damien Le Moal
---
drivers/md/dm-ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index 489935d5f22d..5792878dbff6 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -1168,7
Remove the variable offset in r5c_tree_index() to avoid a "set but not
used" compilation warning when compiling with W=1.
Signed-off-by: Damien Le Moal
---
drivers/md/raid5-cache.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/md/raid5-cache.c b/driver
In super_init_validation(), remove a body-less if statement testing only
variables to avoid a compilation warning when compiling with W=1.
Signed-off-by: Damien Le Moal
---
drivers/md/dm-raid.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
Remove the if statement around the call to sysfs_link_rdev() in
raid10_start_reshape() to avoid the compilation warning:
warning: suggest braces around empty body in an ‘if’ statement
when compiling with W=1.
Signed-off-by: Damien Le Moal
---
drivers/md/raid10.c | 4 ++--
1 file changed, 2
101 - 200 of 527 matches
Mail list logo