On 5/21/21 1:51 PM, Christoph Hellwig wrote:
> Convert the bcache driver to use the blk_alloc_disk and blk_cleanup_disk
> helpers to simplify gendisk and request_queue allocation.
>
> Signed-off-by: Christoph Hellwig
> ---
> drivers/md/bcache/super.c | 15 ---
> 1 file changed, 4 ins
On Fri, May 21, 2021 at 02:15:32PM +0800, Coly Li wrote:
> The above 2 lines are added on purpose to prevent an refcount
> underflow. It is from commit 86da9f736740 ("bcache: fix refcount
> underflow in bcache_device_free()").
>
> Maybe add a parameter to blk_cleanup_disk() or checking (disk->fla
Hi all,
this series is the first part of cleaning up lifetimes and allocation of
the gendisk and request_queue structure. It adds a new interface to
allocate the disk and queue together for bio based drivers, and a helper
for cleanup/free them when a driver is unloaded or a device is removed.
To
Add a flag to indicate that __device_add_disk did grab a queue reference
so that disk_release only drops it if we actually had it. This sort
out one of the major pitfals with partially initialized gendisk that
a lot of drivers did get wrong or still do.
Signed-off-by: Christoph Hellwig
---
bloc
Hi all,
this series is the first part of cleaning up lifetimes and allocation of
the gendisk and request_queue structure. It adds a new interface to
allocate the disk and queue together for bio based drivers, and a helper
for cleanup/free them when a driver is unloaded or a device is removed.
To
Convert the bcache driver to use the blk_alloc_disk and blk_cleanup_disk
helpers to simplify gendisk and request_queue allocation.
Signed-off-by: Christoph Hellwig
---
drivers/md/bcache/super.c | 15 ---
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/drivers/md/bcache
Keep this together with the first place that actually looks at
->minors and prepare for not passing a minors argument to
alloc_disk.
Signed-off-by: Christoph Hellwig
---
block/genhd.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/block/genhd.c b/block/genhd.c
Convert the nvdimm-blk driver to use the blk_alloc_disk and
blk_cleanup_disk helpers to simplify gendisk and request_queue
allocation.
Signed-off-by: Christoph Hellwig
---
drivers/nvdimm/blk.c | 26 ++
1 file changed, 6 insertions(+), 20 deletions(-)
diff --git a/drivers
Convert the rsxx driver to use the blk_alloc_disk and blk_cleanup_disk
helpers to simplify gendisk and request_queue allocation.
Signed-off-by: Christoph Hellwig
---
drivers/block/rsxx/dev.c | 39 +-
drivers/block/rsxx/rsxx_priv.h | 1 -
2 files changed, 15
Convert the lightnvm driver to use the blk_alloc_disk and blk_cleanup_disk
helpers to simplify gendisk and request_queue allocation.
Signed-off-by: Christoph Hellwig
---
drivers/lightnvm/core.c | 23 +--
1 file changed, 5 insertions(+), 18 deletions(-)
diff --git a/drivers/l
Convert the dm driver to use the blk_alloc_disk and blk_cleanup_disk
helpers to simplify gendisk and request_queue allocation.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm.c | 16 +++-
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm
Convert the nvdimm-btt driver to use the blk_alloc_disk and
blk_cleanup_disk helpers to simplify gendisk and request_queue
allocation.
Signed-off-by: Christoph Hellwig
---
drivers/nvdimm/btt.c | 24 +++-
drivers/nvdimm/btt.h | 2 --
2 files changed, 7 insertions(+), 19 delet
Convert the zram driver to use the blk_alloc_disk and blk_cleanup_disk
helpers to simplify gendisk and request_queue allocation.
Signed-off-by: Christoph Hellwig
---
drivers/block/zram/zram_drv.c | 19 ---
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/drivers/blo
Convert the drbd driver to use the blk_alloc_disk and blk_cleanup_disk
helpers to simplify gendisk and request_queue allocation.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_main.c | 23 ---
1 file changed, 8 insertions(+), 15 deletions(-)
diff --git a/driver
Add two new APIs to allocate and free a gendisk including the
request_queue for use with BIO based drivers. This is to avoid
boilerplate code in drivers.
Signed-off-by: Christoph Hellwig
---
block/genhd.c | 35 +++
include/linux/genhd.h | 22 +
Untangle the mess around blk_alloc_devt by moving the check for
the used allocation scheme into the callers.
Signed-off-by: Christoph Hellwig
---
block/blk.h | 4 +-
block/genhd.c | 96 -
block/partitions/core.c | 15 +--
3 files
Convert the md driver to use the blk_alloc_disk and blk_cleanup_disk
helpers to simplify gendisk and request_queue allocation.
Signed-off-by: Christoph Hellwig
---
drivers/md/md.c | 25 +
1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/drivers/md/md.c b/dri
Convert the brd driver to use the blk_alloc_disk and blk_cleanup_disk
helpers to simplify gendisk and request_queue allocation. This also
allows to remove the request_queue pointer in struct request_queue,
and to simplify the initialization as blk_cleanup_disk can be called
on any disk returned fr
Automatically set the GENHD_FL_EXT_DEVT flag for all disks allocated
without an explicit number of minors. This is what all new block
drivers should do, so make sure it is the default without boilerplate
code.
Signed-off-by: Christoph Hellwig
---
block/genhd.c| 2 +-
block/p
Convert the pktcdvd driver to use the blk_alloc_disk and blk_cleanup_disk
helpers to simplify gendisk and request_queue allocation.
Signed-off-by: Christoph Hellwig
---
drivers/block/pktcdvd.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/block/pktcdvd.c
blk_alloc_queue is just an internal helper now, unexport it and remove
it from the public header.
Signed-off-by: Christoph Hellwig
---
block/blk-core.c | 1 -
block/blk.h| 2 ++
include/linux/blkdev.h | 1 -
3 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/b
Convert the xpram driver to use the blk_alloc_disk and blk_cleanup_disk
helpers to simplify gendisk and request_queue allocation.
Signed-off-by: Christoph Hellwig
---
drivers/s390/block/xpram.c | 26 +-
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git a/driver
Convert the null_blk driver to use the blk_alloc_disk and blk_cleanup_disk
helpers to simplify gendisk and request_queue allocation. Note that the
blk-mq mode is left with its own allocations scheme, to be handled later.
Signed-off-by: Christoph Hellwig
---
drivers/block/null_blk/main.c | 38 ++
Convert the dcssblk driver to use the blk_alloc_disk and blk_cleanup_disk
helpers to simplify gendisk and request_queue allocation.
Signed-off-by: Christoph Hellwig
---
drivers/s390/block/dcssblk.c | 26 --
1 file changed, 8 insertions(+), 18 deletions(-)
diff --git a/dr
Convert the n64cart driver to use the blk_alloc_disk helper to simplify
gendisk and request_queue allocation.
Signed-off-by: Christoph Hellwig
---
drivers/block/n64cart.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/block/n64cart.c b/drivers/block/n64cart.c
in
Convert the nvme-multipath driver to use the blk_alloc_disk and
blk_cleanup_disk helpers to simplify gendisk and request_queue
allocation.
Signed-off-by: Christoph Hellwig
---
drivers/nvdimm/pmem.c | 1 -
drivers/nvme/host/multipath.c | 45 ++-
2 files ch
Convert the simdisk driver to use the blk_alloc_disk and blk_cleanup_disk
helpers to simplify gendisk and request_queue allocation.
Signed-off-by: Christoph Hellwig
---
arch/xtensa/platforms/iss/simdisk.c | 29 +++--
1 file changed, 7 insertions(+), 22 deletions(-)
diff
Convert the ps3vram driver to use the blk_alloc_disk and blk_cleanup_disk
helpers to simplify gendisk and request_queue allocation.
Signed-off-by: Christoph Hellwig
---
drivers/block/ps3vram.c | 31 ---
1 file changed, 8 insertions(+), 23 deletions(-)
diff --git a/dr
Convert the nvdimm-pmem driver to use the blk_alloc_disk and
blk_cleanup_disk helpers to simplify gendisk and request_queue
allocation.
Signed-off-by: Christoph Hellwig
---
drivers/nvdimm/pmem.c | 15 +--
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/nvdimm/p
Convert the nfblock driver to use the blk_alloc_disk and blk_cleanup_disk
helpers to simplify gendisk and request_queue allocation.
Signed-off-by: Christoph Hellwig
---
arch/m68k/emu/nfblock.c | 20 +---
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/arch/m68k/emu
Looks good,
Reviewed-by: Johannes Thumshirn
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
Reviewed-by: Johannes Thumshirn
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
Reviewed-by: Johannes Thumshirn
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
Looks good,
Reviewed-by: Johannes Thumshirn
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
Looks good,
Reviewed-by: Johannes Thumshirn
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
Fix dm_accept_partial_bio() to actually check that zone management
commands are not passed as explained in the function documentation
comment. Also, since a zone append operation cannot be split, add
REQ_OP_ZONE_APPEND as a forbidden command.
White lines are added around the group of BUG_ON() call
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 del
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 the device and returned to
the host upon completion of the operation. This interface, while simple
and efficient for wr
Move the definitions of struct dm_target_io, struct dm_io and of the
bits of the flags field of struct mapped_device from dm.c to dm-core.h
to make them usable from dm-zone.c.
For the same reason, declare dec_pending() in dm-core.h after renaming
it to dm_io_dec_pending(). And for symmetry of the f
For zoned targets that cannot support zone append operations, implement
an emulation using regular write operations. If the original BIO
submitted by the user is a zone append operation, change its clone into
a regular write operation directed at the target zone write pointer
position.
To do so, a
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_ZONE_RESETALL. This flag is not set for
device mapper targets creating zoned devices. In this case, a user
request for resetti
To simplify the implementation of the report_zones operation of a zoned
target, introduce the function dm_report_zones() to set a target
mapping start sector in struct dm_report_zones_args and call
blkdev_report_zones(). This new function is exported and the report
zones callback function dm_report
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
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 the bio is a write operation targeting a
sequential zone. If a zoned target request such a requeue, warn about
it and kill the IO.
The function dm_is
This series improve device mapper support for zoned block devices and
of targets exposing a zoned device.
The first patch improve support for user requests to reset all zones of
the target device. With the fix, such operation behave similarly to
physical block devices implementation based on the s
Move core and table code used for zoned targets and conditionally
defined with #ifdef CONFIG_BLK_DEV_ZONED to the new file dm-zone.c.
This file is conditionally compiled depending on CONFIG_BLK_DEV_ZONED.
The small helper dm_set_zones_restrictions() is introduced to
initialize a mapped device reque
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
the struct request flag RQF_ZONE_WRITE_LOCKED.
This new BIO flag is reserved for now for zone write locking control
for device mapper targets exposing a z
The pull request you sent on Thu, 20 May 2021 15:45:46 -0400:
> git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
> tags/for-5.13/dm-fixes
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/a0eb553b6ff650faa031a470d048555b0b80a309
Thank you!
--
D
From: Martin Wilck
Build fails on distributions that don't support DM_DEFERRED_REMOVE
(libdevmapper < 1.02.89). Fix it.
Resolves: https://github.com/opensvc/multipath-tools/issues/7
Tested-by: Paul Menzel
---
libmultipath/devmapper.c | 11 ---
1 file changed, 8 insertions(+), 3 deletio
Hi Linus,
The following changes since commit 6efb943b8616ec53a5e444193dccf1af9ad627b5:
Linux 5.13-rc1 (2021-05-09 14:17:44 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
tags/for-5.13/dm-fixes
for you to fetch change
tree:
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
for-next
head: 68040817337fda98196974401391f2d1b9f87e49
commit: d69e2e7e28bd1d13ad2ac1f2e9ea6184567d1587 [5/8] dm btree: improve btree
residency
config: x86_64-randconfig-a013-20210520 (attached as .config
tree:
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
for-next
head: 68040817337fda98196974401391f2d1b9f87e49
commit: def6a7a9a7f0e7e3886fb77cf45c4a48e7e71c36 [7/8] dm space maps: improve
performance with inc/dec on ranges of blocks
config: i386-allyesconfig (attac
tree:
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
for-next
head: 68040817337fda98196974401391f2d1b9f87e49
commit: d69e2e7e28bd1d13ad2ac1f2e9ea6184567d1587 [5/8] dm btree: improve btree
residency
config: um-allmodconfig (attached as .config)
compiler: gcc-9 (Deb
tree:
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
for-next
head: 68040817337fda98196974401391f2d1b9f87e49
commit: def6a7a9a7f0e7e3886fb77cf45c4a48e7e71c36 [7/8] dm space maps: improve
performance with inc/dec on ranges of blocks
config: mips-allyesconfig (attac
On Mon, May 17, 2021 at 11:27:27PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> Use the latest commit timestamp of the "libdmmp.h" file as
> the timestamp for the man pages. This should avoid spurious rebuilds
> of the documentation.
>
> Signed-off-by: Martin Wilck
Reviewed-by: Benjam
On Mon, May 17, 2021 at 11:27:26PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> Allow the compiler to catch possible format string overflows.
> Two were found by gcc 10.
>
> Signed-off-by: Martin Wilck
Reviewed-by: Benjamin Marzinski
> ---
> Makefile.inc | 3 ++-
> libmu
On Mon, May 17, 2021 at 11:27:25PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> By setting (*reply)[19] = '\0', we always truncated a possible
> ":aptpl" suffix. Fix it, and use the return value of snprintf()
> as length.
>
> Signed-off-by: Martin Wilck
Reviewed-by: Benjamin Marzinski
On Mon, May 17, 2021 at 11:27:24PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> Create a macro for setting the reply length for string literals
> correctly, and use it where necessary.
>
> In cli_del_path(), don't change the function's return code
> if just the buffer allocation for th
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 all BIO that change a zone writer pointer and change zo
59 matches
Mail list logo