On 10/25/23 14:22, Naohiro Aota wrote:
> On Tue, Oct 24, 2023 at 07:45:13AM +0900, Damien Le Moal wrote:
>> dm-error is used in several test cases in the xfstests test suite to
>> check the handling of IO errors in file syatems. Howeve
() is also changed to return true.
Signed-off-by: Damien Le Moal
---
drivers/md/dm-table.c | 3 +++
drivers/md/dm-target.c | 42 --
drivers/md/dm-zone.c | 9 +
3 files changed, 52 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm-table.c b
re code in many places instead of less code + a simple
inline helper in the shrinker header file... So not adding that super simple
helper is not exactly the best choice in my opinion.
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
d 100644
> --- a/include/linux/blk_types.h
> +++ b/include/linux/blk_types.h
> @@ -562,4 +562,9 @@ struct cio {
> atomic_t refcount;
> };
>
> +struct copy_ctx {
> + struct cio *cio;
> + struct work_struct dispatch_work;
> + struct bio *write_bio;
> +};
> #endif /* __LINUX_BLK_TYPES_H */
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index 963f5c97dec0..c176bf6173c5 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -1047,6 +1047,9 @@ ssize_t blkdev_copy_offload(
> struct block_device *bdev_in, loff_t pos_in,
> struct block_device *bdev_out, loff_t pos_out,
> size_t len, cio_iodone_t end_io, void *private, gfp_t gfp_mask);
> +struct bio *bio_map_kern(struct request_queue *q, void *data, unsigned int
> len,
> + gfp_t gfp_mask);
> +void bio_map_kern_endio(struct bio *bio);
>
> #define BLKDEV_ZERO_NOUNMAP (1 << 0) /* do not free blocks */
> #define BLKDEV_ZERO_NOFALLBACK (1 << 1) /* don't write explicit
> zeroes */
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
+extern void blk_queue_max_copy_sectors_hw(struct request_queue *q,
> + unsigned int max_copy_sectors);
> void blk_queue_max_secure_erase_sectors(struct request_queue *q,
> unsigned int max_sectors);
> extern void blk_queue_max_segment_size(struct request_queue
nux/blkdev.h
> index c176bf6173c5..850168cad080 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -1047,6 +1047,10 @@ ssize_t blkdev_copy_offload(
> struct block_device *bdev_in, loff_t pos_in,
> struct block_device *bdev_out, loff_t
_MASK) == REQ_OP_COPY_SRC) ||
> + ((op & REQ_OP_MASK) == REQ_OP_COPY_DST));
> +}
> +
> /*
> * Check if the bio or request is one that needs special treatment in the
> * flush state machine.
> @@ -541,4 +550,16 @@ struct blk_rq_stat {
> u64 batch;
> };
>
> +
ed int max_copy_sectors);
> void blk_queue_max_secure_erase_sectors(struct request_queue *q,
> unsigned int max_sectors);
> extern void blk_queue_max_segment_size(struct request_queue *, unsigned int);
> @@ -1218,6 +1225,11 @@ static inline unsigned int
> bdev_discard_g
0
>> root 1413640 0.0 0.0 13972 2496 pts/0S+ 01:31 0:00
>> grep mkfs.ext4
>>
>> root@smr_dev:~# cat /proc/1411791/stack
>> [<0>] wait_on_page_bit+0x133/0x270
>> [<0>] wait_on_page_writeback+0x25/0x70
>> [<0>] __filemap_fdatawait_ra
On 3/30/23 09:17, Yang Shi wrote:
> On Wed, Mar 29, 2023 at 4:49 PM Damien Le Moal
> wrote:
>>
>> On 3/30/23 02:06, Johannes Thumshirn wrote:
>>> Check if adding pages to clone bio fails and if bail out.
>>
>> Nope. The code retries with direct r
On 3/30/23 02:06, Johannes Thumshirn wrote:
> Now that all users of bio_add_page check for the return value, mark
> bio_add_page as __must_check.
>
> Signed-off-by: Johannes Thumshirn
Reviewed-by: Damien Le Moal
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing l
annes Thumshirn
With the commit message fixed,
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
;*/
> - bio_add_page(bio, page, len, 0);
> + if (WARN_ON(!bio_add_page(bio, page, len, 0))) {
Not sure we really need the WARN_ON here...
Nevertheless,
Reviewed-by: Damien Le Moal
> + bio->bi_status = BLK_STS_RE
ranteed to succeed.
>
> This brings us a step closer to marking bio_add_page() as __must_check.
>
> Signed-off-by: Johannes Thumshirn
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
gned-off-by: Johannes Thumshirn
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
teed to succeed.
>
> This brings us a step closer to marking bio_add_page() as __must_check.
>
> Signed-off-by: Johannes Thumshirn
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
ranteed to succeed.
>
> This brings us a step closer to marking bio_add_page() as __must_check.
>
> Signed-off-by: Johannes Thumshirn
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
is
> guaranteed to succeed.
>
> This brings us a step closer to marking bio_add_page() as __must_check.
>
> Signed-off-by: Johannes Thumshirn
Acked-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
is
> guaranteed to succeed.
>
> This brings us a step closer to marking bio_add_page() as __must_check.
>
> Signed-off-by: Johannes Thumshirn
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
teed to succeed.
>
> This brings us a step closer to marking bio_add_page() as __must_check.
>
> Signed-off-by: Johannes Thumshirn
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
wly created bio is
> guaranteed to succeed.
>
> This brings us a step closer to marking bio_add_page() as __must_check.
>
> Signed-off-by: Johannes Thumshirn
Reviewed-by: Damien Le Moal
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.
is
> guaranteed to succeed.
>
> This brings us a step closer to marking bio_add_page() as __must_check.
>
> Signed-off-by: Johannes Thumshirn
Reviewed-by: Damien Le Moal
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.
is allocated if adding the page fails.
>
> Use __bio_add_page() as adding a single page to a newly created bio is
> guaranteed to succeed.
>
> This brings us a step closer to marking bio_add_page() as __must_check.
>
> Signed-off-by: Johannes Thumshirn
Reviewed-by: Damien Le
is
> guaranteed to succeed.
>
> This brings us a step closer to marking bio_add_page() as __must_check.
>
> Signed-of_-by: Johannes Thumshirn
Reviewed-by: Damien Le Moal
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.
wly created bio is
> guaranteed to succeed.
>
> This brings us a step closer to marking bio_add_page() as __must_check.
>
> Signed-off-by: Johannes Thumshirn
Reviewed-by: Damien Le Moal
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.
tep closer to marking bio_add_page() __must_check
>
> Signed-off-by: Johannes Thumshirn
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
is
> guaranteed to succeed.
>
> This brings us a step closer to marking bio_add_page() as __must_check.
>
> Signed-off-by: Johannes Thumshirn
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
gned-off-by: Johannes Thumshirn
With Matthew comment addressed,
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
gned-off-by: Johannes Thumshirn
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
Copy
>>> + requests issued to the device must not exceed this limit.
>>> + A value of 0 means that the device does not
>>> + support copy offload.
>>
>> [RO] This is the maximum number of kilobytes supported in a
>>
On 3/27/23 17:40, Anuj Gupta wrote:
> From: Nitesh Shetty
>
> Implementaion is based on existing read and write infrastructure.
>
> Suggested-by: Damien Le Moal
> Signed-off-by: Anuj Gupta
> Signed-off-by: Nitesh Shetty
> Signed-off-by: Vincent Fu
> ---
>
stance (verified in dm_poll_dm_io)
> diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
> index 7975483816e4..44969a20295e 100644
> --- a/include/linux/device-mapper.h
> +++ b/include/linux/device-mapper.h
> @@ -380,6 +380,11 @@ struct dm_target {
>
ct blk_rq_stat {
> u64 batch;
> };
>
> +typedef void (cio_iodone_t)(void *private, int comp_len);
Not really needed I think.
> +
> +struct cio {
> + struct task_struct *waiter; /* waiting task (NULL if none) */
> + atomic_t refcount;
> + loff_t p
ors: maximum number of sectors to copy
> + **/
> +void blk_queue_max_copy_sectors_hw(struct request_queue *q,
> + unsigned int max_copy_sectors)
> +{
> + if (max_copy_sectors >= MAX_COPY_TOTAL_LENGTH)
Confusing name as LENGTH may be interpreted as bytes. MAX_COPY
dex 1dbe78119ff1..703bc4505b29 100644
> --- a/fs/zonefs/zonefs.h
> +++ b/fs/zonefs/zonefs.h
> @@ -179,7 +179,6 @@ struct zonefs_sb_info {
> kgid_t s_gid;
> umode_t s_perm;
> uuid_t s_uuid;
> - unsigned ints_zone_sectors_shift;
>
> unsigned ints_nr_files[ZONEFS_ZTYPE_MAX];
>
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
let's us
> make modifications to the math if needed in one place.
>
> Signed-off-by: Pankaj Raghav
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
eue(bdev));
> }
>
> static inline bool bdev_op_is_zoned_write(struct block_device *bdev,
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
if (!bdev_is_zoned(bdev))
> + return false;
Same here.
> +
> + return bdev_offset_from_zone_start(bdev, sec) == 0;
> +}
> +
> static inline int queue_dma_alignment(const struct request_queue *q)
> {
> return q ? q->limits.dma_alignment : 511;
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
On 11/30/22 13:17, Nitesh Shetty wrote:
> On Wed, Nov 30, 2022 at 08:45:55AM +0900, Damien Le Moal wrote:
>> On 11/29/22 21:22, Nitesh Shetty wrote:
>>> Acked. I do see a gap in current zonefs cfr implementation. I will drop this
>>
>> cfr ?
>>
>
> yes,
k you,
> Nitesh
Please trim your replies.
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
On 11/24/22 10:32, Damien Le Moal wrote:
> On 11/23/22 14:58, Nitesh Shetty wrote:
>> copy_file_range is implemented using copy offload,
>> copy offloading to device is always enabled.
>> To disable copy offloading mount with "no_copy_offload" mount option.
>
flags);
> + return ret;
> +}
> +
> static const struct file_operations zonefs_file_operations = {
> .open = zonefs_file_open,
> .release= zonefs_file_release,
> @@ -1234,6 +1411,7 @@ static const struct file_operations
> zonefs_file_operations = {
> .splice_read= generic_file_splice_read,
> .splice_write = iter_file_splice_write,
> .iopoll = iocb_bio_iopoll,
> + .copy_file_range = zonefs_copy_file_range,
> };
>
> static struct kmem_cache *zonefs_inode_cachep;
> @@ -1804,6 +1982,7 @@ static int zonefs_fill_super(struct super_block *sb,
> void *data, int silent)
> atomic_set(>s_active_seq_files, 0);
> sbi->s_max_active_seq_files = bdev_max_active_zones(sb->s_bdev);
>
> + /* set copy support by default */
What is this comment supposed to be for ?
> ret = zonefs_read_super(sb);
> if (ret)
> return ret;
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
e any extent span zone boundaries. So personally, I do not
consider such argument as a valid justification for the non-power-of-2
zone size support.
>
> Thanks,
>
> Bart.
>
>
--
Damien Le Moal
Western Digital Research
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
On 9/23/22 04:37, Mike Snitzer wrote:
> On Wed, Sep 21 2022 at 7:55P -0400,
> Damien Le Moal wrote:
>
>> On 9/22/22 02:27, Mike Snitzer wrote:
>>> On Tue, Sep 20 2022 at 5:11P -0400,
>>> Pankaj Raghav wrote:
>>>
>>>> - Background and
l evaluating its potential use cases. We also have a different but
functionally equivalent approach implemented as a block device driver that
we are evaluating internally.
Given the above mentioned usage pattern we have seen so far for zoned
storage, it is not yet clear if something like dm-zap for ZNS is neede
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
using memalloc_noio_save/restore calls.
Reported-by: Dan Carpenter
Fixes: bb37d77239af ("dm: introduce zone append emulation")
Signed-off-by: Damien Le Moal
---
drivers/md/dm-zone.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm-zone.c b/
On 2021/06/04 23:56, Mike Snitzer wrote:
> On Tue, May 25 2021 at 5:24P -0400,
> Damien Le Moal wrote:
>
>> A target map method requesting the requeue of a bio with
>> DM_MAPIO_REQUEUE or completing it with DM_ENDIO_REQUEUE can cause
>> unaligned write errors if t
From: Damien Le Moal
In dm_io_dec_pending(), make sure that the bio variable is initialized
to io->orig_bio before using it.
Reported-by: kernel test robot
Fixes: 3a1e343c53ae ("dm: Forbid requeue of writes to zones")
Signed-off-by: Damien Le Moal
---
drivers/md/dm.c | 4 ++--
1
On 2021/06/04 7:17, Colin Ian King wrote:
> Hi,
>
> Static analysis with Coverity on Linux next has found and issue in
> drivers/md/dm.c with the following commit:
>
> commit 2c243153d1d4be4e23735cd10984ac17c7a54531
> Author: Damien Le Moal
> Date: Wed May 26 06:24:5
On 2021/06/04 7:16, Mike Snitzer wrote:
> On Thu, Jun 03 2021 at 1:46P -0400,
> Jens Axboe wrote:
>
>> On 6/2/21 12:32 PM, Mike Snitzer wrote:
>>> On Tue, Jun 01 2021 at 6:57P -0400,
>>> Damien Le Moal wrote:
>>>
>>>> On 2021/05/26 6:25,
* without REQ_PREFLUSH.
>874 */
>875bio->bi_opf &= ~REQ_PREFLUSH;
>876queue_io(md, bio);
>877} else {
>878 /*
On 2021/05/26 6:25, Damien Le Moal wrote:
> This series improve device mapper support for zoned block devices and
> of targets exposing a zoned device.
Mike, Jens,
Any feedback regarding this series ?
>
> The first patch improve support for user requests to reset all zones of
On 2021/05/19 10:26, Damien Le Moal wrote:
> The dm-zoned target cannot support zoned block devices with zones that
> have a capacity smaller than the zone size (e.g. NVMe zoned namespaces)
> due to the current chunk zone mapping implementation as it is assumed
> that zones and
On 2021/05/26 23:16, Mikulas Patocka wrote:
>
>
> On Tue, 25 May 2021, Damien Le Moal wrote:
>
>> On 2021/05/26 4:50, Mikulas Patocka wrote:
>>> The functions set_bit and clear_bit are atomic. We don't need atomicity
>>> when making flags for dm-kcopyd. So
ed-off-by: Mikulas Patocka
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
< end_block) {
> if (src_zone->dev->flags & DMZ_BDEV_DYING)
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://listman.redhat.com/mailman/listinfo/dm-devel
Either way, looks fine 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
request queue zone attributes in
dm_table_set_restrictions().
Signed-off-by: Damien Le Moal
Reviewed-by: Johannes Thumshirn
Reviewed-by: Hannes Reinecke
Reviewed-by: Himanshu Madhani
---
drivers/md/Makefile | 4 ++
drivers/md/dm-table.c | 14 ++
drivers/md/dm-zone.c | 102
to remove the request_queue
argument
* Improve patch 3 commit message as suggested by Christoph (explaining
that the flag is a special case that cannot use a REQ_XXX flag)
* Changed DMWARN() into DMDEBUG in patch 11 as suggested by Milan
* Added reviewed-by tags
Damien Le Moal (11):
block
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
() calls to make the
code more legible.
Signed-off-by: Damien Le Moal
---
drivers/md/dm.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index ca2aedd8ee7d..11af20080639 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1237,8 +1237,8
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
Reviewed-by: Himanshu Madhani
---
drivers/md/dm-core.h | 13 +
drivers
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
Reviewed-by: Hannes Reinecke
Reviewed-by: Christoph Hellwig
Reviewed-by: Himanshu Madhani
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
Reviewed-by: Hannes Reinecke
Reviewed-by: Himanshu Madhani
---
drivers/md/dm-core.h | 52 ++
drivers/md/dm.c | 59
. 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
Reviewed-by: Hannes Reinecke
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Himanshu Madhani
---
include/linux/blk_types.h | 1 +
1 file
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
Reviewed-by: Hannes Reinecke
Reviewed-by: Himanshu Madhani
---
drivers/md/dm-crypt.c | 7 +++
drivers/md/dm-flakey.c
. 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
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
On 2021/05/25 15:15, Chaitanya Kulkarni wrote:
> On 5/24/21 7:25 PM, Damien Le Moal wrote:
>> SCSI, ZNS and null_blk zoned devices support resetting all zones using
>> a single command (REQ_OP_ZONE_RESET_ALL), as indicated using the device
>> request queue flag QUEUE_FLAG_ZON
. 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
Reviewed-by: Hannes Reinecke
Reviewed-by: Chaitanya Kulkarni
---
include/linux/blk_types.h | 1 +
1 file changed, 1 insertion(+)
diff
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
Reviewed-by: Hannes Reinecke
---
drivers/md/dm-table.c | 2 +-
1 file changed, 1 insertion(+), 1
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
Reviewed-by: Hannes Reinecke
---
drivers/md/dm-crypt.c | 7 +++
drivers/md/dm-flakey.c| 7 +++
drivers/md/dm
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
Reviewed-by: Hannes Reinecke
---
drivers/md/dm-core.h | 52 ++
drivers/md/dm.c | 59
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 | 13 +
drivers/md/dm-table.c | 19
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
() calls to make the
code more legible.
Signed-off-by: Damien Le Moal
Reviewed-by: Johannes Thumshirn
Reviewed-by: Hannes Reinecke
---
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
request queue zone attributes in
dm_table_set_restrictions().
Signed-off-by: Damien Le Moal
Reviewed-by: Johannes Thumshirn
Reviewed-by: Hannes Reinecke
---
drivers/md/Makefile | 4 ++
drivers/md/dm-table.c | 14 ++
drivers/md/dm-zone.c | 102
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
. 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
)
* Changed DMWARN() into DMDEBUG 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
() calls to make the
code more legible.
Signed-off-by: Damien Le Moal
Reviewed-by: Johannes Thumshirn
Reviewed-by: Hannes Reinecke
---
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
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
Reviewed-by: Hannes Reinecke
---
drivers/md/dm-table.c | 2 +-
1 file changed, 1 insertion(+), 1
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
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
Reviewed-by: Hannes Reinecke
---
drivers/md/dm-core.h | 52 ++
drivers/md/dm.c | 59
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 | 13 +
drivers/md/dm-table.c | 19
. 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
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
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
Reviewed-by: Hannes Reinecke
---
drivers/md/dm-crypt.c | 7 +++
drivers/md/dm-flakey.c| 7 +++
drivers/md/dm
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
argument
* Improve patch 3 commit message as suggested by Christoph (explaining
that the flag is a special case that cannot use a REQ_XXX flag)
* Changed DMWARN() into DMDEBUG in patch 11 as suggested by Milan
* Added reviewed-by tags
Damien Le Moal (11):
block: improve handling of all zones
request queue zone attributes in
dm_table_set_restrictions().
Signed-off-by: Damien Le Moal
Reviewed-by: Johannes Thumshirn
Reviewed-by: Hannes Reinecke
---
drivers/md/Makefile | 4 ++
drivers/md/dm-table.c | 14 ++
drivers/md/dm-zone.c | 102
. 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
Reviewed-by: Hannes Reinecke
---
include/linux/blk_types.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/blk_types.h
On 2021/05/20 15:47, Hannes Reinecke wrote:
> On 5/20/21 8:25 AM, Damien Le Moal wrote:
>> On 2021/05/20 15:10, Hannes Reinecke wrote:
>> [...]
>>>> +/*
>>>> + * First phase of BIO mapping for targets with zone append emulation:
>>>> + * check a
*/
>> +if (!bio_flagged(clone, BIO_ZONE_WRITE_LOCKED))
>> +return;
>> +
>> +zno = bio_zone_no(orig_bio);
>> +
>> +spin_lock_irqsave(>zwp_offset_lock, flags);
>> +if (clone->bi_status != BLK_STS_OK) {
>> + /*
>> + * BIOs t
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
() calls to make the
code more legible.
Signed-off-by: Damien Le Moal
Reviewed-by: Johannes Thumshirn
---
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
request queue zone attributes in
dm_table_set_restrictions().
Signed-off-by: Damien Le Moal
Reviewed-by: Johannes Thumshirn
---
drivers/md/Makefile | 4 ++
drivers/md/dm-table.c | 14 ++
drivers/md/dm-zone.c | 102 ++
drivers/md/dm.c | 78
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
1 - 100 of 527 matches
Mail list logo